Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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??


in reply to Re: Math 101 anyone?
in thread Math 101 anyone?

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$&

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://398413]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-20 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found