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 r331241 = x;
double r331242 = y;
double r331243 = r331241 / r331242;
double r331244 = log(r331243);
double r331245 = r331241 * r331244;
double r331246 = z;
double r331247 = r331245 - r331246;
return r331247;
}
double f(double x, double y, double z) {
double r331248 = x;
double r331249 = cbrt(r331248);
double r331250 = y;
double r331251 = cbrt(r331250);
double r331252 = r331249 / r331251;
double r331253 = log(r331252);
double r331254 = r331253 + r331253;
double r331255 = r331248 * r331254;
double r331256 = r331253 * r331248;
double r331257 = r331255 + r331256;
double r331258 = z;
double r331259 = r331257 - r331258;
return r331259;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.8 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.8
rmApplied add-cube-cbrt15.8
Applied add-cube-cbrt15.8
Applied times-frac15.8
Applied log-prod3.9
Applied distribute-lft-in3.9
Simplified3.9
rmApplied add-sqr-sqrt33.4
Applied add-sqr-sqrt33.4
Applied times-frac33.4
Applied times-frac33.4
Applied log-prod31.5
Simplified31.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019174 +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))