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 r261271 = x;
double r261272 = y;
double r261273 = z;
double r261274 = r261273 + r261272;
double r261275 = r261272 / r261274;
double r261276 = log(r261275);
double r261277 = r261272 * r261276;
double r261278 = exp(r261277);
double r261279 = r261278 / r261272;
double r261280 = r261271 + r261279;
return r261280;
}
double f(double x, double y, double z) {
double r261281 = y;
double r261282 = -5.528608899369224e+60;
bool r261283 = r261281 <= r261282;
double r261284 = x;
double r261285 = z;
double r261286 = -r261285;
double r261287 = exp(r261286);
double r261288 = r261287 / r261281;
double r261289 = r261284 + r261288;
double r261290 = 2.0;
double r261291 = cbrt(r261281);
double r261292 = r261285 + r261281;
double r261293 = cbrt(r261292);
double r261294 = r261291 / r261293;
double r261295 = log(r261294);
double r261296 = r261290 * r261295;
double r261297 = r261281 * r261296;
double r261298 = exp(r261297);
double r261299 = pow(r261294, r261281);
double r261300 = r261298 * r261299;
double r261301 = r261300 / r261281;
double r261302 = r261284 + r261301;
double r261303 = r261283 ? r261289 : r261302;
return r261303;
}




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)))