x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r20105948 = x;
double r20105949 = y;
double r20105950 = r20105948 / r20105949;
double r20105951 = log(r20105950);
double r20105952 = r20105948 * r20105951;
double r20105953 = z;
double r20105954 = r20105952 - r20105953;
return r20105954;
}
double f(double x, double y, double z) {
double r20105955 = x;
double r20105956 = cbrt(r20105955);
double r20105957 = y;
double r20105958 = cbrt(r20105957);
double r20105959 = r20105956 / r20105958;
double r20105960 = log(r20105959);
double r20105961 = r20105960 + r20105960;
double r20105962 = r20105955 * r20105961;
double r20105963 = r20105960 * r20105955;
double r20105964 = r20105962 + r20105963;
double r20105965 = z;
double r20105966 = r20105964 - r20105965;
return r20105966;
}




Bits error versus x




Bits error versus y




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