\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}}{x + y}double f(double x, double y) {
double r442970 = x;
double r442971 = y;
double r442972 = r442970 * r442971;
double r442973 = r442970 + r442971;
double r442974 = r442973 * r442973;
double r442975 = 1.0;
double r442976 = r442973 + r442975;
double r442977 = r442974 * r442976;
double r442978 = r442972 / r442977;
return r442978;
}
double f(double x, double y) {
double r442979 = x;
double r442980 = y;
double r442981 = r442979 + r442980;
double r442982 = 1.0;
double r442983 = r442981 + r442982;
double r442984 = r442980 / r442983;
double r442985 = r442984 / r442981;
double r442986 = r442979 * r442985;
double r442987 = r442986 / r442981;
return r442987;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.4
rmApplied times-frac7.3
rmApplied associate-/r*0.1
rmApplied associate-*l/0.1
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020035 +o rules:numerics
(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))))