x \cdot \log \left(\frac{x}{y}\right) - z\sqrt[3]{{\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)}^{3}} \cdot x + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x - z\right)double f(double x, double y, double z) {
double r312396 = x;
double r312397 = y;
double r312398 = r312396 / r312397;
double r312399 = log(r312398);
double r312400 = r312396 * r312399;
double r312401 = z;
double r312402 = r312400 - r312401;
return r312402;
}
double f(double x, double y, double z) {
double r312403 = 2.0;
double r312404 = x;
double r312405 = cbrt(r312404);
double r312406 = y;
double r312407 = cbrt(r312406);
double r312408 = r312405 / r312407;
double r312409 = log(r312408);
double r312410 = r312403 * r312409;
double r312411 = 3.0;
double r312412 = pow(r312410, r312411);
double r312413 = cbrt(r312412);
double r312414 = r312413 * r312404;
double r312415 = r312409 * r312404;
double r312416 = z;
double r312417 = r312415 - r312416;
double r312418 = r312414 + r312417;
return r312418;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.7 |
|---|---|
| Target | 8.1 |
| Herbie | 0.3 |
Initial program 15.7
rmApplied add-cube-cbrt15.7
Applied add-cube-cbrt15.7
Applied times-frac15.7
Applied log-prod3.5
Applied distribute-rgt-in3.5
Applied associate--l+3.5
rmApplied add-cbrt-cube3.5
Simplified0.3
Final simplification0.3
herbie shell --seed 2019305
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.59507779908377277e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))