We don't bite newbies here... much | |
PerlMonks |
Re^2: $var == 1 fails when $var = 1by mjlush (Novice) |
on Sep 20, 2018 at 15:23 UTC ( [id://1222724]=note: print w/replies, xml ) | Need Help?? |
Why does the order of addition matter?
DB<8> printf '%.20f', 0.688 0.68799999999999994493 DB<9> printf '%.20f', 0.688 + 0.023 0.71099999999999996536 DB<10> printf '%.20f', 0.688 + 0.023 + 0.289 1.00000000000000000000 DB<11> printf '%.20f', 0.688 + 0.289 + 0.023 0.99999999999999988898PS and thanks for the prompt answer!
In Section
Seekers of Perl Wisdom
|
|