x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)\right) \cdot x - zdouble f(double x, double y, double z) {
double r17438698 = x;
double r17438699 = y;
double r17438700 = r17438698 / r17438699;
double r17438701 = log(r17438700);
double r17438702 = r17438698 * r17438701;
double r17438703 = z;
double r17438704 = r17438702 - r17438703;
return r17438704;
}
double f(double x, double y, double z) {
double r17438705 = x;
double r17438706 = cbrt(r17438705);
double r17438707 = y;
double r17438708 = cbrt(r17438707);
double r17438709 = r17438706 / r17438708;
double r17438710 = log(r17438709);
double r17438711 = r17438710 + r17438710;
double r17438712 = r17438710 + r17438711;
double r17438713 = r17438712 * r17438705;
double r17438714 = z;
double r17438715 = r17438713 - r17438714;
return r17438715;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2019179 +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))