x \cdot \log \left(\frac{x}{y}\right) - z\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 + \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r17050699 = x;
double r17050700 = y;
double r17050701 = r17050699 / r17050700;
double r17050702 = log(r17050701);
double r17050703 = r17050699 * r17050702;
double r17050704 = z;
double r17050705 = r17050703 - r17050704;
return r17050705;
}
double f(double x, double y, double z) {
double r17050706 = x;
double r17050707 = cbrt(r17050706);
double r17050708 = cbrt(r17050707);
double r17050709 = y;
double r17050710 = cbrt(r17050709);
double r17050711 = r17050708 / r17050710;
double r17050712 = log(r17050711);
double r17050713 = r17050712 + r17050712;
double r17050714 = r17050713 + r17050712;
double r17050715 = r17050714 * r17050706;
double r17050716 = r17050707 * r17050707;
double r17050717 = log(r17050716);
double r17050718 = r17050717 * r17050706;
double r17050719 = r17050715 + r17050718;
double r17050720 = z;
double r17050721 = r17050719 - r17050720;
return r17050721;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.7 |
|---|---|
| Target | 8.3 |
| Herbie | 0.3 |
Initial program 15.7
rmApplied *-un-lft-identity15.7
Applied add-cube-cbrt15.7
Applied times-frac15.7
Applied log-prod4.9
Applied distribute-lft-in4.9
Simplified4.9
rmApplied add-cube-cbrt4.9
Applied add-cube-cbrt4.9
Applied times-frac4.9
Applied log-prod0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019168 +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))