Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Unpack 64 bit value

by ikegami (Pope)
on Sep 11, 2009 at 00:50 UTC ( #794664=note: print w/ replies, xml ) Need Help??


in reply to Re: Unpack 64 bit value
in thread Unpack 64 bit value

Looking at the source, it looks like a very efficient implementation. It does native 64-bit arithmetic through overloaded operators. It doesn't use Math::BigInt or the like. (The number is stored in the NV slot of a blessed SV.)

...but native 64-bit arithmetic isn't supported by my compiler or it isn't enabled. Does any 32-bit compiler on a 32-bit platform have support for 64-bit arithmetic?

It would be nice if it downgraded to using Math::BigInt if necessary.


Comment on Re^2: Unpack 64 bit value
Re^3: Unpack 64 bit value
by salva (Monsignor) on Sep 11, 2009 at 07:28 UTC
    ...but native 64-bit arithmetic isn't supported by my compiler or it isn't enabled. Does any 32-bit compiler on a 32-bit platform have support for 64-bit arithmetic?

    I believe that C99 specifies support for the long long int (64 bits or bigger) type as mandatory, so any modern compiler aiming to be C99 compliant should have 64 bits support.

    My initial plan was to add a fallback mode able to handle 64 bit arithmetic with 32 bit ints (it shouldn't be too difficult) but until today nobody had asked for it so it just remained undone...

    Can you give me the details of your system, OS, compiler, etc? are you sure it doesn't support 64 bit integers in any way?

      Can you give me the details of your system, OS, compiler, etc?

      My compiler is dated
      >cl /? Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for +80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

      Visual Studio 6.

      are you sure it doesn't support 64 bit integers in any way?

      No, I don't know one way or another.

      I believe that C99 specifies support for the long long int (64 bits or bigger) type as mandatory

      I withdraw my suggestion.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2014-08-01 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls