x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r23826330 = x;
double r23826331 = y;
double r23826332 = r23826330 / r23826331;
double r23826333 = log(r23826332);
double r23826334 = r23826330 * r23826333;
double r23826335 = z;
double r23826336 = r23826334 - r23826335;
return r23826336;
}
double f(double x, double y, double z) {
double r23826337 = x;
double r23826338 = cbrt(r23826337);
double r23826339 = y;
double r23826340 = cbrt(r23826339);
double r23826341 = r23826338 / r23826340;
double r23826342 = log(r23826341);
double r23826343 = r23826342 + r23826342;
double r23826344 = r23826337 * r23826343;
double r23826345 = r23826342 * r23826337;
double r23826346 = r23826344 + r23826345;
double r23826347 = z;
double r23826348 = r23826346 - r23826347;
return r23826348;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.6
Applied distribute-lft-in3.6
Simplified3.6
rmApplied log-prod0.2
Final simplification0.2
herbie shell --seed 2019163
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))