\left(\frac{1}{\sqrt{\pi}} \cdot e^{\left|x\right| \cdot \left|x\right|}\right) \cdot \left(\left(\left(\frac{1}{\left|x\right|} + \frac{1}{2} \cdot \left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{3}{4} \cdot \left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right) + \frac{15}{8} \cdot \left(\left(\left(\left(\left(\left(\frac{1}{\left|x\right|} \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right) \cdot \frac{1}{\left|x\right|}\right)\right)\frac{1}{\sqrt{\sqrt{\pi}}} \cdot \left(\frac{1 + \left(\frac{0.5 + \frac{0.75}{x \cdot x}}{x \cdot x} + \frac{1.875}{{x}^{6}}\right)}{x} \cdot \frac{{\left(e^{x}\right)}^{x}}{\sqrt{\sqrt{\pi}}}\right)(FPCore (x)
:precision binary64
(*
(* (/ 1.0 (sqrt PI)) (exp (* (fabs x) (fabs x))))
(+
(+
(+
(/ 1.0 (fabs x))
(*
(/ 1.0 2.0)
(* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))))
(*
(/ 3.0 4.0)
(*
(*
(* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))))
(*
(/ 15.0 8.0)
(*
(*
(*
(*
(* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))
(/ 1.0 (fabs x)))))))(FPCore (x) :precision binary64 (* (/ 1.0 (sqrt (sqrt PI))) (* (/ (+ 1.0 (+ (/ (+ 0.5 (/ 0.75 (* x x))) (* x x)) (/ 1.875 (pow x 6.0)))) x) (/ (pow (exp x) x) (sqrt (sqrt PI))))))
double code(double x) {
return ((1.0 / sqrt((double) M_PI)) * exp(fabs(x) * fabs(x))) * ((((1.0 / fabs(x)) + ((1.0 / 2.0) * (((1.0 / fabs(x)) * (1.0 / fabs(x))) * (1.0 / fabs(x))))) + ((3.0 / 4.0) * (((((1.0 / fabs(x)) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x))))) + ((15.0 / 8.0) * (((((((1.0 / fabs(x)) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x))) * (1.0 / fabs(x)))));
}
double code(double x) {
return (1.0 / sqrt(sqrt((double) M_PI))) * (((1.0 + (((0.5 + (0.75 / (x * x))) / (x * x)) + (1.875 / pow(x, 6.0)))) / x) * (pow(exp(x), x) / sqrt(sqrt((double) M_PI))));
}



Bits error versus x
Results
Initial program 2.9
Simplified2.7
rmApplied div-inv_binary642.7
Applied associate-*l*_binary642.7
Simplified2.7
rmApplied add-sqr-sqrt_binary642.7
Applied *-un-lft-identity_binary642.7
Applied times-frac_binary642.7
Applied associate-*l*_binary642.7
Simplified2.7
rmApplied add-log-exp_binary642.7
Applied exp-to-pow_binary641.2
Final simplification1.2
herbie shell --seed 2021173
(FPCore (x)
:name "Jmat.Real.erfi, branch x greater than or equal to 5"
:precision binary64
:pre (>= x 0.5)
(* (* (/ 1.0 (sqrt PI)) (exp (* (fabs x) (fabs x)))) (+ (+ (+ (/ 1.0 (fabs x)) (* (/ 1.0 2.0) (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))))) (* (/ 3.0 4.0) (* (* (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))))) (* (/ 15.0 8.0) (* (* (* (* (* (* (/ 1.0 (fabs x)) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x))) (/ 1.0 (fabs x)))))))