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 r429709 = x;
double r429710 = y;
double r429711 = r429709 / r429710;
double r429712 = log(r429711);
double r429713 = r429709 * r429712;
double r429714 = z;
double r429715 = r429713 - r429714;
return r429715;
}
double f(double x, double y, double z) {
double r429716 = 2.0;
double r429717 = x;
double r429718 = cbrt(r429717);
double r429719 = y;
double r429720 = cbrt(r429719);
double r429721 = r429718 / r429720;
double r429722 = log(r429721);
double r429723 = r429716 * r429722;
double r429724 = 1.0;
double r429725 = r429723 * r429724;
double r429726 = r429725 * r429717;
double r429727 = r429717 * r429722;
double r429728 = r429726 + r429727;
double r429729 = z;
double r429730 = r429728 - r429729;
return r429730;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 16.0 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 16.0
rmApplied add-cube-cbrt16.0
Applied add-cube-cbrt16.0
Applied times-frac16.0
Applied log-prod3.8
Applied distribute-lft-in3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2020001 +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))