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 r504323 = x;
double r504324 = y;
double r504325 = r504323 / r504324;
double r504326 = log(r504325);
double r504327 = r504323 * r504326;
double r504328 = z;
double r504329 = r504327 - r504328;
return r504329;
}
double f(double x, double y, double z) {
double r504330 = x;
double r504331 = 2.0;
double r504332 = cbrt(r504330);
double r504333 = y;
double r504334 = cbrt(r504333);
double r504335 = r504332 / r504334;
double r504336 = log(r504335);
double r504337 = r504331 * r504336;
double r504338 = r504337 + r504336;
double r504339 = r504330 * r504338;
double r504340 = z;
double r504341 = r504339 - r504340;
return r504341;
}




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
(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))