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 r460141 = x;
double r460142 = y;
double r460143 = r460141 / r460142;
double r460144 = log(r460143);
double r460145 = r460141 * r460144;
double r460146 = z;
double r460147 = r460145 - r460146;
return r460147;
}
double f(double x, double y, double z) {
double r460148 = x;
double r460149 = 2.0;
double r460150 = cbrt(r460148);
double r460151 = y;
double r460152 = cbrt(r460151);
double r460153 = r460150 / r460152;
double r460154 = log(r460153);
double r460155 = r460149 * r460154;
double r460156 = r460155 + r460154;
double r460157 = r460148 * r460156;
double r460158 = z;
double r460159 = r460157 - r460158;
return r460159;
}




Bits error versus x




Bits error versus y




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