\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 r611424 = x;
double r611425 = y;
double r611426 = r611424 * r611425;
double r611427 = r611424 + r611425;
double r611428 = r611427 * r611427;
double r611429 = 1.0;
double r611430 = r611427 + r611429;
double r611431 = r611428 * r611430;
double r611432 = r611426 / r611431;
return r611432;
}
double f(double x, double y) {
double r611433 = x;
double r611434 = y;
double r611435 = r611433 + r611434;
double r611436 = r611433 / r611435;
double r611437 = 1.0;
double r611438 = r611435 + r611437;
double r611439 = r611434 / r611438;
double r611440 = r611436 * r611439;
double r611441 = r611440 / r611435;
return r611441;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 20.2
rmApplied times-frac8.0
rmApplied *-un-lft-identity8.0
Applied times-frac0.2
Applied associate-*l*0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020100 +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))))