That is a general property of binary floating-point numbers. The difficulty will show up in any language. If you need consistency in a fixed-point decimal representation, you should scale the numbers to be represented as integers.
After Compline,
Zaxo
In reply to Re: (s)printf and rounding woes
by Zaxo
in thread (s)printf and rounding woes
by Not_a_Number
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |