[DGD] long ints...
Felix A. Croes
felix at dworkin.nl
Fri Sep 11 15:19:41 CEST 1998
Serhat Sakarya <serhat at freud.et.tudelft.nl> wrote:
> Hhm.. ok, at the risk of asking a stupid question, but:
>
> I need 64-bit integers, as opposed to the standard 32-bit ones.
> Apparently, type 'long' doesn't exist (yet?).
>
> What I'd like to know is whether longs ints are already available
> in the newest current versions or will be available in newer versions.
>
> My excuse: I tried 'dworkin.simplex.nl' to check out if it's in
> a later driver version, but I got a host name lookup failure :-)
DGD has no 64 bit integers, and will not have them in future releases.
More generally, no new types are going to be added to the language.
If you need more than 32 bits of integer precision, there are
several things you can do.
1) Use floats. DGD floats have 36 bits of unsigned precision, as
opposed to 32 bits of signed position for ints. This means that
36 bit integer calculations can be made with floats without loss of
precision.
2) Simulate 64 bit integers with two ints. An advantage of this
approach would be that it could be extended to even larger
integers.
Dworkin
More information about the DGD
mailing list