Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: $array[ 'Infinity' ]

by benizi (Hermit)
on Dec 19, 2007 at 23:55 UTC ( #658015=note: print w/ replies, xml ) Need Help??


in reply to Re^2: $array[ 'Infinity' ]
in thread $array[ 'Infinity' ]

As to the "why", X = 9**9**9 == 9**(9**9) = 9**387420489. Nine to that power is a number aproximately 1.2 billion bits long. (log(9)/log(2) * (9**9)). So, for all intents and purposes, it's infinity. Since it's odd, -X will be negative infinity So, it avoids the (possible?) non-portability of a raw 'inf' or '-inf'.

Update: Duh, Ben. Re: strikeout. Plus it's specifically negated. I was thinking (-9)**9**9)


Comment on Re: $array[ 'Infinity' ]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-12-19 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls