XCORE SDK
XCORE Software Development Kit
Public Attributes | List of all members
float_s32_t Struct Reference

A floating-point scalar with a 32-bit mantissa. More...

#include <xs3_math_types.h>

Public Attributes

int32_t mant
 32-bit mantissa
 
exponent_t exp
 exponent
 

Detailed Description

A floating-point scalar with a 32-bit mantissa.

Represents a (non-standard) floating-point value given by \( M \cdot 2^{x} \), where \(M\) is the 32-bit mantissa mant, and \(x\) is the exponent exp.

To convert a float_s32_t to a standard IEEE754 single-precision floating-point value (which may result in a loss of precision):

float to_ieee_float(float_s32_t x) {
return ldexpf(x.mant, x.exp);
}
A floating-point scalar with a 32-bit mantissa.
Definition: xs3_math_types.h:167
int32_t mant
32-bit mantissa
Definition: xs3_math_types.h:168
exponent_t exp
exponent
Definition: xs3_math_types.h:169

The documentation for this struct was generated from the following file: