x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{{\left(e^{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right)}^{\left(\sqrt[3]{y} \cdot \log \left(\frac{y}{z + y}\right)\right)}}{y}double f(double x, double y, double z) {
double r342267 = x;
double r342268 = y;
double r342269 = z;
double r342270 = r342269 + r342268;
double r342271 = r342268 / r342270;
double r342272 = log(r342271);
double r342273 = r342268 * r342272;
double r342274 = exp(r342273);
double r342275 = r342274 / r342268;
double r342276 = r342267 + r342275;
return r342276;
}
double f(double x, double y, double z) {
double r342277 = x;
double r342278 = y;
double r342279 = cbrt(r342278);
double r342280 = r342279 * r342279;
double r342281 = exp(r342280);
double r342282 = z;
double r342283 = r342282 + r342278;
double r342284 = r342278 / r342283;
double r342285 = log(r342284);
double r342286 = r342279 * r342285;
double r342287 = pow(r342281, r342286);
double r342288 = r342287 / r342278;
double r342289 = r342277 + r342288;
return r342289;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 1.2 |
| Herbie | 1.2 |
Initial program 6.3
rmApplied add-log-exp35.1
Applied exp-to-pow1.2
rmApplied add-cube-cbrt1.2
Applied exp-prod1.2
Applied pow-pow1.2
Final simplification1.2
herbie shell --seed 2020035 +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.1154157597908e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))