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 r27149881 = x;
double r27149882 = y;
double r27149883 = r27149881 / r27149882;
double r27149884 = log(r27149883);
double r27149885 = r27149881 * r27149884;
double r27149886 = z;
double r27149887 = r27149885 - r27149886;
return r27149887;
}
double f(double x, double y, double z) {
double r27149888 = x;
double r27149889 = cbrt(r27149888);
double r27149890 = y;
double r27149891 = cbrt(r27149890);
double r27149892 = r27149889 / r27149891;
double r27149893 = log(r27149892);
double r27149894 = r27149893 + r27149893;
double r27149895 = r27149888 * r27149894;
double r27149896 = r27149893 * r27149888;
double r27149897 = r27149895 + r27149896;
double r27149898 = z;
double r27149899 = r27149897 - r27149898;
return r27149899;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.8 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.8
rmApplied add-cube-cbrt15.8
Applied add-cube-cbrt15.8
Applied times-frac15.8
Applied log-prod3.9
Applied distribute-rgt-in3.9
Simplified3.9
rmApplied log-prod0.2
Final simplification0.2
herbie shell --seed 2019174
(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))