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 r2443 = x;
double r2444 = y;
double r2445 = r2443 / r2444;
double r2446 = log(r2445);
double r2447 = r2443 * r2446;
double r2448 = z;
double r2449 = r2447 - r2448;
return r2449;
}
double f(double x, double y, double z) {
double r2450 = x;
double r2451 = 2.0;
double r2452 = cbrt(r2450);
double r2453 = y;
double r2454 = cbrt(r2453);
double r2455 = r2452 / r2454;
double r2456 = log(r2455);
double r2457 = r2451 * r2456;
double r2458 = r2457 + r2456;
double r2459 = r2450 * r2458;
double r2460 = z;
double r2461 = r2459 - r2460;
return r2461;
}




Bits error versus x




Bits error versus y




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