\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}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r278958 = x;
double r278959 = y;
double r278960 = r278958 * r278959;
double r278961 = r278958 + r278959;
double r278962 = r278961 * r278961;
double r278963 = 1.0;
double r278964 = r278961 + r278963;
double r278965 = r278962 * r278964;
double r278966 = r278960 / r278965;
return r278966;
}
double f(double x, double y) {
double r278967 = x;
double r278968 = y;
double r278969 = r278967 + r278968;
double r278970 = r278967 / r278969;
double r278971 = 1.0;
double r278972 = r278969 + r278971;
double r278973 = r278968 / r278972;
double r278974 = r278970 * r278973;
double r278975 = r278974 / r278969;
return r278975;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.3 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.3
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019198 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))