x \cdot \left(1 + y \cdot y\right)
x \cdot 1 + y \cdot \left(y \cdot x\right)
double f(double x, double y) {
double r357160 = x;
double r357161 = 1.0;
double r357162 = y;
double r357163 = r357162 * r357162;
double r357164 = r357161 + r357163;
double r357165 = r357160 * r357164;
return r357165;
}
double f(double x, double y) {
double r357166 = x;
double r357167 = 1.0;
double r357168 = r357166 * r357167;
double r357169 = y;
double r357170 = r357169 * r357166;
double r357171 = r357169 * r357170;
double r357172 = r357168 + r357171;
return r357172;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.7
rmApplied distribute-lft-in5.7
Simplified5.7
rmApplied associate-*l*0.1
Final simplification0.1
herbie shell --seed 2019305
(FPCore (x y)
:name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
:precision binary64
:herbie-target
(+ x (* (* x y) y))
(* x (+ 1 (* y y))))