x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r249462 = x;
double r249463 = y;
double r249464 = r249462 / r249463;
double r249465 = log(r249464);
double r249466 = r249462 * r249465;
double r249467 = z;
double r249468 = r249466 - r249467;
return r249468;
}
double f(double x, double y, double z) {
double r249469 = x;
double r249470 = 2.0;
double r249471 = cbrt(r249469);
double r249472 = y;
double r249473 = cbrt(r249472);
double r249474 = r249471 / r249473;
double r249475 = log(r249474);
double r249476 = r249470 * r249475;
double r249477 = r249476 + r249475;
double r249478 = r249469 * r249477;
double r249479 = z;
double r249480 = r249478 - r249479;
return r249480;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 8.1 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020045
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))