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 r449262 = x;
double r449263 = y;
double r449264 = r449262 / r449263;
double r449265 = log(r449264);
double r449266 = r449262 * r449265;
double r449267 = z;
double r449268 = r449266 - r449267;
return r449268;
}
double f(double x, double y, double z) {
double r449269 = x;
double r449270 = 2.0;
double r449271 = cbrt(r449269);
double r449272 = y;
double r449273 = cbrt(r449272);
double r449274 = r449271 / r449273;
double r449275 = log(r449274);
double r449276 = r449270 * r449275;
double r449277 = r449276 + r449275;
double r449278 = r449269 * r449277;
double r449279 = z;
double r449280 = r449278 - r449279;
return r449280;
}




Bits error versus x




Bits error versus y




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