Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Why does perl math suck?

by FunkyMonk (Chancellor)
on Jan 12, 2011 at 00:55 UTC ( #881796=note: print w/replies, xml ) Need Help??


in reply to Why does perl math suck?

Integers are always stored exactly (assuming they're not too big), so you could use something like:
perl -le 'my $n = 505645 + 1011292; print $n == 1516937 ? $n / 100 . " + as expected" : "Gah. sharkey was right all along!"'
<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2018-08-18 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (185 votes). Check out past polls.

    Notices?