\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 r280373 = x;
double r280374 = y;
double r280375 = r280373 * r280374;
double r280376 = r280373 + r280374;
double r280377 = r280376 * r280376;
double r280378 = 1.0;
double r280379 = r280376 + r280378;
double r280380 = r280377 * r280379;
double r280381 = r280375 / r280380;
return r280381;
}
double f(double x, double y) {
double r280382 = x;
double r280383 = y;
double r280384 = r280382 + r280383;
double r280385 = r280382 / r280384;
double r280386 = 1.0;
double r280387 = r280384 + r280386;
double r280388 = r280383 / r280387;
double r280389 = r280385 * r280388;
double r280390 = r280389 / r280384;
return r280390;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.1
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019304 +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))))