next up previous contents
Next: 2.1.3 Limits Up: 2.1.2 CDF Modes Previous: zMode

-0.0 to 0.0 Mode

     

The floating-point value -0.0 is legal on those computers which use the IEEE 754   floating-point representation (e.g., UNIX-based computers, the Macintosh, and the IBM PC) but is illegal on VAXes and DEC Alphas running OpenVMS. Attempting to use -0.0 results in a reserved operand fault on a VAX and a high performance arithmetic fault on a DEC Alpha running OpenVMS. Because of this the CDF library can be told to convert -0.0 to 0.0 when read from or written to a CDF. When reading from a CDF the values physically stored in the CDF are not modified --- only the values returned to an application are converted. When writing to a CDF the values physically stored are modified --- -0.0 is converted to 0.0 before being written to the CDF. This mode is available on all supported computers but is only really necessary on VAXes and DEC Alphas running OpenVMS. The CDF library is told to convert -0.0 to 0.0 for a CDF via the Internal Interface using the <SELECT_,CDF_NEGtoPOSfp0_MODE_> operation. When this mode is disabled, a warning (NEGATIVE_FP_ZERO) is returned when -0.0 is read from a CDF (and the decoding is that of a VAX or DEC Alpha running OpenVMS) or written to a CDF (and the encoding is that of a VAX or DEC Alpha running OpenVMS).



cdfsupport@nssdca.gsfc.nasa.gov