\left(x + y\right) \cdot \left(x + y\right)
\mathsf{fma}\left(x, x, \left(x \cdot 2\right) \cdot y + y \cdot y\right)double f(double x, double y) {
double r615166 = x;
double r615167 = y;
double r615168 = r615166 + r615167;
double r615169 = r615168 * r615168;
return r615169;
}
double f(double x, double y) {
double r615170 = x;
double r615171 = 2.0;
double r615172 = r615170 * r615171;
double r615173 = y;
double r615174 = r615172 * r615173;
double r615175 = r615173 * r615173;
double r615176 = r615174 + r615175;
double r615177 = fma(r615170, r615170, r615176);
return r615177;
}




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-rgt-in0.0
Final simplification0.0
herbie shell --seed 2019305 +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)))