\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \le 0.003245411500442616295480924293315183604136:\\
\;\;\;\;\frac{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}double f(double x, double y) {
double r415918 = x;
double r415919 = y;
double r415920 = r415918 * r415919;
double r415921 = r415918 + r415919;
double r415922 = r415921 * r415921;
double r415923 = 1.0;
double r415924 = r415921 + r415923;
double r415925 = r415922 * r415924;
double r415926 = r415920 / r415925;
return r415926;
}
double f(double x, double y) {
double r415927 = x;
double r415928 = y;
double r415929 = r415927 * r415928;
double r415930 = r415927 + r415928;
double r415931 = r415930 * r415930;
double r415932 = 1.0;
double r415933 = r415930 + r415932;
double r415934 = r415931 * r415933;
double r415935 = r415929 / r415934;
double r415936 = 0.0032454115004426163;
bool r415937 = r415935 <= r415936;
double r415938 = r415927 * r415927;
double r415939 = 2.0;
double r415940 = r415939 * r415927;
double r415941 = r415940 + r415928;
double r415942 = r415928 * r415941;
double r415943 = r415938 + r415942;
double r415944 = r415927 / r415943;
double r415945 = r415928 / r415933;
double r415946 = r415944 * r415945;
double r415947 = 0.0;
double r415948 = r415937 ? r415946 : r415947;
return r415948;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 8.0 |
if (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))) < 0.0032454115004426163Initial program 10.1
Taylor expanded around 0 10.1
Simplified10.1
rmApplied times-frac2.0
if 0.0032454115004426163 < (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))) Initial program 63.4
Taylor expanded around inf 34.4
Final simplification8.0
herbie shell --seed 2019303
(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))))