◆ FIFTYONE_DEGREES_FLOAT_EXP_MAX
#define FIFTYONE_DEGREES_FLOAT_EXP_MAX 255 |
IEEE single precision floating point max exponent value where all bits are 1.
This can only happen in NaN (Not a Number) and Inf (Infinity) cases.
\r\n
IEEE Single Precision Floating Point standard implementation and methods to convert to native float type.
IEEE Single Precision Floating Point standard is supported in majority of modern computers. However, it is not always guaranteed, so a indepdent implementation is required so that on the machines where this standard is not supported, the float type from the data file can still be read correctly.
Endianess difference between machines will not be handled at the moment, until it is supported by 51Degrees data file.
Positive sign will always be defaulted to during a conversion from native float type when input float is NaN (Not a Number) or Inf (Infinity).
When converting from 51Degrees implementation to native float type, if it results in a NaN or Inf, the value from compiler macros that represent these number will be returned. i.e. NAN and INFINITY
struct | fiftyoneDegreesFloatInternal
Struture that represents 51Degrees implementation, which encapsulate an array of 4 bytes. More...
|
union | fiftyoneDegreesFloatU
Union that breaks down 51Degrees implementation to its components: sign, exponent and mantissa. More...
|
#define | FIFTYONE_DEGREES_FLOAT_BIAS 127
IEEE single precision floating point bias value.
|
#define | FIFTYONE_DEGREES_FLOAT_SIZE 4
IEEE single precision floating point number of bytes.
|
#define | FIFTYONE_DEGREES_FLOAT_RADIX 2
IEEE single precision floating point base value.
|
#define | FIFTYONE_DEGREES_FLOAT_SIGN_SIZE 1
IEEE single precision floating point number of bits for sgn.
|
#define | FIFTYONE_DEGREES_FLOAT_EXP_SIZE 8
IEEE single precision floating point number of bits for exponent.
|
#define | FIFTYONE_DEGREES_FLOAT_MANT_SIZE 23
IEEE single precision floating point number of bits for mantissa.
|
#define | FIFTYONE_DEGREES_FLOAT_MAX 3.402823466E38f
IEEE single precision floating point max positive value.
|
#define | FIFTYONE_DEGREES_FLOAT_MIN 1.175494351E-38f
IEEE single precision floating point min positive value.
|
#define | FIFTYONE_DEGREES_FLOAT_MIN_NEG -3.402823466E38f
IEEE single precision floating point min negative value.
|
#define | FIFTYONE_DEGREES_FLOAT_EXP_MAX 255
IEEE single precision floating point max exponent value where all bits are 1. More...
|
#define | FIFTYONE_DEGREES_FLOAT_MANT_MAX 8388607
IEEE single precision floating point max mantissa value where all bits are 1.
|
#define | FIFTYONE_DEGREES_FLOAT_TO_NATIVE(f) fiftyoneDegreesFloatToNative(f)
Function that converts from a 51Degrees float implementation to a native float value. More...
|
#define | FIFTYONE_DEGREES_NATIVE_TO_FLOAT(f) fiftyoneDegreesNativeToFloat(f)
Function that converts from a native float value to 51Degrees float value. More...
|
#define | FIFTYONE_DEGREES_FLOAT_IS_EQUAL(f1, f2) fiftyoneDegreesFloatIsEqual(f1, f2)
Function that compare if two 51Degrees float values are equal. More...
|
typedef fiftyoneDegreesFloatInternal | fiftyoneDegreesFloat
For some compilers such as clang and Microsoft C or computers where the IEEE single precision standard is supported, default the type to the native float type. More...
|
float | fiftyoneDegreesFloatToNative (fiftyoneDegreesFloatInternal f)
Function that converts from a 51Degrees float implementation to a native float value. More...
|
fiftyoneDegreesFloatInternal | fiftyoneDegreesNativeToFloat (float f)
Function that converts from a native float value to 51Degrees float value. More...
|
int | fiftyoneDegreesFloatIsEqual (fiftyoneDegreesFloatInternal f1, fiftyoneDegreesFloatInternal f2)
Function that compare if two 51Degrees float values are equal. More...
|
#define FIFTYONE_DEGREES_FLOAT_EXP_MAX 255 |
IEEE single precision floating point max exponent value where all bits are 1.
This can only happen in NaN (Not a Number) and Inf (Infinity) cases.
#define FIFTYONE_DEGREES_FLOAT_IS_EQUAL | ( | f1, | |
f2 | |||
) | fiftyoneDegreesFloatIsEqual(f1, f2) |
Function that compare if two 51Degrees float values are equal.
#define FIFTYONE_DEGREES_FLOAT_TO_NATIVE | ( | f | ) | fiftyoneDegreesFloatToNative(f) |
Function that converts from a 51Degrees float implementation to a native float value.
#define FIFTYONE_DEGREES_NATIVE_TO_FLOAT | ( | f | ) | fiftyoneDegreesNativeToFloat(f) |
Function that converts from a native float value to 51Degrees float value.
For some compilers such as clang and Microsoft C or computers where the IEEE single precision standard is supported, default the type to the native float type.
Define 51Degrees float implementation as the internal type IEEE standard is not supported in this case
int fiftyoneDegreesFloatIsEqual | ( | fiftyoneDegreesFloatInternal | f1, |
fiftyoneDegreesFloatInternal | f2 | ||
) |
Function that compare if two 51Degrees float values are equal.
float fiftyoneDegreesFloatToNative | ( | fiftyoneDegreesFloatInternal | f | ) |
Function that converts from a 51Degrees float implementation to a native float value.
fiftyoneDegreesFloatInternal fiftyoneDegreesNativeToFloat | ( | float | f | ) |
Function that converts from a native float value to 51Degrees float value.