\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 -5.4914158727222745 \cdot 10^{-164}:\\
\;\;\;\;\begin{array}{l}
t_0 := \sqrt[3]{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}\\
\left(x \cdot {t_0}^{-2}\right) \cdot \frac{y}{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 -5.4914158727222745e-164)
(let* ((t_0 (cbrt (fma (+ x y) (+ x y) (pow (+ x y) 3.0)))))
(* (* x (pow t_0 -2.0)) (/ y 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 <= -5.4914158727222745e-164) {
double t_0_1 = cbrt(fma((x + y), (x + y), pow((x + y), 3.0)));
tmp = (x * pow(t_0_1, -2.0)) * (y / t_0_1);
} 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 | 20.1 |
|---|---|
| Target | 0.1 |
| Herbie | 8.2 |
if x < -5.49141587272227448e-164Initial program 18.4
Simplified18.4
Applied add-cube-cbrt_binary6418.6
Applied times-frac_binary649.2
Applied div-inv_binary649.2
Applied pow1_binary649.2
Applied pow1_binary649.2
Applied pow-sqr_binary649.2
Applied pow-flip_binary649.2
if -5.49141587272227448e-164 < x Initial program 23.0
Simplified23.0
Applied add-sqr-sqrt_binary6423.0
Applied times-frac_binary6414.4
Simplified14.4
Simplified6.4
Final simplification8.2
herbie shell --seed 2022077
(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))))