Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
The range operator seems only to be implemented for signed 32bits integers

On a 64-bit perl, it handles integers greater than 32-bit.

Though there appears to be a bug. Somewhere in between, the 64-bit integers are being transitioned through an NV (double) before being converted back to integers for the iterator it seems:

for my $p ( 32 .. 64 ) { my $n = 2**$p; printf "\n$p"; printf " $_" for $n .. $n + 2; };; 32 4294967296 4294967297 4294967298 33 8589934592 8589934593 8589934594 34 17179869184 17179869185 17179869186 35 34359738368 34359738369 34359738370 36 68719476736 68719476737 68719476738 37 137438953472 137438953473 137438953474 38 274877906944 274877906945 274877906946 39 549755813888 549755813889 549755813890 40 1099511627776 1099511627777 1099511627778 41 2199023255552 2199023255553 2199023255554 42 4398046511104 4398046511105 4398046511106 43 8796093022208 8796093022209 8796093022210 44 17592186044416 17592186044417 17592186044418 45 35184372088832 35184372088833 35184372088834 46 70368744177664 70368744177665 70368744177666 47 140737488355328 140737488355329 140737488355330 48 281474976710656 281474976710657 281474976710658 49 562949953421312 562949953421313 562949953421314 50 1125899906842624 1125899906842625 1125899906842626 51 2251799813685248 2251799813685249 2251799813685250 52 4503599627370496 4503599627370497 4503599627370498 53 9007199254740992 9007199254740993 9007199254740994 54 18014398509481984 55 36028797018963968 56 72057594037927936 57 144115188075855872 58 288230376151711744 59 576460752303423488 60 1152921504606846976 61 2305843009213693952 62 4611686018427387904 63[Range iterator outside integer range at (eval 21) line 1, <STDIN> l +ine 17.

Good luck in trying to track that bug down :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^4: Infinity and Inf? (MAX_INT) by BrowserUk
in thread Infinity and Inf? by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found