2 \cdot \left(x \cdot x + x \cdot y\right)
x \cdot \left(\left(x + y\right) \cdot 2\right)
double f(double x, double y) {
double r387127 = 2.0;
double r387128 = x;
double r387129 = r387128 * r387128;
double r387130 = y;
double r387131 = r387128 * r387130;
double r387132 = r387129 + r387131;
double r387133 = r387127 * r387132;
return r387133;
}
double f(double x, double y) {
double r387134 = x;
double r387135 = y;
double r387136 = r387134 + r387135;
double r387137 = 2.0;
double r387138 = r387136 * r387137;
double r387139 = r387134 * r387138;
return r387139;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
rmApplied pow10.0
Applied pow10.0
Applied pow10.0
Applied pow-prod-down0.0
Applied pow-prod-down0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019306 +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))))