\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}{x + y} \cdot \left(\frac{1}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}\right)double f(double x, double y) {
double r429016 = x;
double r429017 = y;
double r429018 = r429016 * r429017;
double r429019 = r429016 + r429017;
double r429020 = r429019 * r429019;
double r429021 = 1.0;
double r429022 = r429019 + r429021;
double r429023 = r429020 * r429022;
double r429024 = r429018 / r429023;
return r429024;
}
double f(double x, double y) {
double r429025 = x;
double r429026 = y;
double r429027 = r429025 + r429026;
double r429028 = r429025 / r429027;
double r429029 = 1.0;
double r429030 = r429029 / r429027;
double r429031 = 1.0;
double r429032 = r429027 + r429031;
double r429033 = r429026 / r429032;
double r429034 = r429030 * r429033;
double r429035 = r429028 * r429034;
return r429035;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.7
rmApplied times-frac7.5
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Final simplification0.2
herbie shell --seed 2020001 +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))))