x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(-x\right) + x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right)\right) - zdouble f(double x, double y, double z) {
double r17853635 = x;
double r17853636 = y;
double r17853637 = r17853635 / r17853636;
double r17853638 = log(r17853637);
double r17853639 = r17853635 * r17853638;
double r17853640 = z;
double r17853641 = r17853639 - r17853640;
return r17853641;
}
double f(double x, double y, double z) {
double r17853642 = y;
double r17853643 = cbrt(r17853642);
double r17853644 = r17853643 * r17853643;
double r17853645 = log(r17853644);
double r17853646 = x;
double r17853647 = -r17853646;
double r17853648 = r17853645 * r17853647;
double r17853649 = cbrt(r17853646);
double r17853650 = r17853649 / r17853643;
double r17853651 = log(r17853650);
double r17853652 = r17853649 * r17853649;
double r17853653 = log(r17853652);
double r17853654 = r17853651 + r17853653;
double r17853655 = r17853646 * r17853654;
double r17853656 = r17853648 + r17853655;
double r17853657 = z;
double r17853658 = r17853656 - r17853657;
return r17853658;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.8 |
| Herbie | 0.3 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied *-un-lft-identity15.3
Applied times-frac15.3
Applied log-prod4.7
Applied distribute-lft-in4.8
Simplified4.8
rmApplied *-un-lft-identity4.8
Applied cbrt-prod4.8
Applied add-cube-cbrt4.8
Applied times-frac4.8
Applied log-prod0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))