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 r568300 = x;
double r568301 = y;
double r568302 = r568300 / r568301;
double r568303 = log(r568302);
double r568304 = r568300 * r568303;
double r568305 = z;
double r568306 = r568304 - r568305;
return r568306;
}
double f(double x, double y, double z) {
double r568307 = x;
double r568308 = 2.0;
double r568309 = cbrt(r568307);
double r568310 = y;
double r568311 = cbrt(r568310);
double r568312 = r568309 / r568311;
double r568313 = log(r568312);
double r568314 = r568308 * r568313;
double r568315 = r568314 + r568313;
double r568316 = r568307 * r568315;
double r568317 = z;
double r568318 = r568316 - r568317;
return r568318;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.7 |
| 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 2020046
(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))