Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Attributes | Static Public Attributes | List of all members
Ase::FloatIEEE754 Union Reference

#include "mathutils.hh"

Public Attributes

float v_float
 
struct { 
 
uint mantissa: 23
 
uint biased_exponent: 8
 
uint sign: 1
 
mpn 
 
char chars [4]
 

Static Public Attributes

static constexpr const float EPSILON
 2^-24, round-off error at 1.0
 
static constexpr const int BIAS
 Exponent bias.
 
static constexpr const float FMAX
 0x7f7fffff, 2^128 * (1 - epsilon)
 
static constexpr const float FMIN
 0x00800000 Minimum Normal
 
static constexpr const float SMAX
 0x007fffff Maximum Subnormal
 
static constexpr const float SMIN
 0x00000001 Minimum Subnormal
 

Detailed Description

Union to compartmentalize an IEEE-754 float. IEEE 754 single precision floating point layout:

31 30 23 22 0
+--------+---------------+---------------+
| s 1bit | e[30:23] 8bit | f[22:0] 23bit |
+--------+---------------+---------------+
B0------------------->B1------->B2-->B3-->

Definition at line 32 of file mathutils.hh.

Member Data Documentation

◆ BIAS

constexpr const int Ase::FloatIEEE754::BIAS
staticconstexpr

Exponent bias.

Definition at line 43 of file mathutils.hh.

Referenced by Ase::fast_exp2(), and Ase::fast_log2().

◆ chars

char Ase::FloatIEEE754::chars[4]

Definition at line 41 of file mathutils.hh.

◆ EPSILON

constexpr const float Ase::FloatIEEE754::EPSILON
staticconstexpr

2^-24, round-off error at 1.0

Definition at line 42 of file mathutils.hh.

◆ FMAX

constexpr const float Ase::FloatIEEE754::FMAX
staticconstexpr

0x7f7fffff, 2^128 * (1 - epsilon)

Definition at line 44 of file mathutils.hh.

◆ FMIN

constexpr const float Ase::FloatIEEE754::FMIN
staticconstexpr

0x00800000 Minimum Normal

Definition at line 45 of file mathutils.hh.

◆ SMAX

constexpr const float Ase::FloatIEEE754::SMAX
staticconstexpr

0x007fffff Maximum Subnormal

Definition at line 46 of file mathutils.hh.

◆ SMIN

constexpr const float Ase::FloatIEEE754::SMIN
staticconstexpr

0x00000001 Minimum Subnormal

Definition at line 47 of file mathutils.hh.

◆ v_float

float Ase::FloatIEEE754::v_float

Definition at line 33 of file mathutils.hh.


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