in reply to what did I just see..?
Standard rounding error phenomenon, you will find this in most languages with binary floats.
More math?
1/10 = 1/(2*5) and you can't represent the prime fraction 1/5 in a binary system without loss.
OTOH 1/2 is no problem, hence any fraction of form m/2**n with m,n in N . All others will have a rounding error.
I'll update links to older discussions...
...like:
There are far are more older threads, sure our brethren will add them soon. :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
s/n/m/
|
|---|