[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: print, long(1.0e10)
- Subject: Re: print, long(1.0e10)
- From: luthi(at)aura.ethz.ch (Martin LUETHI GL A8.1 2-4092)
- Date: 09 Aug 1999 19:20:58 +0200
- Newsgroups: comp.lang.idl-pvwave
- Organization: Swiss Federal Institute of Technology (ETHZ)
- References: <37A7617E.9F5DD25D@seadas.gsfc.nasa.gov> <7omvp4$pph@post.gsfc.nasa.gov>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:16044
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
============================================================