\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x + y, y, \left(x + y\right) \cdot x\right)double f(double x, double y) {
double r1404249 = x;
double r1404250 = y;
double r1404251 = r1404249 + r1404250;
double r1404252 = r1404251 * r1404251;
return r1404252;
}
double f(double x, double y) {
double r1404253 = x;
double r1404254 = y;
double r1404255 = r1404253 + r1404254;
double r1404256 = r1404255 * r1404253;
double r1404257 = fma(r1404255, r1404254, r1404256);
return r1404257;
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
rmApplied distribute-lft-in0.0
Simplified0.0
rmApplied fma-def0.0
Final simplification0.0
herbie shell --seed 2019194 +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)))