Perl Monk, Perl Meditation | |
PerlMonks |
Re: Decimal numbers calculations done inconsistently: Odd behavior!by Krambambuli (Curate) |
on Mar 20, 2015 at 09:35 UTC ( [id://1120720]=note: print w/replies, xml ) | Need Help?? |
Since your decimals seem to always have exactly two fractional digits, it might suffice to "translate" everything into an 100x integer space.
So you might write
and forget about the *100 multipliers in the following code. Of course, you'll have to add back the 'decimal dots' when outputting the results. --- Krambambuli
In Section
Seekers of Perl Wisdom
|
|