Subtract |-| implementation is wrong for quantities based on Ratio Natural
Closed this issue · 3 comments
21it commented
Every expression like (x :: MoneyBase') |-| (y :: MoneyBase')
will cause runtime exception of arithmetic underflow
regardless x
and y
values. I guess implementation details of |-|
themselves do cause exception:
(|-|) :: (d1 @~ d2, Num n) => Qu d1 l n -> Qu d2 l n -> Qu d1 l n
a |-| b = a |+| qNegate b
goldfirere commented
Thanks for the report! Fixed now. Will release after CI is green.
goldfirere commented
Released the fix.
21it commented
Super cool! Thanks a lot for the fix!