\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\begin{array}{l}
\mathbf{if}\;x \leq -4.230496892314292 \cdot 10^{+47} \lor \neg \left(x \leq 656.9668403360257\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{e^{x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{x}}{\sqrt[3]{x + y}}\right)}^{x}}{x}\\
\end{array}(FPCore (x y) :precision binary64 (/ (exp (* x (log (/ x (+ x y))))) x))
(FPCore (x y)
:precision binary64
(if (or (<= x -4.230496892314292e+47) (not (<= x 656.9668403360257)))
(/ (exp (- y)) x)
(/
(*
(exp (* x (* 2.0 (log (/ (cbrt x) (cbrt (+ x y)))))))
(pow (/ (cbrt x) (cbrt (+ x y))) 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 (((x <= -4.230496892314292e+47) || !(x <= 656.9668403360257))) {
tmp = (((double) exp(((double) -(y)))) / x);
} else {
tmp = (((double) (((double) exp(((double) (x * ((double) (2.0 * ((double) log((((double) cbrt(x)) / ((double) cbrt(((double) (x + y))))))))))))) * ((double) pow((((double) cbrt(x)) / ((double) cbrt(((double) (x + y))))), x)))) / x);
}
return tmp;
}




Bits error versus x




Bits error versus y
Results
| Original | 11.5 |
|---|---|
| Target | 8.2 |
| Herbie | 0.1 |
if x < -4.23049689231429229e47 or 656.966840336025712 < x Initial program 12.0
Simplified12.0
Taylor expanded around inf 0.0
if -4.23049689231429229e47 < x < 656.966840336025712Initial program 11.0
Simplified11.0
rmApplied add-cube-cbrt_binary6413.3
Applied add-cube-cbrt_binary6411.0
Applied times-frac_binary6411.0
Applied unpow-prod-down_binary641.9
rmApplied add-exp-log_binary6434.1
Applied add-exp-log_binary6434.1
Applied prod-exp_binary6434.1
Applied add-exp-log_binary6434.1
Applied add-exp-log_binary6434.1
Applied prod-exp_binary6434.1
Applied div-exp_binary6434.1
Applied pow-exp_binary6433.3
Simplified0.2
Final simplification0.1
herbie shell --seed 2020210
(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))