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 r403441 = x;
double r403442 = y;
double r403443 = r403441 / r403442;
double r403444 = log(r403443);
double r403445 = r403441 * r403444;
double r403446 = z;
double r403447 = r403445 - r403446;
return r403447;
}
double f(double x, double y, double z) {
double r403448 = 2.0;
double r403449 = x;
double r403450 = cbrt(r403449);
double r403451 = y;
double r403452 = cbrt(r403451);
double r403453 = r403450 / r403452;
double r403454 = log(r403453);
double r403455 = r403448 * r403454;
double r403456 = 1.0;
double r403457 = r403455 * r403456;
double r403458 = r403457 * r403449;
double r403459 = r403449 * r403454;
double r403460 = r403458 + r403459;
double r403461 = z;
double r403462 = r403460 - r403461;
return r403462;
}




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.6
Applied distribute-lft-in3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2020060 +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))