Do you know where your variables are? | |
PerlMonks |
Re: Math::round not rounding correctly (simple)by tye (Sage) |
on Dec 23, 2014 at 20:01 UTC ( [id://1111221]=note: print w/replies, xml ) | Need Help?? |
When the number is actually 3461.49999999999999382 it should be rounded to 3461 but might be displayed as simply "3461.5". Edit 1 in response to at least the second "edit" labeled "Edit 2" above (for sanity's sake, please stop changing the root of this conversation):
QED. (Now, maybe you'll go read and try to understand the stuff about floating point that was linked to quite a while ago?) - tye
In Section
Seekers of Perl Wisdom
|
|