\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x, x, 2 \cdot \left(x \cdot y\right) + y \cdot y\right)double f(double x, double y) {
double r341825 = x;
double r341826 = y;
double r341827 = r341825 + r341826;
double r341828 = r341827 * r341827;
return r341828;
}
double f(double x, double y) {
double r341829 = x;
double r341830 = 2.0;
double r341831 = y;
double r341832 = r341829 * r341831;
double r341833 = r341830 * r341832;
double r341834 = r341831 * r341831;
double r341835 = r341833 + r341834;
double r341836 = fma(r341829, r341829, r341835);
return r341836;
}




Bits error versus x




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