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 r300444 = x;
double r300445 = y;
double r300446 = r300444 / r300445;
double r300447 = log(r300446);
double r300448 = r300444 * r300447;
double r300449 = z;
double r300450 = r300448 - r300449;
return r300450;
}
double f(double x, double y, double z) {
double r300451 = x;
double r300452 = 2.0;
double r300453 = cbrt(r300451);
double r300454 = y;
double r300455 = cbrt(r300454);
double r300456 = r300453 / r300455;
double r300457 = log(r300456);
double r300458 = r300452 * r300457;
double r300459 = r300458 + r300457;
double r300460 = r300451 * r300459;
double r300461 = z;
double r300462 = r300460 - r300461;
return r300462;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2019326
(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))