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 r433530 = 2.0;
double r433531 = x;
double r433532 = r433531 * r433531;
double r433533 = y;
double r433534 = r433531 * r433533;
double r433535 = r433532 + r433534;
double r433536 = r433530 * r433535;
return r433536;
}
double f(double x, double y) {
double r433537 = 2.0;
double r433538 = x;
double r433539 = y;
double r433540 = r433538 * r433539;
double r433541 = fma(r433538, r433538, r433540);
double r433542 = r433537 * r433541;
return r433542;
}




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