2 \cdot \left(x \cdot x + x \cdot y\right)
2 \cdot \mathsf{fma}\left(x, x, x \cdot y\right)double f(double x, double y) {
double r335299 = 2.0;
double r335300 = x;
double r335301 = r335300 * r335300;
double r335302 = y;
double r335303 = r335300 * r335302;
double r335304 = r335301 + r335303;
double r335305 = r335299 * r335304;
return r335305;
}
double f(double x, double y) {
double r335306 = 2.0;
double r335307 = x;
double r335308 = y;
double r335309 = r335307 * r335308;
double r335310 = fma(r335307, r335307, r335309);
double r335311 = r335306 * r335310;
return r335311;
}




Bits error versus x




Bits error versus y
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied fma-def0.0
Final simplification0.0
herbie shell --seed 2019305 +o rules:numerics
(FPCore (x y)
:name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"
:precision binary64
:herbie-target
(* (* x 2) (+ x y))
(* 2 (+ (* x x) (* x y))))