Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Answer: How do I create/detect/handle Infinity?

by moritz (Cardinal)
on Jul 24, 2009 at 18:21 UTC ( #783074=categorized answer: print w/replies, xml ) Need Help??

Q&A > math > How do I create/detect/handle Infinity? - Answer contributed by moritz

I think in Perl 5 this is platform specific, so I'll rather give the Perl 6 answer:
my $num = Inf; given $num { say "+Inf" when Inf; say "-Inf" when -Inf; say "NaN" when NaN; }

Works in Rakudo today.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2019-02-21 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (109 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!