Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

double2ieee - Convert floating-point number from /390 format to IEEE format (BS2000)

&pagelevel(4)&pagelevel

Syntax

#include <ieee_390.h>

double double2ieee (double num);

Description

double2ieee() converts an 8-byte floating-point number num in /390 format to IEEE format and returns it as the result. Neither overflow nor underflow can occur, but up to three bit positions can be lost.

Return val.

8-byte floating-point number in IEEE format (if successful).

The global variable float_exceptions_flag contains information for the event of unsuccessful conversion and is defined as follows:

extern int float_exception_flags;
enum { 
   float_flag_inexact   =  1,
   float_flag_divbyzero =  2, 
   float_flag_underflow =  4, 
   float_flag_overflow  =  8, 
   float_flag_invalid   = 16 
};

If bit positions are lost during conversion and the result is thus inaccurate, float_flag_inexact is set.

 See also

ieee2double(), float2ieee(), ieee2float().