x \cdot \left(1 + y \cdot y\right)
x \cdot 1 + \left(x \cdot y\right) \cdot y
double f(double x, double y) {
double r564959 = x;
double r564960 = 1.0;
double r564961 = y;
double r564962 = r564961 * r564961;
double r564963 = r564960 + r564962;
double r564964 = r564959 * r564963;
return r564964;
}
double f(double x, double y) {
double r564965 = x;
double r564966 = 1.0;
double r564967 = r564965 * r564966;
double r564968 = y;
double r564969 = r564965 * r564968;
double r564970 = r564969 * r564968;
double r564971 = r564967 + r564970;
return r564971;
}




Bits error versus x




Bits error versus y
Results
| Original | 5.3 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.3
rmApplied distribute-lft-in5.3
Simplified5.3
rmApplied pow15.3
Applied pow15.3
Applied pow15.3
Applied pow-prod-down5.3
Applied pow-prod-down5.3
Simplified0.1
Final simplification0.1
herbie shell --seed 2020042 +o rules:numerics
(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))))