\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{y}{\left(x + y\right) + 1} \cdot x}{\left(x + y\right) \cdot \left(x + y\right)}double f(double x, double y) {
double r313060 = x;
double r313061 = y;
double r313062 = r313060 * r313061;
double r313063 = r313060 + r313061;
double r313064 = r313063 * r313063;
double r313065 = 1.0;
double r313066 = r313063 + r313065;
double r313067 = r313064 * r313066;
double r313068 = r313062 / r313067;
return r313068;
}
double f(double x, double y) {
double r313069 = y;
double r313070 = x;
double r313071 = r313070 + r313069;
double r313072 = 1.0;
double r313073 = r313071 + r313072;
double r313074 = r313069 / r313073;
double r313075 = r313074 * r313070;
double r313076 = r313071 * r313071;
double r313077 = r313075 / r313076;
return r313077;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 11.5 |
Initial program 20.0
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Final simplification11.5
herbie shell --seed 2019297
(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))))