Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • FWIW this also works fine when 64-bit ints are compiled in -- which IMO should be the default whenever it's available.
    • Oh, I hadn't thought of that. I wonder if it's just that Perl hasn't been built with 64-bit support but the others have.
      • No, it is not how the language is compiled.

        Ruby borrowed an idea from Smalltalk. Small integers are of type Fixnum, and it automatically promotes results above about a billion to Bignum on the fly. (IIRC, it has to reserve one bit for the sign and one for some internal bookkeeping.) As a result integer operations with Ruby are always exact. There is some overhead for this scheme, but there are tricks that make it less than you think. (Again, these tricks were worked out for Smalltalk.)

        Given that Python