\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(x \cdot y\right) \cdot 3\right) \cdot y
double f(double x, double y) {
double r996571 = x;
double r996572 = 3.0;
double r996573 = r996571 * r996572;
double r996574 = y;
double r996575 = r996573 * r996574;
double r996576 = r996575 * r996574;
return r996576;
}
double f(double x, double y) {
double r996577 = x;
double r996578 = y;
double r996579 = r996577 * r996578;
double r996580 = 3.0;
double r996581 = r996579 * r996580;
double r996582 = r996581 * r996578;
return r996582;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied pow10.3
Applied pow10.3
Applied pow10.3
Applied pow-prod-down0.3
Applied pow-prod-down0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2020042
(FPCore (x y)
:name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(* (* x (* 3 y)) y)
(* (* (* x 3) y) y))