[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print, long(1.0e10)





Gary Fu wrote:

> Hi,
>
> I got different results from the following example on SGI IRIX and PC
> Linux:
> a = 1.0e10
> b = long(a)
> print, b      ; 2147483647 for IRIX, -2147483648 for Linux
>

Results of WIN NT

IDL> a=1.0e10
IDL> b = long(a)
IDL> print, b
  1410065408


Results of AIX

IDL> a=1.0e10
IDL> b=long(a)
% Program caused arithmetic error: Floating illegal operand
% Program caused arithmetic error: Conversion to integer error
IDL> print,b
  2147483647

R.Bauer