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 r353496 = x;
double r353497 = y;
double r353498 = r353496 / r353497;
double r353499 = log(r353498);
double r353500 = r353496 * r353499;
double r353501 = z;
double r353502 = r353500 - r353501;
return r353502;
}
double f(double x, double y, double z) {
double r353503 = x;
double r353504 = 2.0;
double r353505 = cbrt(r353503);
double r353506 = y;
double r353507 = cbrt(r353506);
double r353508 = r353505 / r353507;
double r353509 = log(r353508);
double r353510 = r353504 * r353509;
double r353511 = r353510 + r353509;
double r353512 = r353503 * r353511;
double r353513 = z;
double r353514 = r353512 - r353513;
return r353514;
}




Bits error versus x




Bits error versus y




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