x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}\begin{array}{l}
\mathbf{if}\;y \le -1.611458593987227695782152019682377982421 \cdot 10^{54}:\\
\;\;\;\;x + \frac{e^{-1 \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{e^{y \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right) + \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right)}}{y}\\
\end{array}double f(double x, double y, double z) {
double r641331 = x;
double r641332 = y;
double r641333 = z;
double r641334 = r641333 + r641332;
double r641335 = r641332 / r641334;
double r641336 = log(r641335);
double r641337 = r641332 * r641336;
double r641338 = exp(r641337);
double r641339 = r641338 / r641332;
double r641340 = r641331 + r641339;
return r641340;
}
double f(double x, double y, double z) {
double r641341 = y;
double r641342 = -1.6114585939872277e+54;
bool r641343 = r641341 <= r641342;
double r641344 = x;
double r641345 = -1.0;
double r641346 = z;
double r641347 = r641345 * r641346;
double r641348 = exp(r641347);
double r641349 = r641348 / r641341;
double r641350 = r641344 + r641349;
double r641351 = 2.0;
double r641352 = cbrt(r641341);
double r641353 = r641346 + r641341;
double r641354 = cbrt(r641353);
double r641355 = r641352 / r641354;
double r641356 = log(r641355);
double r641357 = r641351 * r641356;
double r641358 = r641357 + r641356;
double r641359 = r641341 * r641358;
double r641360 = exp(r641359);
double r641361 = r641360 / r641341;
double r641362 = r641344 + r641361;
double r641363 = r641343 ? r641350 : r641362;
return r641363;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.1 |
|---|---|
| Target | 1.2 |
| Herbie | 0.6 |
if y < -1.6114585939872277e+54Initial program 2.7
Taylor expanded around inf 0.0
if -1.6114585939872277e+54 < y Initial program 6.9
rmApplied add-cube-cbrt15.6
Applied add-cube-cbrt6.9
Applied times-frac6.9
Applied log-prod2.0
Simplified0.8
Final simplification0.6
herbie shell --seed 2019362
(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)))