Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: $array[ 'Infinity' ]

by benizi (Hermit)
on Dec 19, 2007 at 23:55 UTC ( [id://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)

Log In?
Username:
Password:

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

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

    No recent polls found