x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}}\right) \cdot x - z\right)double f(double x, double y, double z) {
double r19412105 = x;
double r19412106 = y;
double r19412107 = r19412105 / r19412106;
double r19412108 = log(r19412107);
double r19412109 = r19412105 * r19412108;
double r19412110 = z;
double r19412111 = r19412109 - r19412110;
return r19412111;
}
double f(double x, double y, double z) {
double r19412112 = x;
double r19412113 = cbrt(r19412112);
double r19412114 = y;
double r19412115 = cbrt(r19412114);
double r19412116 = r19412113 / r19412115;
double r19412117 = log(r19412116);
double r19412118 = r19412117 + r19412117;
double r19412119 = r19412112 * r19412118;
double r19412120 = r19412115 * r19412115;
double r19412121 = cbrt(r19412120);
double r19412122 = cbrt(r19412115);
double r19412123 = r19412121 * r19412122;
double r19412124 = r19412113 / r19412123;
double r19412125 = log(r19412124);
double r19412126 = r19412125 * r19412112;
double r19412127 = z;
double r19412128 = r19412126 - r19412127;
double r19412129 = r19412119 + r19412128;
return r19412129;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.7 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.7
rmApplied add-cube-cbrt15.7
Applied add-cube-cbrt15.7
Applied times-frac15.7
Applied log-prod3.4
Applied distribute-rgt-in3.4
Applied associate--l+3.4
rmApplied add-cube-cbrt3.4
Applied cbrt-prod3.4
rmApplied times-frac3.4
Applied log-prod0.2
Final simplification0.2
herbie shell --seed 2019165
(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))