x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot 1\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r721385 = x;
double r721386 = y;
double r721387 = r721385 / r721386;
double r721388 = log(r721387);
double r721389 = r721385 * r721388;
double r721390 = z;
double r721391 = r721389 - r721390;
return r721391;
}
double f(double x, double y, double z) {
double r721392 = 2.0;
double r721393 = x;
double r721394 = cbrt(r721393);
double r721395 = y;
double r721396 = cbrt(r721395);
double r721397 = r721394 / r721396;
double r721398 = log(r721397);
double r721399 = r721392 * r721398;
double r721400 = 1.0;
double r721401 = r721399 * r721400;
double r721402 = r721401 * r721393;
double r721403 = r721393 * r721398;
double r721404 = r721402 + r721403;
double r721405 = z;
double r721406 = r721404 - r721405;
return r721406;
}




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.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020034 +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))