Geant4-11
Data Structures | Functions | Variables
G4ExpConsts Namespace Reference

Data Structures

union  ieee754
 

Functions

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

Variables

const G4float C1F = 0.693359375f
 
const G4float C2F = -2.12194440e-4f
 
const G4double EXP_LIMIT = 708
 
const G4double LOG2E = 1.4426950408889634073599
 
const G4float LOG2EF = 1.44269504088896341f
 
const G4float MAXLOGF = 88.72283905206835f
 
const G4float MINLOGF = -88.f
 
const G4double PX1exp = 1.26177193074810590878E-4
 
const G4float PX1expf = 1.9875691500E-4f
 
const G4double PX2exp = 3.02994407707441961300E-2
 
const G4float PX2expf = 1.3981999507E-3f
 
const G4double PX3exp = 9.99999999999999999910E-1
 
const G4float PX3expf = 8.3334519073E-3f
 
const G4float PX4expf = 4.1665795894E-2f
 
const G4float PX5expf = 1.6666665459E-1f
 
const G4float PX6expf = 5.0000001201E-1f
 
const G4double QX1exp = 3.00198505138664455042E-6
 
const G4double QX2exp = 2.52448340349684104192E-3
 
const G4double QX3exp = 2.27265548208155028766E-1
 
const G4double QX4exp = 2.00000000000000000009E0
 

Function Documentation

◆ fpfloor() [1/2]

G4double G4ExpConsts::fpfloor ( const G4double  x)
inline

A vectorisable floor implementation, not only triggered by fast-math. These functions do not distinguish between -0.0 and 0.0, so are not IEC6509 compliant for argument -0.0

Definition at line 153 of file G4Exp.hh.

154 {
155 // no problem since exp is defined between -708 and 708. Int is enough for
156 // it!
157 int32_t ret = int32_t(x);
158 ret -= (sp2uint32(x) >> 31);
159 return ret;
160 }
uint32_t sp2uint32(G4float x)
Definition: G4Exp.hh:140

References sp2uint32().

Referenced by G4Exp(), and G4Expf().

◆ fpfloor() [2/2]

G4float G4ExpConsts::fpfloor ( const G4float  x)
inline

A vectorisable floor implementation, not only triggered by fast-math. These functions do not distinguish between -0.0 and 0.0, so are not IEC6509 compliant for argument -0.0

Definition at line 168 of file G4Exp.hh.

169 {
170 int32_t ret = int32_t(x);
171 ret -= (sp2uint32(x) >> 31);
172 return ret;
173 }

References sp2uint32().

◆ sp2uint32()

uint32_t G4ExpConsts::sp2uint32 ( G4float  x)
inline

Definition at line 140 of file G4Exp.hh.

141 {
142 ieee754 tmp;
143 tmp.f[0] = x;
144 return tmp.i[0];
145 }
uint32_t i[2]
Definition: G4Exp.hh:112
G4float f[2]
Definition: G4Exp.hh:111

References G4ExpConsts::ieee754::f, and G4ExpConsts::ieee754::i.

Referenced by fpfloor().

◆ uint322sp()

G4float G4ExpConsts::uint322sp ( G4int  x)
inline

Definition at line 130 of file G4Exp.hh.

131 {
132 ieee754 tmp;
133 tmp.i[0] = x;
134 return tmp.f[0];
135 }

References G4ExpConsts::ieee754::f, and G4ExpConsts::ieee754::i.

Referenced by G4Expf().

◆ uint642dp()

G4double G4ExpConsts::uint642dp ( uint64_t  ll)
inline

Definition at line 120 of file G4Exp.hh.

121 {
122 ieee754 tmp;
123 tmp.ll = ll;
124 return tmp.d;
125 }

References G4ExpConsts::ieee754::d, and G4ExpConsts::ieee754::ll.

Referenced by G4Exp().

Variable Documentation

◆ C1F

const G4float G4ExpConsts::C1F = 0.693359375f

Definition at line 87 of file G4Exp.hh.

Referenced by G4Expf().

◆ C2F

const G4float G4ExpConsts::C2F = -2.12194440e-4f

Definition at line 88 of file G4Exp.hh.

Referenced by G4Expf().

◆ EXP_LIMIT

const G4double G4ExpConsts::EXP_LIMIT = 708

Definition at line 72 of file G4Exp.hh.

Referenced by G4Exp().

◆ LOG2E

const G4double G4ExpConsts::LOG2E = 1.4426950408889634073599

Definition at line 82 of file G4Exp.hh.

Referenced by G4Exp().

◆ LOG2EF

const G4float G4ExpConsts::LOG2EF = 1.44269504088896341f

Definition at line 97 of file G4Exp.hh.

Referenced by G4Expf().

◆ MAXLOGF

const G4float G4ExpConsts::MAXLOGF = 88.72283905206835f

Definition at line 84 of file G4Exp.hh.

Referenced by G4Expf().

◆ MINLOGF

const G4float G4ExpConsts::MINLOGF = -88.f

Definition at line 85 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX1exp

const G4double G4ExpConsts::PX1exp = 1.26177193074810590878E-4

Definition at line 74 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX1expf

const G4float G4ExpConsts::PX1expf = 1.9875691500E-4f

Definition at line 90 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX2exp

const G4double G4ExpConsts::PX2exp = 3.02994407707441961300E-2

Definition at line 75 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX2expf

const G4float G4ExpConsts::PX2expf = 1.3981999507E-3f

Definition at line 91 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX3exp

const G4double G4ExpConsts::PX3exp = 9.99999999999999999910E-1

Definition at line 76 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX3expf

const G4float G4ExpConsts::PX3expf = 8.3334519073E-3f

Definition at line 92 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX4expf

const G4float G4ExpConsts::PX4expf = 4.1665795894E-2f

Definition at line 93 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX5expf

const G4float G4ExpConsts::PX5expf = 1.6666665459E-1f

Definition at line 94 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX6expf

const G4float G4ExpConsts::PX6expf = 5.0000001201E-1f

Definition at line 95 of file G4Exp.hh.

Referenced by G4Expf().

◆ QX1exp

const G4double G4ExpConsts::QX1exp = 3.00198505138664455042E-6

Definition at line 77 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX2exp

const G4double G4ExpConsts::QX2exp = 2.52448340349684104192E-3

Definition at line 78 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX3exp

const G4double G4ExpConsts::QX3exp = 2.27265548208155028766E-1

Definition at line 79 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX4exp

const G4double G4ExpConsts::QX4exp = 2.00000000000000000009E0

Definition at line 80 of file G4Exp.hh.

Referenced by G4Exp().