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 r430353 = x;
double r430354 = y;
double r430355 = r430353 / r430354;
double r430356 = log(r430355);
double r430357 = r430353 * r430356;
double r430358 = z;
double r430359 = r430357 - r430358;
return r430359;
}
double f(double x, double y, double z) {
double r430360 = x;
double r430361 = 2.0;
double r430362 = cbrt(r430360);
double r430363 = y;
double r430364 = cbrt(r430363);
double r430365 = r430362 / r430364;
double r430366 = log(r430365);
double r430367 = r430361 * r430366;
double r430368 = r430367 + r430366;
double r430369 = r430360 * r430368;
double r430370 = z;
double r430371 = r430369 - r430370;
return r430371;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.5 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.5
rmApplied add-cube-cbrt15.5
Applied add-cube-cbrt15.5
Applied times-frac15.5
Applied log-prod3.9
Simplified0.2
Final simplification0.2
herbie shell --seed 2019353 +o rules:numerics
(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))