\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;y \leq 124.59949045110731:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\mathbf{elif}\;y \leq 2.5779544643503928 \cdot 10^{+94}:\\
\;\;\;\;\frac{{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \frac{\sqrt[3]{x}}{y + x}\right)}^{x}}{x}\\
\mathbf{elif}\;y \leq 1.0720527371918883 \cdot 10^{+168}:\\
\;\;\;\;\frac{{\left(\frac{1}{\sqrt[3]{y + x} \cdot \sqrt[3]{y + x}} \cdot \frac{x}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{y + x}}\right)}^{x}}{x}\\
\end{array}(FPCore (x y) :precision binary64 (/ (exp (* x (log (/ x (+ x y))))) x))
(FPCore (x y)
:precision binary64
(if (<= y 124.59949045110731)
(/
(*
(exp (* x (* 2.0 (log (/ (cbrt x) (cbrt (+ y x)))))))
(pow (/ (cbrt x) (cbrt (+ y x))) x))
x)
(if (<= y 2.5779544643503928e+94)
(/ (pow (* (* (cbrt x) (cbrt x)) (/ (cbrt x) (+ y x))) x) x)
(if (<= y 1.0720527371918883e+168)
(/
(pow
(* (/ 1.0 (* (cbrt (+ y x)) (cbrt (+ y x)))) (/ x (cbrt (+ y x))))
x)
x)
(/
(*
(exp (* x (* 2.0 (log (/ (cbrt x) (cbrt (+ y x)))))))
(pow (/ (cbrt x) (cbrt (+ y x))) x))
x)))))double code(double x, double y) {
return (((double) exp(((double) (x * ((double) log((x / ((double) (x + y))))))))) / x);
}
double code(double x, double y) {
double tmp;
if ((y <= 124.59949045110731)) {
tmp = (((double) (((double) exp(((double) (x * ((double) (2.0 * ((double) log((((double) cbrt(x)) / ((double) cbrt(((double) (y + x))))))))))))) * ((double) pow((((double) cbrt(x)) / ((double) cbrt(((double) (y + x))))), x)))) / x);
} else {
double tmp_1;
if ((y <= 2.5779544643503928e+94)) {
tmp_1 = (((double) pow(((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) * (((double) cbrt(x)) / ((double) (y + x))))), x)) / x);
} else {
double tmp_2;
if ((y <= 1.0720527371918883e+168)) {
tmp_2 = (((double) pow(((double) ((1.0 / ((double) (((double) cbrt(((double) (y + x)))) * ((double) cbrt(((double) (y + x))))))) * (x / ((double) cbrt(((double) (y + x))))))), x)) / x);
} else {
tmp_2 = (((double) (((double) exp(((double) (x * ((double) (2.0 * ((double) log((((double) cbrt(x)) / ((double) cbrt(((double) (y + x))))))))))))) * ((double) pow((((double) cbrt(x)) / ((double) cbrt(((double) (y + x))))), x)))) / x);
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y
Results
| Original | 10.7 |
|---|---|
| Target | 7.6 |
| Herbie | 4.7 |
if y < 124.599490451107314 or 1.0720527371918883e168 < y Initial program Error: 6.8 bits
SimplifiedError: 6.8 bits
rmApplied add-cube-cbrtError: 28.7 bits
Applied add-cube-cbrtError: 6.8 bits
Applied times-fracError: 6.8 bits
Applied unpow-prod-downError: 2.8 bits
rmApplied add-exp-logError: 47.1 bits
Applied add-exp-logError: 47.1 bits
Applied prod-expError: 47.3 bits
Applied add-exp-logError: 47.2 bits
Applied add-exp-logError: 41.0 bits
Applied prod-expError: 34.1 bits
Applied div-expError: 34.1 bits
Applied pow-expError: 33.5 bits
SimplifiedError: 1.7 bits
if 124.599490451107314 < y < 2.5779544643503928e94Initial program Error: 37.4 bits
SimplifiedError: 37.4 bits
rmApplied *-un-lft-identityError: 37.4 bits
Applied add-cube-cbrtError: 23.4 bits
Applied times-fracError: 23.4 bits
SimplifiedError: 23.4 bits
if 2.5779544643503928e94 < y < 1.0720527371918883e168Initial program Error: 32.2 bits
SimplifiedError: 32.2 bits
rmApplied add-cube-cbrtError: 23.2 bits
Applied *-un-lft-identityError: 23.2 bits
Applied times-fracError: 23.5 bits
Final simplificationError: 4.7 bits
herbie shell --seed 2020205
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, F"
:precision binary64
:herbie-target
(if (< y -3.7311844206647956e+94) (/ (exp (/ -1.0 y)) x) (if (< y 2.817959242728288e+37) (/ (pow (/ x (+ y x)) x) x) (if (< y 2.347387415166998e+178) (log (exp (/ (pow (/ x (+ y x)) x) x))) (/ (exp (/ -1.0 y)) x))))
(/ (exp (* x (log (/ x (+ x y))))) x))