\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{x}{x + y} \cdot \frac{y}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r401860 = x;
double r401861 = y;
double r401862 = r401860 * r401861;
double r401863 = r401860 + r401861;
double r401864 = r401863 * r401863;
double r401865 = 1.0;
double r401866 = r401863 + r401865;
double r401867 = r401864 * r401866;
double r401868 = r401862 / r401867;
return r401868;
}
double f(double x, double y) {
double r401869 = x;
double r401870 = y;
double r401871 = r401869 + r401870;
double r401872 = r401869 / r401871;
double r401873 = r401870 / r401871;
double r401874 = r401872 * r401873;
double r401875 = 1.0;
double r401876 = r401871 + r401875;
double r401877 = r401874 / r401876;
return r401877;
}




Bits error versus x




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