x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot 1\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r472848 = x;
double r472849 = y;
double r472850 = r472848 / r472849;
double r472851 = log(r472850);
double r472852 = r472848 * r472851;
double r472853 = z;
double r472854 = r472852 - r472853;
return r472854;
}
double f(double x, double y, double z) {
double r472855 = 2.0;
double r472856 = x;
double r472857 = cbrt(r472856);
double r472858 = y;
double r472859 = cbrt(r472858);
double r472860 = r472857 / r472859;
double r472861 = log(r472860);
double r472862 = r472855 * r472861;
double r472863 = 1.0;
double r472864 = r472862 * r472863;
double r472865 = r472864 * r472856;
double r472866 = r472856 * r472861;
double r472867 = r472865 + r472866;
double r472868 = z;
double r472869 = r472867 - r472868;
return r472869;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.1
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.7
Applied distribute-lft-in3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2020065 +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))