\left(\left(x \cdot 3\right) \cdot y\right) \cdot y
\left(\left(x \cdot y\right) \cdot y\right) \cdot 3
double f(double x, double y) {
double r985116 = x;
double r985117 = 3.0;
double r985118 = r985116 * r985117;
double r985119 = y;
double r985120 = r985118 * r985119;
double r985121 = r985120 * r985119;
return r985121;
}
double f(double x, double y) {
double r985122 = x;
double r985123 = y;
double r985124 = r985122 * r985123;
double r985125 = r985124 * r985123;
double r985126 = 3.0;
double r985127 = r985125 * r985126;
return r985127;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
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
rmApplied unpow-prod-down0.2
Applied associate-*l*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019350 +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))