This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>To: address@hidden >From: Patrick Guio <address@hidden> >Subject: problem with ncdump (fwd) >Organization: . >Keywords: 199610020843.AA13593 Patrick, Oops, I didn't test that patch I sent you sufficiently. It should be portable, but it contains a peculiar statement that is incorrectly compiled by several Unix systems, and incorrectly optimized by several others: #define IS_FINITE(x) (((x)-(x))==((x)-(x))) This macro works OK on AIX 4.2, HP-UX 9, SunOS 4.x, SunOS 5.x. It works OK unless compiled with the -O flag on ULTRIX and IRIX 6.2. It gets optimized incorrectly by default on IRIX64 and OSF1. I'll have to keep looking for a portable way to determine whether a number is an IEEE infinity value. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu