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 r351478 = x;
double r351479 = y;
double r351480 = r351478 / r351479;
double r351481 = log(r351480);
double r351482 = r351478 * r351481;
double r351483 = z;
double r351484 = r351482 - r351483;
return r351484;
}
double f(double x, double y, double z) {
double r351485 = x;
double r351486 = 2.0;
double r351487 = cbrt(r351485);
double r351488 = y;
double r351489 = cbrt(r351488);
double r351490 = r351487 / r351489;
double r351491 = log(r351490);
double r351492 = r351486 * r351491;
double r351493 = r351492 + r351491;
double r351494 = r351485 * r351493;
double r351495 = z;
double r351496 = r351494 - r351495;
return r351496;
}




Bits error versus x




Bits error versus y




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