x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r412160 = x;
double r412161 = y;
double r412162 = r412160 / r412161;
double r412163 = log(r412162);
double r412164 = r412160 * r412163;
double r412165 = z;
double r412166 = r412164 - r412165;
return r412166;
}
double f(double x, double y, double z) {
double r412167 = x;
double r412168 = 2.0;
double r412169 = cbrt(r412167);
double r412170 = y;
double r412171 = cbrt(r412170);
double r412172 = r412169 / r412171;
double r412173 = log(r412172);
double r412174 = r412168 * r412173;
double r412175 = r412174 + r412173;
double r412176 = r412167 * r412175;
double r412177 = z;
double r412178 = r412176 - r412177;
return r412178;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.5 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.5
rmApplied add-cube-cbrt15.5
Applied add-cube-cbrt15.5
Applied times-frac15.5
Applied log-prod3.9
Simplified0.2
Final simplification0.2
herbie shell --seed 2019353 +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))