Re:Why does 0.1 and 0.2 = 0.30000000000000004?
by gibspaulding on Wednesday February 08, 2023 @04:21PM
(#34715379)
Then of course you'll have to work back to compute an APR for that by a crazy iterative formula outlined by the US gov. Which would you use for that process?
Re:Why does 0.1 and 0.2 = 0.30000000000000004?
by meese712 on Wednesday February 08, 2023 @10:32PM
(#34719419)
irr? The library we use uses doubles https://github.com/eric-malachias/irr. We also use doubles for the amortization table and doubles for everything.
Re:Why does 0.1 and 0.2 = 0.30000000000000004?
by meese712 on Wednesday February 08, 2023 @10:22PM
(#34719364)
Oh hey I work in mortgage! We use plain old doubles for everything and there's some rounds in there and occasionally an exotic round to the nearest 1/8th. Everything ends up matching fine where it needs to.
1. Decimal math
2. Binary floating point math
3. Domain knowledge trumps all; it makes no difference