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

Classes

union  ieee754
 

Functions

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

Variables

const G4double EXP_LIMIT = 708
 
const G4double PX1exp = 1.26177193074810590878E-4
 
const G4double PX2exp = 3.02994407707441961300E-2
 
const G4double PX3exp = 9.99999999999999999910E-1
 
const G4double QX1exp = 3.00198505138664455042E-6
 
const G4double QX2exp = 2.52448340349684104192E-3
 
const G4double QX3exp = 2.27265548208155028766E-1
 
const G4double QX4exp = 2.00000000000000000009E0
 
const G4double LOG2E = 1.4426950408889634073599
 
const G4float MAXLOGF = 88.72283905206835f
 
const G4float MINLOGF = -88.f
 
const G4float C1F = 0.693359375f
 
const G4float C2F = -2.12194440e-4f
 
const G4float PX1expf = 1.9875691500E-4f
 
const G4float PX2expf = 1.3981999507E-3f
 
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 G4float LOG2EF = 1.44269504088896341f
 

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 154 of file G4Exp.hh.

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

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 169 of file G4Exp.hh.

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

◆ sp2uint32()

uint32_t G4ExpConsts::sp2uint32 ( G4float x)
inline

Definition at line 141 of file G4Exp.hh.

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

Referenced by fpfloor(), and fpfloor().

◆ uint322sp()

G4float G4ExpConsts::uint322sp ( G4int x)
inline

Definition at line 131 of file G4Exp.hh.

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

Referenced by G4Expf().

◆ uint642dp()

G4double G4ExpConsts::uint642dp ( uint64_t ll)
inline

Definition at line 121 of file G4Exp.hh.

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

Referenced by G4Exp().

Variable Documentation

◆ C1F

const G4float G4ExpConsts::C1F = 0.693359375f

Definition at line 88 of file G4Exp.hh.

Referenced by G4Expf().

◆ C2F

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

Definition at line 89 of file G4Exp.hh.

Referenced by G4Expf().

◆ EXP_LIMIT

const G4double G4ExpConsts::EXP_LIMIT = 708

Definition at line 73 of file G4Exp.hh.

Referenced by G4Exp().

◆ LOG2E

const G4double G4ExpConsts::LOG2E = 1.4426950408889634073599

Definition at line 83 of file G4Exp.hh.

Referenced by G4Exp().

◆ LOG2EF

const G4float G4ExpConsts::LOG2EF = 1.44269504088896341f

Definition at line 98 of file G4Exp.hh.

Referenced by G4Expf().

◆ MAXLOGF

const G4float G4ExpConsts::MAXLOGF = 88.72283905206835f

Definition at line 85 of file G4Exp.hh.

Referenced by G4Expf().

◆ MINLOGF

const G4float G4ExpConsts::MINLOGF = -88.f

Definition at line 86 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX1exp

const G4double G4ExpConsts::PX1exp = 1.26177193074810590878E-4

Definition at line 75 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX1expf

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

Definition at line 91 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX2exp

const G4double G4ExpConsts::PX2exp = 3.02994407707441961300E-2

Definition at line 76 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX2expf

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

Definition at line 92 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX3exp

const G4double G4ExpConsts::PX3exp = 9.99999999999999999910E-1

Definition at line 77 of file G4Exp.hh.

Referenced by G4Exp().

◆ PX3expf

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

Definition at line 93 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX4expf

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

Definition at line 94 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX5expf

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

Definition at line 95 of file G4Exp.hh.

Referenced by G4Expf().

◆ PX6expf

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

Definition at line 96 of file G4Exp.hh.

Referenced by G4Expf().

◆ QX1exp

const G4double G4ExpConsts::QX1exp = 3.00198505138664455042E-6

Definition at line 78 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX2exp

const G4double G4ExpConsts::QX2exp = 2.52448340349684104192E-3

Definition at line 79 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX3exp

const G4double G4ExpConsts::QX3exp = 2.27265548208155028766E-1

Definition at line 80 of file G4Exp.hh.

Referenced by G4Exp().

◆ QX4exp

const G4double G4ExpConsts::QX4exp = 2.00000000000000000009E0

Definition at line 81 of file G4Exp.hh.

Referenced by G4Exp().