\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 r508288 = x;
double r508289 = y;
double r508290 = r508288 + r508289;
double r508291 = r508290 * r508290;
return r508291;
}
double f(double x, double y) {
double r508292 = x;
double r508293 = 2.0;
double r508294 = y;
double r508295 = r508292 * r508294;
double r508296 = r508293 * r508295;
double r508297 = r508294 * r508294;
double r508298 = r508296 + r508297;
double r508299 = fma(r508292, r508292, r508298);
return r508299;
}




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