x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \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 r612825 = x;
double r612826 = y;
double r612827 = r612825 / r612826;
double r612828 = log(r612827);
double r612829 = r612825 * r612828;
double r612830 = z;
double r612831 = r612829 - r612830;
return r612831;
}
double f(double x, double y, double z) {
double r612832 = x;
double r612833 = 2.0;
double r612834 = cbrt(r612832);
double r612835 = y;
double r612836 = cbrt(r612835);
double r612837 = r612834 / r612836;
double r612838 = log(r612837);
double r612839 = r612833 * r612838;
double r612840 = r612832 * r612839;
double r612841 = r612838 * r612832;
double r612842 = r612840 + r612841;
double r612843 = z;
double r612844 = r612842 - r612843;
return r612844;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.5 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.5
rmApplied add-cube-cbrt15.5
Applied add-cube-cbrt15.5
Applied times-frac15.5
Applied log-prod3.6
Applied distribute-lft-in3.6
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020042 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))