You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dividing by zero, Swift has the semantics of returning the truncated (if needed) dividend. Currently, I'm returning the divisor for single digit remainder operations because the dividend may not fit in the remainder type. At some point, I changed this in Numberick when I concluded that being consistent is better. These values are junk by definition, but consistent junk is better than inconsistent junk.
TL;DR: division by zero will return the truncated dividend similar to Swift's stdlib.
The text was updated successfully, but these errors were encountered:
When dividing by zero, Swift has the semantics of returning the truncated (if needed) dividend. Currently, I'm returning the divisor for single digit remainder operations because the dividend may not fit in the remainder type. At some point, I changed this in Numberick when I concluded that being consistent is better. These values are junk by definition, but consistent junk is better than inconsistent junk.
The text was updated successfully, but these errors were encountered: