\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{\frac{x}{y + x}}{\frac{y + x}{y}}}{\left(x + y\right) + 1}double f(double x, double y) {
double r285814 = x;
double r285815 = y;
double r285816 = r285814 * r285815;
double r285817 = r285814 + r285815;
double r285818 = r285817 * r285817;
double r285819 = 1.0;
double r285820 = r285817 + r285819;
double r285821 = r285818 * r285820;
double r285822 = r285816 / r285821;
return r285822;
}
double f(double x, double y) {
double r285823 = x;
double r285824 = y;
double r285825 = r285824 + r285823;
double r285826 = r285823 / r285825;
double r285827 = r285825 / r285824;
double r285828 = r285826 / r285827;
double r285829 = r285823 + r285824;
double r285830 = 1.0;
double r285831 = r285829 + r285830;
double r285832 = r285828 / r285831;
return r285832;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 19.4
rmApplied times-frac7.8
rmApplied *-un-lft-identity7.8
Applied times-frac0.2
Applied associate-*l*0.2
rmApplied associate-*r/0.2
Applied associate-*r/0.2
Simplified0.1
rmApplied associate-/l*0.2
Final simplification0.2
herbie shell --seed 2019235 +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))))