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
iex(1)>Money.divide(Money.new(-3,:EUR),2)# Correct[%Money{amount: -2,currency: :EUR},%Money{amount: -1,currency: :EUR}]iex(2)>Money.divide(Money.new(-3,:EUR),3)# Correct[%Money{amount: -1,currency: :EUR},%Money{amount: -1,currency: :EUR},%Money{amount: -1,currency: :EUR}]iex(3)>Money.divide(Money.new(-3,:EUR),4)# Does not add up to -3[%Money{amount: 1,currency: :EUR},%Money{amount: 1,currency: :EUR},%Money{amount: -1,currency: :EUR},%Money{amount: 0,currency: :EUR}]
The text was updated successfully, but these errors were encountered:
matthijsqd
changed the title
Money.divide/2 does not work with negative values when count exceeds the absolute amountMoney.divide/2 does not work with negative values when count exceeds the absolute amount
Nov 28, 2024
The text was updated successfully, but these errors were encountered: