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 r464309 = x;
double r464310 = y;
double r464311 = r464309 / r464310;
double r464312 = log(r464311);
double r464313 = r464309 * r464312;
double r464314 = z;
double r464315 = r464313 - r464314;
return r464315;
}
double f(double x, double y, double z) {
double r464316 = x;
double r464317 = 2.0;
double r464318 = cbrt(r464316);
double r464319 = y;
double r464320 = cbrt(r464319);
double r464321 = r464318 / r464320;
double r464322 = log(r464321);
double r464323 = r464317 * r464322;
double r464324 = r464323 + r464322;
double r464325 = r464316 * r464324;
double r464326 = z;
double r464327 = r464325 - r464326;
return r464327;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 15.1
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020046 +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.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))