Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
That's a classic, computers use a binary representation for floats and many decimal fractions can't be represented w/o rounding errors
see Humans have too many fingers Depending on use case there are different solutions, one is to calculate with integers without decimal fractions (like do currency in cent and add the point only at output) PS: we had a similar discussion just recently
Cheers Rolf In reply to Re: finding the correct integer
by LanX
|
|