\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}}{x + y} \cdot \frac{x}{x + y}double f(double x, double y) {
double r484013 = x;
double r484014 = y;
double r484015 = r484013 * r484014;
double r484016 = r484013 + r484014;
double r484017 = r484016 * r484016;
double r484018 = 1.0;
double r484019 = r484016 + r484018;
double r484020 = r484017 * r484019;
double r484021 = r484015 / r484020;
return r484021;
}
double f(double x, double y) {
double r484022 = y;
double r484023 = x;
double r484024 = r484023 + r484022;
double r484025 = 1.0;
double r484026 = r484024 + r484025;
double r484027 = r484022 / r484026;
double r484028 = r484027 / r484024;
double r484029 = r484023 / r484024;
double r484030 = r484028 * r484029;
return r484030;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac8.0
rmApplied *-un-lft-identity8.0
Applied times-frac0.2
rmApplied associate-*l*0.2
Simplified0.2
rmApplied associate-*r*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020047
(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))))