CMS 3D CMS Logo

Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/Math/interface/approx_erf.h File Reference

#include "DataFormats/Math/interface/approx_exp.h"

Go to the source code of this file.

Functions

float approx_erf (float x)

Function Documentation

float approx_erf ( float  x) [inline]

Definition at line 6 of file approx_erf.h.

References abs, f, min, and mathSSE::sqrt().

Referenced by SiTrivialInduceChargeOnStrips::induceVector().

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