x \cdot e^{y \cdot y}x \cdot {y}^{2} + \left(0.5 \cdot \left(x \cdot {y}^{4}\right) + \left(x + 0.16666666666666666 \cdot \left(x \cdot {y}^{6}\right)\right)\right)(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y) :precision binary64 (+ (* x (pow y 2.0)) (+ (* 0.5 (* x (pow y 4.0))) (+ x (* 0.16666666666666666 (* x (pow y 6.0)))))))
double code(double x, double y) {
return x * exp(y * y);
}
double code(double x, double y) {
return (x * pow(y, 2.0)) + ((0.5 * (x * pow(y, 4.0))) + (x + (0.16666666666666666 * (x * pow(y, 6.0)))));
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.4 |
Initial program 0.0
Taylor expanded around 0 0.4
Final simplification0.4
herbie shell --seed 2021060
(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))))