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 r543277 = x;
double r543278 = y;
double r543279 = r543277 / r543278;
double r543280 = log(r543279);
double r543281 = r543277 * r543280;
double r543282 = z;
double r543283 = r543281 - r543282;
return r543283;
}
double f(double x, double y, double z) {
double r543284 = x;
double r543285 = 2.0;
double r543286 = cbrt(r543284);
double r543287 = y;
double r543288 = cbrt(r543287);
double r543289 = r543286 / r543288;
double r543290 = log(r543289);
double r543291 = r543285 * r543290;
double r543292 = r543284 * r543291;
double r543293 = r543290 * r543284;
double r543294 = r543292 + r543293;
double r543295 = z;
double r543296 = r543294 - r543295;
return r543296;
}




Bits error versus x




Bits error versus y




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