Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IEEE754 Namespace Reference

Classes

union  ieee754

Functions

uint64_t dp2uint64 (G4double x)
G4double uint642dp (uint64_t ll)
G4float uint322sp (G4int x)
uint32_t sp2uint32 (G4float x)

Function Documentation

◆ dp2uint64()

uint64_t G4IEEE754::dp2uint64 ( G4double x)
inline

Definition at line 56 of file G4IEEE754.hh.

57{
58 ieee754 tmp;
59 tmp.d = x;
60 return tmp.ll;
61}

Referenced by G4LogConsts::getMantExponent().

◆ sp2uint32()

uint32_t G4IEEE754::sp2uint32 ( G4float x)
inline

Definition at line 86 of file G4IEEE754.hh.

87{
88 ieee754 tmp;
89 tmp.f[0] = x;
90 return tmp.i[0];
91}
uint32_t i[2]
Definition G4IEEE754.hh:48

Referenced by G4ExpConsts::fpfloor(), G4ExpConsts::fpfloor(), and G4LogConsts::getMantExponentf().

◆ uint322sp()

G4float G4IEEE754::uint322sp ( G4int x)
inline

Definition at line 76 of file G4IEEE754.hh.

77{
78 ieee754 tmp;
79 tmp.i[0] = x;
80 return tmp.f[0];
81}

Referenced by G4Expf(), and G4LogConsts::getMantExponentf().

◆ uint642dp()

G4double G4IEEE754::uint642dp ( uint64_t ll)
inline

Definition at line 66 of file G4IEEE754.hh.

67{
68 ieee754 tmp;
69 tmp.ll = ll;
70 return tmp.d;
71}

Referenced by G4Exp(), and G4LogConsts::getMantExponent().