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 r420063 = x;
double r420064 = y;
double r420065 = r420063 / r420064;
double r420066 = log(r420065);
double r420067 = r420063 * r420066;
double r420068 = z;
double r420069 = r420067 - r420068;
return r420069;
}
double f(double x, double y, double z) {
double r420070 = x;
double r420071 = 2.0;
double r420072 = cbrt(r420070);
double r420073 = y;
double r420074 = cbrt(r420073);
double r420075 = r420072 / r420074;
double r420076 = log(r420075);
double r420077 = r420071 * r420076;
double r420078 = r420077 + r420076;
double r420079 = r420070 * r420078;
double r420080 = z;
double r420081 = r420079 - r420080;
return r420081;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020036 +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))