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) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r361529 = x;
double r361530 = y;
double r361531 = r361529 / r361530;
double r361532 = log(r361531);
double r361533 = r361529 * r361532;
double r361534 = z;
double r361535 = r361533 - r361534;
return r361535;
}
double f(double x, double y, double z) {
double r361536 = x;
double r361537 = 2.0;
double r361538 = cbrt(r361536);
double r361539 = y;
double r361540 = cbrt(r361539);
double r361541 = r361538 / r361540;
double r361542 = log(r361541);
double r361543 = r361537 * r361542;
double r361544 = r361536 * r361543;
double r361545 = r361536 * r361542;
double r361546 = r361544 + r361545;
double r361547 = z;
double r361548 = r361546 - r361547;
return r361548;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019304 +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.59507779908377277e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))