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 r411344 = x;
double r411345 = y;
double r411346 = r411344 / r411345;
double r411347 = log(r411346);
double r411348 = r411344 * r411347;
double r411349 = z;
double r411350 = r411348 - r411349;
return r411350;
}
double f(double x, double y, double z) {
double r411351 = x;
double r411352 = 2.0;
double r411353 = cbrt(r411351);
double r411354 = y;
double r411355 = cbrt(r411354);
double r411356 = r411353 / r411355;
double r411357 = log(r411356);
double r411358 = r411352 * r411357;
double r411359 = r411351 * r411358;
double r411360 = r411351 * r411357;
double r411361 = r411359 + r411360;
double r411362 = z;
double r411363 = r411361 - r411362;
return r411363;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.6 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.4
Applied distribute-lft-in3.4
Simplified0.2
Final simplification0.2
herbie shell --seed 2020027
(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))