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 r433660 = x;
double r433661 = y;
double r433662 = r433660 / r433661;
double r433663 = log(r433662);
double r433664 = r433660 * r433663;
double r433665 = z;
double r433666 = r433664 - r433665;
return r433666;
}
double f(double x, double y, double z) {
double r433667 = x;
double r433668 = 2.0;
double r433669 = cbrt(r433667);
double r433670 = y;
double r433671 = cbrt(r433670);
double r433672 = r433669 / r433671;
double r433673 = log(r433672);
double r433674 = r433668 * r433673;
double r433675 = r433667 * r433674;
double r433676 = r433667 * r433673;
double r433677 = r433675 + r433676;
double r433678 = z;
double r433679 = r433677 - r433678;
return r433679;
}




Bits error versus x




Bits error versus y




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