Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

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

&pagelevel(4)&pagelevel

Syntax

#include <ieee_390.h>

float ieee2float (float num);

Description

ieee2float() converts a 4-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.

4-byte floating-point number in /390 format (in the event of success).

0.0

if NaN or inf is passed as a parameter.

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 thus becomes inaccurate, float_flag_invalid is set.

 See also

float2ieee(), double2ieee(), ieee2double()