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 r403462 = x;
double r403463 = y;
double r403464 = r403462 / r403463;
double r403465 = log(r403464);
double r403466 = r403462 * r403465;
double r403467 = z;
double r403468 = r403466 - r403467;
return r403468;
}
double f(double x, double y, double z) {
double r403469 = 2.0;
double r403470 = x;
double r403471 = cbrt(r403470);
double r403472 = y;
double r403473 = cbrt(r403472);
double r403474 = r403471 / r403473;
double r403475 = log(r403474);
double r403476 = r403469 * r403475;
double r403477 = 1.0;
double r403478 = r403476 * r403477;
double r403479 = r403478 * r403470;
double r403480 = r403470 * r403475;
double r403481 = r403479 + r403480;
double r403482 = z;
double r403483 = r403481 - r403482;
return r403483;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.7
Applied distribute-lft-in3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2020035 +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))