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 r382134 = x;
double r382135 = y;
double r382136 = r382134 / r382135;
double r382137 = log(r382136);
double r382138 = r382134 * r382137;
double r382139 = z;
double r382140 = r382138 - r382139;
return r382140;
}
double f(double x, double y, double z) {
double r382141 = 2.0;
double r382142 = x;
double r382143 = cbrt(r382142);
double r382144 = y;
double r382145 = cbrt(r382144);
double r382146 = r382143 / r382145;
double r382147 = log(r382146);
double r382148 = r382141 * r382147;
double r382149 = 1.0;
double r382150 = r382148 * r382149;
double r382151 = r382150 * r382142;
double r382152 = r382142 * r382147;
double r382153 = r382151 + r382152;
double r382154 = z;
double r382155 = r382153 - r382154;
return r382155;
}




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))