x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(-x\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{y}}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{y}}}\right)\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r22412387 = x;
double r22412388 = y;
double r22412389 = r22412387 / r22412388;
double r22412390 = log(r22412389);
double r22412391 = r22412387 * r22412390;
double r22412392 = z;
double r22412393 = r22412391 - r22412392;
return r22412393;
}
double f(double x, double y, double z) {
double r22412394 = y;
double r22412395 = cbrt(r22412394);
double r22412396 = r22412395 * r22412395;
double r22412397 = log(r22412396);
double r22412398 = x;
double r22412399 = -r22412398;
double r22412400 = r22412397 * r22412399;
double r22412401 = cbrt(r22412398);
double r22412402 = cbrt(r22412395);
double r22412403 = r22412401 / r22412402;
double r22412404 = log(r22412403);
double r22412405 = r22412403 * r22412403;
double r22412406 = log(r22412405);
double r22412407 = r22412404 + r22412406;
double r22412408 = r22412407 * r22412398;
double r22412409 = r22412400 + r22412408;
double r22412410 = z;
double r22412411 = r22412409 - r22412410;
return r22412411;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.6 |
| Herbie | 0.3 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied *-un-lft-identity15.3
Applied times-frac15.3
Applied log-prod4.6
Applied distribute-rgt-in4.6
Simplified4.6
rmApplied add-cube-cbrt4.6
Applied add-cube-cbrt4.6
Applied times-frac4.6
Applied log-prod0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019169
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))