x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) \cdot y + y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}}{y}double f(double x, double y, double z) {
double r284397 = x;
double r284398 = y;
double r284399 = z;
double r284400 = r284399 + r284398;
double r284401 = r284398 / r284400;
double r284402 = log(r284401);
double r284403 = r284398 * r284402;
double r284404 = exp(r284403);
double r284405 = r284404 / r284398;
double r284406 = r284397 + r284405;
return r284406;
}
double f(double x, double y, double z) {
double r284407 = x;
double r284408 = 2.0;
double r284409 = y;
double r284410 = cbrt(r284409);
double r284411 = z;
double r284412 = r284411 + r284409;
double r284413 = cbrt(r284412);
double r284414 = r284410 / r284413;
double r284415 = log(r284414);
double r284416 = r284408 * r284415;
double r284417 = r284416 * r284409;
double r284418 = r284409 * r284415;
double r284419 = r284417 + r284418;
double r284420 = exp(r284419);
double r284421 = r284420 / r284409;
double r284422 = r284407 + r284421;
return r284422;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.1 |
| Herbie | 1.1 |
Initial program 6.0
rmApplied add-cube-cbrt19.4
Applied add-cube-cbrt6.1
Applied times-frac6.1
Applied log-prod2.1
Applied distribute-lft-in2.1
Simplified1.1
Final simplification1.1
herbie shell --seed 2019303 +o rules:numerics
(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.1154157598e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))