ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
floaty_t Union Reference
Collaboration diagram for floaty_t:

Public Member Functions

 floaty_t (float n=0.0f)
 
bool negative () const
 portable extraction of components sign More...
 
int32_t raw_mantissa () const
 float has 23 bit mentissa More...
 
int32_t raw_exponent () const
 and an 8 bit exponent More...
 

Public Attributes

int32_t i
 
float f
 

Detailed Description

Definition at line 107 of file computils.cxx.

Constructor & Destructor Documentation

◆ floaty_t()

floaty_t::floaty_t ( float  n = 0.0f)
inline

Definition at line 108 of file computils.cxx.

108 : f(n) {}

Member Function Documentation

◆ negative()

bool floaty_t::negative ( ) const
inline

portable extraction of components sign

Definition at line 112 of file computils.cxx.

112 { return i < 0; }

◆ raw_exponent()

int32_t floaty_t::raw_exponent ( ) const
inline

and an 8 bit exponent

Definition at line 117 of file computils.cxx.

117 { return (i >> 23) & 0xff; }

◆ raw_mantissa()

int32_t floaty_t::raw_mantissa ( ) const
inline

float has 23 bit mentissa

Definition at line 115 of file computils.cxx.

115 { return i & ((1 << 23) - 1); }

Member Data Documentation

◆ f

float floaty_t::f

Definition at line 120 of file computils.cxx.

◆ i

int32_t floaty_t::i

Definition at line 119 of file computils.cxx.


The documentation for this union was generated from the following file:
floaty_t::f
float f
Definition: computils.cxx:120
beamspotman.n
n
Definition: beamspotman.py:731
floaty_t::i
int32_t i
Definition: computils.cxx:119