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 r482264 = x;
double r482265 = y;
double r482266 = r482264 / r482265;
double r482267 = log(r482266);
double r482268 = r482264 * r482267;
double r482269 = z;
double r482270 = r482268 - r482269;
return r482270;
}
double f(double x, double y, double z) {
double r482271 = 2.0;
double r482272 = x;
double r482273 = cbrt(r482272);
double r482274 = y;
double r482275 = cbrt(r482274);
double r482276 = r482273 / r482275;
double r482277 = log(r482276);
double r482278 = r482271 * r482277;
double r482279 = 1.0;
double r482280 = r482278 * r482279;
double r482281 = r482280 * r482272;
double r482282 = r482272 * r482277;
double r482283 = r482281 + r482282;
double r482284 = z;
double r482285 = r482283 - r482284;
return r482285;
}




Bits error versus x




Bits error versus y




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