x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le -5.528608899369224207630348298103310615572 \cdot 10^{60}:\\
\;\;\;\;x + \frac{e^{-z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)} \cdot {\left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}^{y}}{y}\\
\end{array}double f(double x, double y, double z) {
double r389066 = x;
double r389067 = y;
double r389068 = z;
double r389069 = r389068 + r389067;
double r389070 = r389067 / r389069;
double r389071 = log(r389070);
double r389072 = r389067 * r389071;
double r389073 = exp(r389072);
double r389074 = r389073 / r389067;
double r389075 = r389066 + r389074;
return r389075;
}
double f(double x, double y, double z) {
double r389076 = y;
double r389077 = -5.528608899369224e+60;
bool r389078 = r389076 <= r389077;
double r389079 = x;
double r389080 = z;
double r389081 = -r389080;
double r389082 = exp(r389081);
double r389083 = r389082 / r389076;
double r389084 = r389079 + r389083;
double r389085 = 2.0;
double r389086 = cbrt(r389076);
double r389087 = r389080 + r389076;
double r389088 = cbrt(r389087);
double r389089 = r389086 / r389088;
double r389090 = log(r389089);
double r389091 = r389085 * r389090;
double r389092 = r389076 * r389091;
double r389093 = exp(r389092);
double r389094 = pow(r389089, r389076);
double r389095 = r389093 * r389094;
double r389096 = r389095 / r389076;
double r389097 = r389079 + r389096;
double r389098 = r389078 ? r389084 : r389097;
return r389098;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.0 |
| Herbie | 0.6 |
if y < -5.528608899369224e+60Initial program 2.4
Simplified2.4
Taylor expanded around inf 0.1
if -5.528608899369224e+60 < y Initial program 6.9
Simplified6.9
rmApplied add-cube-cbrt15.0
Applied add-cube-cbrt6.9
Applied times-frac6.9
Applied unpow-prod-down1.9
rmApplied add-exp-log33.0
Applied add-exp-log33.0
Applied prod-exp33.1
Applied add-exp-log33.0
Applied add-exp-log27.9
Applied prod-exp22.8
Applied div-exp22.8
Applied pow-exp22.2
Simplified0.7
Final simplification0.6
herbie shell --seed 2019326
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157597908e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))