Data.Fixed.mod' sometimes produces nonsensical results
Prelude Data.Fixed> (-3e19) `mod'` 1.4 -4096.0 Prelude Data.Fixed> 4.9098418106168856e20 `mod'` (-43.4678352235136) 65536.0 Prelude Data.Fixed> (-10) `mod'` exp (-43) -1.7763568394002505e-15
My understanding is that
mod' should yield a result whose absolute value is smaller than the absolute value of the divisor and which is positive when the divisor is positive.
The fact that some of the above results happen to be powers of 2 is also curious.
- GHC version used: