x \cdot e^{y \cdot y}
\begin{array}{l}
t_0 := \left(y \cdot y\right) \cdot \sqrt[3]{x}\\
0.16666666666666666 \cdot \left(\mathsf{fma}\left(t_0, {t_0}^{2}, -0 \cdot x\right) + \mathsf{fma}\left(0, x, 0 \cdot x\right)\right) + \left({y}^{2} \cdot x + \left(0.5 \cdot \left({y}^{4} \cdot x\right) + x\right)\right)
\end{array}
(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (* y y) (cbrt x))))
(+
(*
0.16666666666666666
(+ (fma t_0 (pow t_0 2.0) (- (* 0.0 x))) (fma 0.0 x (* 0.0 x))))
(+ (* (pow y 2.0) x) (+ (* 0.5 (* (pow y 4.0) x)) x)))))double code(double x, double y) {
return x * exp((y * y));
}
double code(double x, double y) {
double t_0 = (y * y) * cbrt(x);
return (0.16666666666666666 * (fma(t_0, pow(t_0, 2.0), -(0.0 * x)) + fma(0.0, x, (0.0 * x)))) + ((pow(y, 2.0) * x) + ((0.5 * (pow(y, 4.0) * x)) + x));
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.3 |
Initial program 0.0
Taylor expanded in y around 0 0.3
Applied egg-rr0.3
Final simplification0.3
herbie shell --seed 2022127
(FPCore (x y)
:name "Data.Number.Erf:$dmerfcx from erf-2.0.0.0"
:precision binary64
:herbie-target
(* x (pow (exp y) y))
(* x (exp (* y y))))