This means that due to the limitations of the internal representation, the literal 9.55 is in fact 9.550000000000001 which rounds to 9.56. The same goes for 43.55 but there the representation is slightly smaller than 43.55 so a rounding down occurs.printf("%.15f", 9.55); # prints 9.550000000000001 printf("%.15f", 43.55); # prints 43.549999999999997
-- Hofmator
In reply to Re: Re: Using (s)printf()
by Hofmator
in thread Using (s)printf()
by reptile
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |