Perl: the Markov chain saw | |
PerlMonks |
Re^2: Math 101 anyone?by muntfish (Chaplain) |
on Oct 12, 2004 at 08:14 UTC ( [id://398413]=note: print w/replies, xml ) | Need Help?? |
So to get exact results, do all your calculations in integers, and divide by 100 for display purposes. Or, more transparently: use bignum - for example: perl -Mbignum -e "print (100.10-100);"gives the correct answer 0.1 s^^unp(;75N=&9I<V@`ack(u,^;s|\(.+\`|"$`$'\"$&\"\)"|ee;/m.+h/&&print$&
In Section
Seekers of Perl Wisdom
|
|