Re:Why does 0.1 and 0.2 = 0.30000000000000004?
by lmm on Wednesday February 08, 2023 @10:49PM
(#34719536)
Depends what you're doing with them. A value at risk calculation gives you a currency-dimensioned result that's hard to represent exactly, for example.
[ Parent
| on HN ]
Re:Why does 0.1 and 0.2 = 0.30000000000000004?
by wyager on Thursday February 09, 2023 @09:26AM
(#34724354)
Yes, a more precise statement is "exact currency amounts form a group under addition" - once you depart from group operations (e.g. multiplication by non-integral scalars) you can start to consider floats.