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 r310451 = x;
double r310452 = y;
double r310453 = r310451 / r310452;
double r310454 = log(r310453);
double r310455 = r310451 * r310454;
double r310456 = z;
double r310457 = r310455 - r310456;
return r310457;
}
double f(double x, double y, double z) {
double r310458 = x;
double r310459 = 2.0;
double r310460 = cbrt(r310458);
double r310461 = y;
double r310462 = cbrt(r310461);
double r310463 = r310460 / r310462;
double r310464 = log(r310463);
double r310465 = r310459 * r310464;
double r310466 = r310465 + r310464;
double r310467 = r310458 * r310466;
double r310468 = z;
double r310469 = r310467 - r310468;
return r310469;
}




Bits error versus x




Bits error versus y




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