x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x + \sqrt[3]{\left(\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)\right) \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)} \cdot x\right) - zdouble f(double x, double y, double z) {
double r24222896 = x;
double r24222897 = y;
double r24222898 = r24222896 / r24222897;
double r24222899 = log(r24222898);
double r24222900 = r24222896 * r24222899;
double r24222901 = z;
double r24222902 = r24222900 - r24222901;
return r24222902;
}
double f(double x, double y, double z) {
double r24222903 = x;
double r24222904 = cbrt(r24222903);
double r24222905 = y;
double r24222906 = cbrt(r24222905);
double r24222907 = r24222904 / r24222906;
double r24222908 = log(r24222907);
double r24222909 = r24222908 * r24222903;
double r24222910 = r24222908 + r24222908;
double r24222911 = r24222910 * r24222910;
double r24222912 = r24222911 * r24222910;
double r24222913 = cbrt(r24222912);
double r24222914 = r24222913 * r24222903;
double r24222915 = r24222909 + r24222914;
double r24222916 = z;
double r24222917 = r24222915 - r24222916;
return r24222917;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.6 |
| Herbie | 0.3 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.5
Applied distribute-rgt-in3.5
Simplified3.5
rmApplied add-cbrt-cube3.5
Simplified0.3
Final simplification0.3
herbie shell --seed 2019169 +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))