\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{1}{\frac{x + y}{x}} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r682633 = x;
double r682634 = y;
double r682635 = r682633 * r682634;
double r682636 = r682633 + r682634;
double r682637 = r682636 * r682636;
double r682638 = 1.0;
double r682639 = r682636 + r682638;
double r682640 = r682637 * r682639;
double r682641 = r682635 / r682640;
return r682641;
}
double f(double x, double y) {
double r682642 = 1.0;
double r682643 = x;
double r682644 = y;
double r682645 = r682643 + r682644;
double r682646 = r682645 / r682643;
double r682647 = r682642 / r682646;
double r682648 = 1.0;
double r682649 = r682645 + r682648;
double r682650 = r682644 / r682649;
double r682651 = r682647 * r682650;
double r682652 = r682651 / r682645;
return r682652;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.8
rmApplied times-frac7.5
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied clear-num0.1
Final simplification0.1
herbie shell --seed 2019353
(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))))