x \cdot e^{y \cdot y}
\mathsf{fma}\left(y \cdot y, x, x\right)
(FPCore (x y) :precision binary64 (* x (exp (* y y))))
(FPCore (x y) :precision binary64 (fma (* y y) x x))
double code(double x, double y) {
return x * exp(y * y);
}
double code(double x, double y) {
return fma((y * y), x, x);
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.6 |
Initial program 0.0
Taylor expanded in y around 0 0.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2021313
(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))))