x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r286172 = x;
double r286173 = y;
double r286174 = r286172 / r286173;
double r286175 = log(r286174);
double r286176 = r286172 * r286175;
double r286177 = z;
double r286178 = r286176 - r286177;
return r286178;
}
double f(double x, double y, double z) {
double r286179 = x;
double r286180 = 2.0;
double r286181 = cbrt(r286179);
double r286182 = y;
double r286183 = cbrt(r286182);
double r286184 = r286181 / r286183;
double r286185 = log(r286184);
double r286186 = r286180 * r286185;
double r286187 = r286179 * r286186;
double r286188 = r286179 * r286185;
double r286189 = r286187 + r286188;
double r286190 = z;
double r286191 = r286189 - r286190;
return r286191;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.0 |
|---|---|
| Target | 7.6 |
| Herbie | 0.2 |
Initial program 15.0
rmApplied add-cube-cbrt15.0
Applied add-cube-cbrt15.0
Applied times-frac15.0
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019303 +o rules:numerics
(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))