\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 -2.446404973366963 \cdot 10^{-156}:\\
\;\;\;\;y \cdot \frac{x}{\mathsf{fma}\left(x + y, x + y, {\left(x + y\right)}^{3}\right)}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_0 := \mathsf{hypot}\left(x + y, {\left(x + y\right)}^{1.5}\right)\\
\frac{x}{t_0} \cdot \frac{y}{t_0}
\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 -2.446404973366963e-156) (* y (/ x (fma (+ x y) (+ x y) (pow (+ x y) 3.0)))) (let* ((t_0 (hypot (+ x y) (pow (+ x y) 1.5)))) (* (/ x t_0) (/ y t_0)))))
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 <= -2.446404973366963e-156) {
tmp = y * (x / fma((x + y), (x + y), pow((x + y), 3.0)));
} else {
double t_0 = hypot((x + y), pow((x + y), 1.5));
tmp = (x / t_0) * (y / t_0);
}
return tmp;
}




Bits error versus x




Bits error versus y
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 8.0 |
if x < -2.44640497336696324e-156Initial program 17.9
Simplified17.9
Applied associate-/l*_binary6410.0
Applied associate-/r/_binary649.1
if -2.44640497336696324e-156 < x Initial program 23.0
Simplified23.0
Applied add-sqr-sqrt_binary6423.0
Applied times-frac_binary6414.1
Simplified14.2
Simplified6.3
Final simplification8.0
herbie shell --seed 2022117
(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))))