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 r283405 = x;
double r283406 = y;
double r283407 = r283405 / r283406;
double r283408 = log(r283407);
double r283409 = r283405 * r283408;
double r283410 = z;
double r283411 = r283409 - r283410;
return r283411;
}
double f(double x, double y, double z) {
double r283412 = x;
double r283413 = 2.0;
double r283414 = cbrt(r283412);
double r283415 = y;
double r283416 = cbrt(r283415);
double r283417 = r283414 / r283416;
double r283418 = log(r283417);
double r283419 = r283413 * r283418;
double r283420 = r283419 + r283418;
double r283421 = r283412 * r283420;
double r283422 = z;
double r283423 = r283421 - r283422;
return r283423;
}




Bits error versus x




Bits error versus y




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