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 r472483 = x;
double r472484 = y;
double r472485 = r472483 / r472484;
double r472486 = log(r472485);
double r472487 = r472483 * r472486;
double r472488 = z;
double r472489 = r472487 - r472488;
return r472489;
}
double f(double x, double y, double z) {
double r472490 = x;
double r472491 = 2.0;
double r472492 = cbrt(r472490);
double r472493 = y;
double r472494 = cbrt(r472493);
double r472495 = r472492 / r472494;
double r472496 = log(r472495);
double r472497 = r472491 * r472496;
double r472498 = r472497 + r472496;
double r472499 = r472490 * r472498;
double r472500 = z;
double r472501 = r472499 - r472500;
return r472501;
}




Bits error versus x




Bits error versus y




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