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 r981573 = x;
double r981574 = y;
double r981575 = r981573 / r981574;
double r981576 = log(r981575);
double r981577 = r981573 * r981576;
double r981578 = z;
double r981579 = r981577 - r981578;
return r981579;
}
double f(double x, double y, double z) {
double r981580 = x;
double r981581 = 2.0;
double r981582 = cbrt(r981580);
double r981583 = y;
double r981584 = cbrt(r981583);
double r981585 = r981582 / r981584;
double r981586 = log(r981585);
double r981587 = r981581 * r981586;
double r981588 = r981587 + r981586;
double r981589 = r981580 * r981588;
double r981590 = z;
double r981591 = r981589 - r981590;
return r981591;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.1
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2020065
(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))