\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{\frac{\frac{x}{y + x}}{\frac{\left(y + x\right) + 1}{y}}}{y + x}double f(double x, double y) {
double r27045857 = x;
double r27045858 = y;
double r27045859 = r27045857 * r27045858;
double r27045860 = r27045857 + r27045858;
double r27045861 = r27045860 * r27045860;
double r27045862 = 1.0;
double r27045863 = r27045860 + r27045862;
double r27045864 = r27045861 * r27045863;
double r27045865 = r27045859 / r27045864;
return r27045865;
}
double f(double x, double y) {
double r27045866 = x;
double r27045867 = y;
double r27045868 = r27045867 + r27045866;
double r27045869 = r27045866 / r27045868;
double r27045870 = 1.0;
double r27045871 = r27045868 + r27045870;
double r27045872 = r27045871 / r27045867;
double r27045873 = r27045869 / r27045872;
double r27045874 = r27045873 / r27045868;
return r27045874;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.1
rmApplied times-frac8.1
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
rmApplied associate-*r/0.1
Simplified0.2
Final simplification0.2
herbie shell --seed 2019171
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))