\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}{y + x}}{\frac{y + x}{\frac{y}{\left(y + x\right) + 1}}}double f(double x, double y) {
double r15461652 = x;
double r15461653 = y;
double r15461654 = r15461652 * r15461653;
double r15461655 = r15461652 + r15461653;
double r15461656 = r15461655 * r15461655;
double r15461657 = 1.0;
double r15461658 = r15461655 + r15461657;
double r15461659 = r15461656 * r15461658;
double r15461660 = r15461654 / r15461659;
return r15461660;
}
double f(double x, double y) {
double r15461661 = x;
double r15461662 = y;
double r15461663 = r15461662 + r15461661;
double r15461664 = r15461661 / r15461663;
double r15461665 = 1.0;
double r15461666 = r15461663 + r15461665;
double r15461667 = r15461662 / r15461666;
double r15461668 = r15461663 / r15461667;
double r15461669 = r15461664 / r15461668;
return r15461669;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.4 |
Initial program 20.2
rmApplied times-frac7.8
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied associate-/l*0.4
Final simplification0.4
herbie shell --seed 2019172 +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))))