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 r538371 = x;
double r538372 = y;
double r538373 = r538371 / r538372;
double r538374 = log(r538373);
double r538375 = r538371 * r538374;
double r538376 = z;
double r538377 = r538375 - r538376;
return r538377;
}
double f(double x, double y, double z) {
double r538378 = x;
double r538379 = 2.0;
double r538380 = cbrt(r538378);
double r538381 = y;
double r538382 = cbrt(r538381);
double r538383 = r538380 / r538382;
double r538384 = log(r538383);
double r538385 = r538379 * r538384;
double r538386 = r538378 * r538385;
double r538387 = cbrt(r538380);
double r538388 = r538387 * r538387;
double r538389 = r538388 * r538387;
double r538390 = r538389 / r538382;
double r538391 = log(r538390);
double r538392 = r538391 * r538378;
double r538393 = r538386 + r538392;
double r538394 = z;
double r538395 = r538393 - r538394;
return r538395;
}




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))