\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 r523040 = x;
double r523041 = y;
double r523042 = r523040 * r523041;
double r523043 = r523040 + r523041;
double r523044 = r523043 * r523043;
double r523045 = 1.0;
double r523046 = r523043 + r523045;
double r523047 = r523044 * r523046;
double r523048 = r523042 / r523047;
return r523048;
}
double f(double x, double y) {
double r523049 = x;
double r523050 = y;
double r523051 = r523049 + r523050;
double r523052 = r523049 / r523051;
double r523053 = r523050 / r523051;
double r523054 = r523052 * r523053;
double r523055 = 1.0;
double r523056 = r523051 + r523055;
double r523057 = r523054 / r523056;
return r523057;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.9
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 2020081 +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))))