CAEN Utility  2.0.2
Utilities for CAEN projects
Floating point manipulation

Platform independent floating point manipulation functions. More...

Functions

int64_t c_frexp (double value, int16_t *exponent, int8_t *classification)
 
double c_ldexp (int64_t mantissa, int16_t exponent, int8_t classification)
 

Detailed Description

Platform independent floating point manipulation functions.

Function Documentation

◆ c_frexp()

int64_t c_frexp ( double  value,
int16_t *  exponent,
int8_t *  classification 
)

To send double precision floating point numbers on network (IEEE 754 compliant): split double into mantissa, exponent and floating-point classification to be read with c_ldexp().

Parameters
[in]valuethe value
[out]exponentthe exponent
[out]classificationthe classification, specified in c_Float_Classification_t
Returns
the mantissa

Definition at line 1497 of file CAENMultiplatform.c.

Here is the caller graph for this function:

◆ c_ldexp()

double c_ldexp ( int64_t  mantissa,
int16_t  exponent,
int8_t  classification 
)

To receive double precision floating point numbers on network (IEEE 754 compliant): merge mantissa, exponent and floating-point classification provided by c_frexp() into double.

Parameters
[in]mantissathe mantissa
[in]exponentthe exponent
[in]classificationthe classification, specified in c_Float_Classification_t
Returns
the value

Definition at line 1547 of file CAENMultiplatform.c.

Here is the caller graph for this function: