x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot x + \log \left(\frac{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r437417 = x;
double r437418 = y;
double r437419 = r437417 / r437418;
double r437420 = log(r437419);
double r437421 = r437417 * r437420;
double r437422 = z;
double r437423 = r437421 - r437422;
return r437423;
}
double f(double x, double y, double z) {
double r437424 = 2.0;
double r437425 = x;
double r437426 = cbrt(r437425);
double r437427 = y;
double r437428 = cbrt(r437427);
double r437429 = r437426 / r437428;
double r437430 = log(r437429);
double r437431 = r437424 * r437430;
double r437432 = r437431 * r437425;
double r437433 = cbrt(r437426);
double r437434 = r437433 * r437433;
double r437435 = r437434 * r437433;
double r437436 = r437435 / r437428;
double r437437 = log(r437436);
double r437438 = r437437 * r437425;
double r437439 = r437432 + r437438;
double r437440 = z;
double r437441 = r437439 - r437440;
return r437441;
}




Bits error versus x




Bits error versus y




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