in reply to Math::round not rounding correctly
So it seems a quick and dirty hack would be to sprintf the number and then round the string? :)$ perl -e 'printf "%.10f\n%.30f\n", 3010*1.15, 3010*1.15' 3461.5000000000 3461.499999999999545252649113535881
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Math::round not rounding correctly (string)
by tye (Sage) on Dec 23, 2014 at 20:39 UTC | |
Re^2: Math::round not rounding correctly
by bulrush (Scribe) on Dec 23, 2014 at 20:22 UTC |