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

Re: Infinity recognized as number

by fglock (Vicar)
on Nov 22, 2002 at 18:22 UTC ( #215217=note: print w/ replies, xml ) Need Help??


in reply to Infinity recognized as number

Thanks all. The point is, Perl prints out the Infinity number as "Inf" (FreeBSD) or "inf" (linux). What I learned is that the string "Inf" is just a string.

Now I'm using $inf=10**10**10


Comment on Re: Infinity recognized as number
Re^2: Infinity recognized as number
by Anonymous Monk on Mar 24, 2013 at 22:37 UTC
    FWIW, perl 5.16.1 :)
    $ perl -e " print 1 + Infinity " 1.#INF $ perl -e " print 1 + inf" 1.#INF $ perl -e " print int inf" 1.#INF $

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-07-05 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls