JavaMoney / jsr354-ri

JSR 354 - Moneta: Reference Implementation
Other
344 stars 101 forks source link

FastMoney.multiply overflows for values far lower than max value #243

Closed marschall closed 6 years ago

marschall commented 6 years ago

FastMoney.multiply(Number) scales the product by a factor of 100000 which means it already overflows for values five order of magnitudes below the maximum value. For example multiplying 1'111'111'111.11111 by 2 overflows.