[RFC] What should the arithmetic within the FixedPointNumbers be

Option 2. consistent with Integer

operation Fixed Normed
+, - wrapping wrapping
* wrapping wrapping
/ checked checked
div, rem etc. checked checked

The difference between this and Option 1. is * for Normed. This option improves the consistency between Fixed and Normed and the consistency with Julia’s Integer system.
(Edit: There is no operation for Integer /, so it does not affect the consistency.)

This leads to overlooking the overflow in the multiplication of, for example, N2f14 numbers, but N0f8 and N0f16, which are often used in image processing, do not occur the overflow in the first place.

2 Likes