x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r10882845 = x;
double r10882846 = y;
double r10882847 = r10882845 / r10882846;
double r10882848 = log(r10882847);
double r10882849 = r10882845 * r10882848;
double r10882850 = z;
double r10882851 = r10882849 - r10882850;
return r10882851;
}
double f(double x, double y, double z) {
double r10882852 = x;
double r10882853 = cbrt(r10882852);
double r10882854 = y;
double r10882855 = cbrt(r10882854);
double r10882856 = r10882853 / r10882855;
double r10882857 = log(r10882856);
double r10882858 = r10882857 + r10882857;
double r10882859 = r10882852 * r10882858;
double r10882860 = r10882857 * r10882852;
double r10882861 = r10882859 + r10882860;
double r10882862 = z;
double r10882863 = r10882861 - r10882862;
return r10882863;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.6 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 14.6
rmApplied add-cube-cbrt14.6
Applied add-cube-cbrt14.6
Applied times-frac14.6
Applied log-prod3.3
Applied distribute-lft-in3.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2019158 +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))