43 double re = -z.real() * z.real() + z.imag() * z.imag();
44 double im = -2. * z.real() * z.imag();
46 return (z.real() >= 0.) ? (std::complex<double>(re, im) *
faddeeva(std::complex<double>(-z.imag(), z.real())))
47 : (2. - std::complex<double>(re, im) *
faddeeva(std::complex<double>(z.imag(), -z.real())));
52 double re = -z.real() * z.real() + z.imag() * z.imag();
53 double im = -2. * z.real() * z.imag();
55 return (z.real() >= 0.)
56 ? (std::complex<double>(re, im) *
faddeeva_fast(std::complex<double>(-z.imag(), z.real())))
57 : (2. - std::complex<double>(re, im) *
faddeeva_fast(std::complex<double>(z.imag(), -z.real())));
62 double re = -z.real() * z.real() + z.imag() * z.imag();
63 double im = -2. * z.real() * z.imag();
65 return (z.real() >= 0.) ? (1. - std::complex<double>(re, im) *
faddeeva(std::complex<double>(-z.imag(), z.real())))
66 : (std::complex<double>(re, im) *
faddeeva(std::complex<double>(z.imag(), -z.real())) - 1.);
71 double re = -z.real() * z.real() + z.imag() * z.imag();
72 double im = -2. * z.real() * z.imag();
74 return (z.real() >= 0.)
75 ? (1. - std::complex<double>(re, im) *
faddeeva_fast(std::complex<double>(-z.imag(), z.real())))
76 : (std::complex<double>(re, im) *
faddeeva_fast(std::complex<double>(z.imag(), -z.real())) - 1.);
84 static Double_t itod[20] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
85 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0};
91 for (i = 1; i <=
n; i++) {
92 if ((dift = fabs(
x - itod[i - 1])) < dif) {
101 for (
m = 1;
m <
n;
m++) {
102 for (i = 1; i <=
n -
m; i++) {
103 den = (
c[i + 1] -
d[i]) / itod[
m];
104 d[i] = (
x - itod[i +
m - 1]) * den;
105 c[i] = (
x - itod[i - 1]) * den;
107 dy = (2 * ns) < (
n -
m) ?
c[ns + 1] :
d[ns--];
121 Double_t den, dif, dift, ho, hp, w,
y, dy;
124 dif = fabs(
x - xa[0]);
125 for (i = 1; i <=
n; i++) {
126 if ((dift = fabs(
x - xa[i - 1])) < dif) {
135 for (
m = 1;
m <
n;
m++) {
136 for (i = 1; i <=
n -
m; i++) {
138 hp = xa[i - 1 +
m] -
x;
142 std::cerr <<
"In " << __func__ <<
"(), " << __FILE__ <<
":" << __LINE__
143 <<
": Zero distance between points not allowed." << std::endl;
150 dy = (2 * ns) < (
n -
m) ?
c[ns + 1] :
d[ns--];
static std::complex< double > erfc(const std::complex< double > z)
complex erfc function
static std::complex< double > erf(const std::complex< double > z)
complex erf function
static std::complex< double > faddeeva(std::complex< double > z)
evaluate Faddeeva function for complex argument
static std::complex< double > faddeeva_fast(std::complex< double > z)
evaluate Faddeeva function for complex argument (fast version)
static std::complex< double > erfc_fast(const std::complex< double > z)
complex erfc function (fast version)
static std::complex< double > erf_fast(const std::complex< double > z)
complex erf function (fast version)
static Double_t interpolate(Double_t yArr[], Int_t nOrder, Double_t x)
__roodevice__ __roohost__ std::complex< double > faddeeva(std::complex< double > z)
__roodevice__ __roohost__ std::complex< double > faddeeva_fast(std::complex< double > z)
__roodevice__ static __roohost__ void cexp(double &re, double &im)