\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x, x, \mathsf{fma}\left(2, x \cdot y, y \cdot y\right)\right)double f(double x, double y) {
double r392597 = x;
double r392598 = y;
double r392599 = r392597 + r392598;
double r392600 = r392599 * r392599;
return r392600;
}
double f(double x, double y) {
double r392601 = x;
double r392602 = 2.0;
double r392603 = y;
double r392604 = r392601 * r392603;
double r392605 = r392603 * r392603;
double r392606 = fma(r392602, r392604, r392605);
double r392607 = fma(r392601, r392601, r392606);
return r392607;
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied distribute-lft-in0.0
Simplified0.0
Simplified0.0
rmApplied fma-def0.0
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
:name "Examples.Basics.BasicTests:f3 from sbv-4.4"
:herbie-target
(+ (* x x) (+ (* y y) (* 2.0 (* y x))))
(* (+ x y) (+ x y)))