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 r478509 = x;
double r478510 = y;
double r478511 = r478509 / r478510;
double r478512 = log(r478511);
double r478513 = r478509 * r478512;
double r478514 = z;
double r478515 = r478513 - r478514;
return r478515;
}
double f(double x, double y, double z) {
double r478516 = 2.0;
double r478517 = x;
double r478518 = cbrt(r478517);
double r478519 = y;
double r478520 = cbrt(r478519);
double r478521 = r478518 / r478520;
double r478522 = log(r478521);
double r478523 = r478516 * r478522;
double r478524 = 1.0;
double r478525 = r478523 * r478524;
double r478526 = r478525 * r478517;
double r478527 = r478517 * r478522;
double r478528 = r478526 + r478527;
double r478529 = z;
double r478530 = r478528 - r478529;
return r478530;
}




Bits error versus x




Bits error versus y




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