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 r139260 = x;
double r139261 = y;
double r139262 = r139260 / r139261;
double r139263 = log(r139262);
double r139264 = r139260 * r139263;
double r139265 = z;
double r139266 = r139264 - r139265;
return r139266;
}
double f(double x, double y, double z) {
double r139267 = x;
double r139268 = 2.0;
double r139269 = cbrt(r139267);
double r139270 = y;
double r139271 = cbrt(r139270);
double r139272 = r139269 / r139271;
double r139273 = log(r139272);
double r139274 = r139268 * r139273;
double r139275 = r139274 + r139273;
double r139276 = r139267 * r139275;
double r139277 = z;
double r139278 = r139276 - r139277;
return r139278;
}




Bits error versus x




Bits error versus y




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