View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

64bit cl

Tom Duvall wrote on Jul 07, 2010

I'm just getting started with the new version 2.15Alpha. I wanted to do something that was a 64-bit thing, so I said to the cl:

x=1.e10
i=x
print (i)
with the result:
-2147483648

I guess I was thinking that integers in the cl would be 64bit. Am I wrong?
Thanks.
Tom

Mike Fitzpatrick wrote on Jul 07, 2010

Right, integer CL variables remain 32-bit values since I couldn't think of a compelling reason for needing 64-bit values in scripts. This *could* be done but would require more work on the CL language interpreter (note the CL itself *is* a 64-bit binary, this is a language issue).

As a workaround for most cases, use a 'real' or 'double' variable when long integers are needed (all floating point in CL is double-precision). Otherwise, please send me your most compelling (real-world!) use case.

-Mike

Last post on Jul 07, 2010