\left(\left(x \cdot 3\right) \cdot x\right) \cdot y
\left(x \cdot \left(x \cdot y\right)\right) \cdot 3
double f(double x, double y) {
double r32036743 = x;
double r32036744 = 3.0;
double r32036745 = r32036743 * r32036744;
double r32036746 = r32036745 * r32036743;
double r32036747 = y;
double r32036748 = r32036746 * r32036747;
return r32036748;
}
double f(double x, double y) {
double r32036749 = x;
double r32036750 = y;
double r32036751 = r32036749 * r32036750;
double r32036752 = r32036749 * r32036751;
double r32036753 = 3.0;
double r32036754 = r32036752 * r32036753;
return r32036754;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.1 |
|---|---|
| Target | 0.2 |
| Herbie | 0.3 |
Initial program 10.1
rmApplied associate-*l*0.2
Taylor expanded around 0 10.1
Simplified0.3
rmApplied associate-*l*0.3
rmApplied associate-*l*0.3
Final simplification0.3
herbie shell --seed 2019179 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Segment:$catParam from diagrams-lib-1.3.0.3, A"
:herbie-target
(* (* x 3.0) (* x y))
(* (* (* x 3.0) x) y))