The current implementation of multiplication for Normed uses floating point arithmetic.
The following three points are important in adding checked_mul:
- Unlike
checked_add/checked_sub, FixedPoint multiplication and rawtype multiplication are different.
N0f8, N0f16 and so on, do not cause overflow in multiplication.
Float-->Normed conversion code may throw an exception.
Therefore, the optimization for at least N0f8 and N0f16 is important.
The current implementation of multiplication for
Normeduses floating point arithmetic.The following three points are important in adding
checked_mul:checked_add/checked_sub,FixedPointmultiplication andrawtypemultiplication are different.N0f8,N0f16and so on, do not cause overflow in multiplication.Float-->Normedconversion code may throw an exception.Therefore, the optimization for at least
N0f8andN0f16is important.