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

&pagelevel(4)&pagelevel

Definition

#include <ieee_390.h>

extern float ieee2float (float num);

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

Parameters  float num

4-byte floating-point number in IEEE format

Return val.

4-byte floating-point number in /390 format.

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, f
float_flag_invalid is set.

See also

float2ieee, double2ieee, ieee2double