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

Re: print, long(1.0e10)



Hold on

>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

The same commands evaluated with PV-Wave (6.21, Solaris 2.6) gives

% Program caused arithmetic error: Floating divide by 0
% Program caused arithmetic error: Floating underflow
% Program caused arithmetic error: Floating illegal operand
% Detected at $MAIN$   (LONG).
print,b
 1343554297

While I don't understand the "divide by 0" error at least there is some error
messge. Is this due to the wonderful world of IEEE numerics?

M. Luethi
-- 
============================================================
Martin Luethi			Tel. +41 1 632 40 92
Glaciology Section		Fax. +41 1 632 11 92
VAW ETH Zuerich			
CH-8092 Zuerich			mail luthi@vaw.baum.ethz.ch
Switzerland
============================================================