Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Infinity and Inf? (MAX_INT)

by LanX (Saint)
on Sep 01, 2010 at 12:58 UTC ( [id://858332]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<1> print ~0
    4294967295
    ...
    4294967295
      DB<34> p 0+sprintf('%u', -1);
    4294967295
    
  2. or download this
      DB<81> p 999999999999999+1
    1e+15
    ...
    999999999999999
      DB<85> p 1e+15-1
    999999999999999
    
  3. or download this
      DB<88> p 999999999999998+4-5
    999999999999997
    ...
    999999999999999
      DB<97> p 999999999999999+2**53 -2**53
    1e+15
    
  4. or download this
      DB<32> $x=0;for(1..2**31) {print;last if $x++>5}
    Range iterator outside integer range at (eval 36)[/usr/share/perl/5.10
    +/perl5db.pl:638] line 2.
    ...
    
      DB<34> $x=0;for(1..~0) {print;last if $x++>5}
    Range iterator outside integer range at (eval 45)[/usr/share/perl/5.10
    +/perl5db.pl:638] line 2.
    
  5. or download this
      DB<46> $x=0;for(1..2**31-2) {print;last if $x++>5}
    1234567
      DB<47> $x=0;for(1..2**31-1) {print;last if $x++>5}
    Range iterator outside integer range at (eval 51)[/usr/share/perl/5.10
    +/perl5db.pl:638] line 2.
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found