x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r530316 = x;
double r530317 = y;
double r530318 = r530316 / r530317;
double r530319 = log(r530318);
double r530320 = r530316 * r530319;
double r530321 = z;
double r530322 = r530320 - r530321;
return r530322;
}
double f(double x, double y, double z) {
double r530323 = x;
double r530324 = 2.0;
double r530325 = cbrt(r530323);
double r530326 = y;
double r530327 = cbrt(r530326);
double r530328 = r530325 / r530327;
double r530329 = log(r530328);
double r530330 = r530324 * r530329;
double r530331 = r530323 * r530330;
double r530332 = cbrt(r530325);
double r530333 = r530332 * r530332;
double r530334 = r530333 * r530332;
double r530335 = r530334 / r530327;
double r530336 = log(r530335);
double r530337 = r530336 * r530323;
double r530338 = r530331 + r530337;
double r530339 = z;
double r530340 = r530338 - r530339;
return r530340;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.0 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.0
rmApplied add-cube-cbrt15.0
Applied add-cube-cbrt15.0
Applied times-frac15.0
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified0.2
Simplified0.2
rmApplied add-cube-cbrt0.2
Final simplification0.2
herbie shell --seed 2020047 +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))