![]() |
|
P is for Practical | |
PerlMonks |
Re: what did I just see..?by BillKSmith (Monsignor) |
on Mar 21, 2021 at 21:58 UTC ( #11130057=note: print w/replies, xml ) | Need Help?? |
In practice, floating-point errors are seldom a problem. Look at your output carefully and see how small the error really is. The default print format can be annoying (as you have discovered). You can avoid this by using printf to round to your required precision.
Bill
In Section
Seekers of Perl Wisdom
|
|