128 bit signed and unsigned integer types

Don nospam at nospam.com
Sun Dec 28 08:19:30 PST 2008

Walter Bright wrote:
> You know, the unimplemented 128 bit integer types.
> Does anyone have a use for these?

I would have liked them when implementing a fallback (non-asm) bigint 
implementation for 64-bit CPUs. Actually the only operations required are:
ulong * ulong -> ulong[2]
ulong[2] / ulong = ulong (only the case where it doesn't overflow, is 
ulong + ulong = ulong[2]
ulong - ulong = ulong[2]

Otherwise, it's hard to imagine many cases where 64 bits are inadequate 
but 128 bits are enough. Actually there are very few cases where 32 bits 
are inadequate but 64 bits are enough.

More information about the Digitalmars-d mailing list