\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, 2 \cdot y, y \cdot y\right)\right)double f(double x, double y) {
double r27031663 = x;
double r27031664 = y;
double r27031665 = r27031663 + r27031664;
double r27031666 = r27031665 * r27031665;
return r27031666;
}
double f(double x, double y) {
double r27031667 = x;
double r27031668 = 2.0;
double r27031669 = y;
double r27031670 = r27031668 * r27031669;
double r27031671 = r27031669 * r27031669;
double r27031672 = fma(r27031667, r27031670, r27031671);
double r27031673 = fma(r27031667, r27031667, r27031672);
return r27031673;
}




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
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)))