x \cdot \log \left(\frac{x}{y}\right) - z\log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot x + \left(\left(\left(\log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right)\right) \cdot x - z\right)double f(double x, double y, double z) {
double r9258588 = x;
double r9258589 = y;
double r9258590 = r9258588 / r9258589;
double r9258591 = log(r9258590);
double r9258592 = r9258588 * r9258591;
double r9258593 = z;
double r9258594 = r9258592 - r9258593;
return r9258594;
}
double f(double x, double y, double z) {
double r9258595 = x;
double r9258596 = cbrt(r9258595);
double r9258597 = r9258596 * r9258596;
double r9258598 = log(r9258597);
double r9258599 = r9258598 * r9258595;
double r9258600 = cbrt(r9258596);
double r9258601 = y;
double r9258602 = cbrt(r9258601);
double r9258603 = r9258600 / r9258602;
double r9258604 = log(r9258603);
double r9258605 = r9258604 + r9258604;
double r9258606 = r9258605 + r9258604;
double r9258607 = r9258606 * r9258595;
double r9258608 = z;
double r9258609 = r9258607 - r9258608;
double r9258610 = r9258599 + r9258609;
return r9258610;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.3 |
Initial program 14.8
rmApplied *-un-lft-identity14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod4.7
Applied distribute-rgt-in4.7
Applied associate--l+4.7
rmApplied add-cube-cbrt4.7
Applied add-cube-cbrt4.7
Applied times-frac4.7
Applied log-prod0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019156
(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))