CMS 3D CMS Logo

Functions
approx_erf.h File Reference
#include "DataFormats/Math/interface/approx_exp.h"

Go to the source code of this file.

Functions

constexpr float approx_erf (float x)
 

Function Documentation

◆ approx_erf()

constexpr float approx_erf ( float  x)
constexpr

Definition at line 5 of file approx_erf.h.

5  {
6  auto xx = std::min(std::abs(x), 5.f);
7  xx *= xx;
8  return std::copysign(std::sqrt(1.f - unsafe_expf<4>(-xx * (1.f + 0.2733f / (1.f + 0.147f * xx)))), x);
9  // return std::sqrt(1.f- std::exp(-x*x*(1.f+0.2733f/(1.f+0.147f*x*x)) ));
10 }

References funct::abs(), f, min(), mathSSE::sqrt(), genVertex_cff::x, and geometryCSVtoXML::xx.

Referenced by SiTrivialInduceChargeOnStrips::induceVector().

f
double f[11][100]
Definition: MuScleFitUtils.cc:78
min
T min(T a, T b)
Definition: MathUtil.h:58
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
genVertex_cff.x
x
Definition: genVertex_cff.py:12
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19