x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r359226 = x;
double r359227 = y;
double r359228 = r359226 / r359227;
double r359229 = log(r359228);
double r359230 = r359226 * r359229;
double r359231 = z;
double r359232 = r359230 - r359231;
return r359232;
}
double f(double x, double y, double z) {
double r359233 = x;
double r359234 = 2.0;
double r359235 = cbrt(r359233);
double r359236 = y;
double r359237 = cbrt(r359236);
double r359238 = r359235 / r359237;
double r359239 = log(r359238);
double r359240 = r359234 * r359239;
double r359241 = r359233 * r359240;
double r359242 = r359233 * r359239;
double r359243 = r359241 + r359242;
double r359244 = z;
double r359245 = r359243 - r359244;
return r359245;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.7
Applied distribute-lft-in3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2020035
(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))