x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)\right) \cdot x - zdouble f(double x, double y, double z) {
double r15826125 = x;
double r15826126 = y;
double r15826127 = r15826125 / r15826126;
double r15826128 = log(r15826127);
double r15826129 = r15826125 * r15826128;
double r15826130 = z;
double r15826131 = r15826129 - r15826130;
return r15826131;
}
double f(double x, double y, double z) {
double r15826132 = x;
double r15826133 = cbrt(r15826132);
double r15826134 = y;
double r15826135 = cbrt(r15826134);
double r15826136 = r15826133 / r15826135;
double r15826137 = log(r15826136);
double r15826138 = r15826137 + r15826137;
double r15826139 = r15826137 + r15826138;
double r15826140 = r15826139 * r15826132;
double r15826141 = z;
double r15826142 = r15826140 - r15826141;
return r15826142;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.8 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.8
rmApplied add-cube-cbrt15.8
Applied add-cube-cbrt15.8
Applied times-frac15.8
Applied log-prod3.9
Simplified0.2
Final simplification0.2
herbie shell --seed 2019174 +o rules:numerics
(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))