\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}}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r505198 = x;
double r505199 = y;
double r505200 = r505198 * r505199;
double r505201 = r505198 + r505199;
double r505202 = r505201 * r505201;
double r505203 = 1.0;
double r505204 = r505201 + r505203;
double r505205 = r505202 * r505204;
double r505206 = r505200 / r505205;
return r505206;
}
double f(double x, double y) {
double r505207 = x;
double r505208 = y;
double r505209 = r505207 + r505208;
double r505210 = r505207 / r505209;
double r505211 = r505210 / r505209;
double r505212 = 1.0;
double r505213 = r505209 + r505212;
double r505214 = r505208 / r505213;
double r505215 = r505211 * r505214;
return r505215;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.9
rmApplied times-frac7.9
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020021
(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))))