\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(y \cdot x\right) \cdot y\right) \cdot 3
double f(double x, double y) {
double r564532 = x;
double r564533 = 3.0;
double r564534 = r564532 * r564533;
double r564535 = y;
double r564536 = r564534 * r564535;
double r564537 = r564536 * r564535;
return r564537;
}
double f(double x, double y) {
double r564538 = y;
double r564539 = x;
double r564540 = r564538 * r564539;
double r564541 = r564540 * r564538;
double r564542 = 3.0;
double r564543 = r564541 * r564542;
return r564543;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 0.3
rmApplied pow10.3
Applied pow10.3
Applied pow10.3
Applied pow10.3
Applied pow-prod-down0.3
Applied pow-prod-down0.3
Applied pow-prod-down0.3
Simplified0.2
rmApplied associate-*r*0.3
Final simplification0.3
herbie shell --seed 2019209 +o rules:numerics
(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))