128 bit signed and unsigned integer types
Jason House
jason.james.house at gmail.com
Sun Dec 28 10:12:40 PST 2008
Don wrote:
> 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
> required)
> 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.
32 bit -> 64 bit: 8x8 bit boards in computer chess. zorbist hash codes
64 bit -> 128 bit: bit boards in 9x9 computer go. Depending on the implementation, 11x11 bit boards (121 bits) can be very handy.
More information about the Digitalmars-d
mailing list