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 r541310 = x;
double r541311 = y;
double r541312 = r541310 / r541311;
double r541313 = log(r541312);
double r541314 = r541310 * r541313;
double r541315 = z;
double r541316 = r541314 - r541315;
return r541316;
}
double f(double x, double y, double z) {
double r541317 = x;
double r541318 = 2.0;
double r541319 = cbrt(r541317);
double r541320 = y;
double r541321 = cbrt(r541320);
double r541322 = r541319 / r541321;
double r541323 = log(r541322);
double r541324 = r541318 * r541323;
double r541325 = r541324 + r541323;
double r541326 = r541317 * r541325;
double r541327 = z;
double r541328 = r541326 - r541327;
return r541328;
}




Bits error versus x




Bits error versus y




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