Re: 128 bit integers



On Thu, 28 Jul 2005 15:10:11 +0200, jacob navia
<jacob@xxxxxxxxxxxxxxxx> wrote:

> 4) What other implications can this new type have? I would have
> loved to use long long for this, long for 64 bit, int for 32
> bits, etc. But this is not possible for compatibility reasons.
> There is too much software there that assumes long long is 64 bits,
> not 128.

Any software which assumes any specific size of a type is broken.
Certainly with long long, which hasn't been around for very long
(apologies for the pun) so hasn't got the excuse of "there were only 16
bit machines around when we wrote it". long long is /at least/ 64 bits,
it could easily be 72 on a 24 bit machine for instance.

Probably just adding the new type to stdint.h and inttypes.h with
appropriate macros would be adequate. An implementation can happily
define types of form intN_t and uintN_t (and the least and fast
variations) and the PRIdN (etc.) macros without encroaching on the user
namespace in those headers.

Since, however, the macros and types should not be defined if the
headers are not included, the underlying type should be in the
implementation namespace, starting with underscore (so _int128_t and
_uint128_t would be reasonable) unless you can easily detect which
header is included and switch the keywords off. long long long is silly
in my view (as is long long).

Chris C
.



Relevant Pages

  • Re: Exploit
    ... I have e-mailed ZDNet with the details in case they know ... >> I got the latest updates, and scanned both machines with Norton and AVG, ... >> seems to be a macro of sorts, but I don't have it in my EZ Macros list, ...
    (microsoft.public.windowsxp.general)
  • Re: Exploit
    ... The "Issue" is jokes and cartoons via email. ... > I got the latest updates, and scanned both machines with Norton and AVG, ... > and I have deleted any trace of macros from Excel, ... plus the XP firewall and my ISP's firewall. ...
    (microsoft.public.windowsxp.general)
  • Re: Exploit
    ... | I got the latest updates, and scanned both machines with Norton and AVG, ... | to be a macro of sorts, but I don't have it in my EZ Macros list, and I have ... | I have XP Pro SP2 with all updates, four spyware programs, and two antivirus ... plus the XP firewall and my ISP's firewall. ...
    (microsoft.public.windowsxp.general)
  • Re: Exploit
    ... Thanks for your response David. ... > | I got the latest updates, and scanned both machines with Norton and AVG, ... > | to be a macro of sorts, but I don't have it in my EZ Macros list, and I ... plus the XP firewall and my ISP's firewall. ...
    (microsoft.public.windowsxp.general)
  • Exploit
    ... I got the latest updates, and scanned both machines with Norton and AVG, ... to be a macro of sorts, but I don't have it in my EZ Macros list, and I have ... I have XP Pro SP2 with all updates, four spyware programs, and two antivirus ... plus the XP firewall and my ISP's firewall. ...
    (microsoft.public.windowsxp.general)