\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}
t_0 := \mathsf{hypot}\left(x + y, {\left(x + y\right)}^{1.5}\right)\\
\mathbf{if}\;x \leq -1.7172951296258227 \cdot 10^{+112}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{elif}\;x \leq -5.664768576413203 \cdot 10^{-146}:\\
\;\;\;\;\frac{y}{\frac{{\left(x + y\right)}^{3} + {\left(x + y\right)}^{2}}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t_0} \cdot \frac{y}{t_0}\\
\end{array}
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y)
:precision binary64
(let* ((t_0 (hypot (+ x y) (pow (+ x y) 1.5))))
(if (<= x -1.7172951296258227e+112)
(/ y (fma x x x))
(if (<= x -5.664768576413203e-146)
(/ y (/ (+ (pow (+ x y) 3.0) (pow (+ x y) 2.0)) x))
(* (/ 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 t_0 = hypot((x + y), pow((x + y), 1.5));
double tmp;
if (x <= -1.7172951296258227e+112) {
tmp = y / fma(x, x, x);
} else if (x <= -5.664768576413203e-146) {
tmp = y / ((pow((x + y), 3.0) + pow((x + y), 2.0)) / x);
} else {
tmp = (x / t_0) * (y / t_0);
}
return tmp;
}




Bits error versus x




Bits error versus y
| Original | 19.3 |
|---|---|
| Target | 0.1 |
| Herbie | 7.2 |
if x < -1.7172951296258227e112Initial program 25.5
Simplified25.5
Applied egg-rr54.9
Applied egg-rr54.9
Taylor expanded in x around inf 16.4
Simplified16.4
Taylor expanded in y around 0 10.6
Simplified10.6
if -1.7172951296258227e112 < x < -5.664768576413203e-146Initial program 10.1
Simplified10.0
Applied egg-rr4.6
Applied egg-rr4.7
if -5.664768576413203e-146 < x Initial program 22.3
Simplified22.3
Applied egg-rr6.8
Final simplification7.2
herbie shell --seed 2022130
(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))))