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 r25755509 = x;
double r25755510 = y;
double r25755511 = r25755509 / r25755510;
double r25755512 = log(r25755511);
double r25755513 = r25755509 * r25755512;
double r25755514 = z;
double r25755515 = r25755513 - r25755514;
return r25755515;
}
double f(double x, double y, double z) {
double r25755516 = y;
double r25755517 = cbrt(r25755516);
double r25755518 = r25755517 * r25755517;
double r25755519 = log(r25755518);
double r25755520 = x;
double r25755521 = -r25755520;
double r25755522 = r25755519 * r25755521;
double r25755523 = cbrt(r25755520);
double r25755524 = r25755523 / r25755517;
double r25755525 = log(r25755524);
double r25755526 = r25755523 * r25755523;
double r25755527 = log(r25755526);
double r25755528 = r25755525 + r25755527;
double r25755529 = r25755520 * r25755528;
double r25755530 = r25755522 + r25755529;
double r25755531 = z;
double r25755532 = r25755530 - r25755531;
return r25755532;
}




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))