\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}}{y + x} \cdot \frac{1}{\frac{\left(y + x\right) + 1}{y}}double f(double x, double y) {
double r21579994 = x;
double r21579995 = y;
double r21579996 = r21579994 * r21579995;
double r21579997 = r21579994 + r21579995;
double r21579998 = r21579997 * r21579997;
double r21579999 = 1.0;
double r21580000 = r21579997 + r21579999;
double r21580001 = r21579998 * r21580000;
double r21580002 = r21579996 / r21580001;
return r21580002;
}
double f(double x, double y) {
double r21580003 = x;
double r21580004 = y;
double r21580005 = r21580004 + r21580003;
double r21580006 = r21580003 / r21580005;
double r21580007 = r21580006 / r21580005;
double r21580008 = 1.0;
double r21580009 = 1.0;
double r21580010 = r21580005 + r21580009;
double r21580011 = r21580010 / r21580004;
double r21580012 = r21580008 / r21580011;
double r21580013 = r21580007 * r21580012;
return r21580013;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.5
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2019170
(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))))