\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}\;x \leq -3.3388667508241876 \cdot 10^{+104}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -6.798182670312745 \cdot 10^{-244}:\\
\;\;\;\;\begin{array}{l}
t_0 := \sqrt[3]{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}\\
\frac{x \cdot \frac{y}{t_0}}{t_0 \cdot t_0}
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_1 := \mathsf{hypot}\left(x + y, {\left(x + y\right)}^{1.5}\right)\\
\frac{x}{t_1} \cdot \frac{y}{t_1}
\end{array}\\
\end{array}
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y)
:precision binary64
(if (<= x -3.3388667508241876e+104)
(/ y (* x x))
(if (<= x -6.798182670312745e-244)
(let* ((t_0 (cbrt (fma (+ x y) (+ x y) (pow (+ x y) 3.0)))))
(/ (* x (/ y t_0)) (* t_0 t_0)))
(let* ((t_1 (hypot (+ x y) (pow (+ x y) 1.5))))
(* (/ x t_1) (/ y t_1))))))double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
double code(double x, double y) {
double tmp;
if (x <= -3.3388667508241876e+104) {
tmp = y / (x * x);
} else if (x <= -6.798182670312745e-244) {
double t_0 = cbrt(fma((x + y), (x + y), pow((x + y), 3.0)));
tmp = (x * (y / t_0)) / (t_0 * t_0);
} else {
double t_1 = hypot((x + y), pow((x + y), 1.5));
tmp = (x / t_1) * (y / t_1);
}
return tmp;
}




Bits error versus x




Bits error versus y
| Original | 19.5 |
|---|---|
| Target | 0.1 |
| Herbie | 7.3 |
if x < -3.33886675082418757e104Initial program 25.5
Simplified25.5
Applied add-cube-cbrt_binary6425.5
Applied times-frac_binary6413.2
Taylor expanded in x around inf 9.9
Simplified9.9
if -3.33886675082418757e104 < x < -6.7981826703127447e-244Initial program 14.0
Simplified14.0
Applied add-cube-cbrt_binary6414.4
Applied times-frac_binary648.0
Applied associate-*l/_binary649.0
if -6.7981826703127447e-244 < x Initial program 21.1
Simplified21.1
Applied add-sqr-sqrt_binary6421.2
Applied times-frac_binary6412.2
Simplified12.2
Simplified2.7
Final simplification7.3
herbie shell --seed 2022088
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))