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 r462521 = x;
double r462522 = y;
double r462523 = r462521 / r462522;
double r462524 = log(r462523);
double r462525 = r462521 * r462524;
double r462526 = z;
double r462527 = r462525 - r462526;
return r462527;
}
double f(double x, double y, double z) {
double r462528 = x;
double r462529 = 2.0;
double r462530 = cbrt(r462528);
double r462531 = y;
double r462532 = cbrt(r462531);
double r462533 = r462530 / r462532;
double r462534 = log(r462533);
double r462535 = r462529 * r462534;
double r462536 = r462535 + r462534;
double r462537 = r462528 * r462536;
double r462538 = z;
double r462539 = r462537 - r462538;
return r462539;
}




Bits error versus x




Bits error versus y




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