Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Converting 2**54-1 to Binary

by stevieb (Canon)
on Mar 17, 2017 at 21:33 UTC ( [id://1185084]=note: print w/replies, xml ) Need Help??


in reply to Converting 2**54-1 to Binary

Perl 5.24.1 64-bit, for reference:

use warnings; use strict; for(51..66){ my $s = sprintf("%b", 2**$_-1); print "$_:" . length($s) . "\n"; }

Output (* denotation is added after the fact to represent where it starts to "break").:

51:51 52:52 53:53 54:54 55:55 56:56 57:57 58:58 59:59 60:60 61:61 62:63 * 63:64 * 64:64 * 65:64 * 66:64 *

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-29 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found