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 r24316110 = x;
double r24316111 = y;
double r24316112 = r24316110 / r24316111;
double r24316113 = log(r24316112);
double r24316114 = r24316110 * r24316113;
double r24316115 = z;
double r24316116 = r24316114 - r24316115;
return r24316116;
}
double f(double x, double y, double z) {
double r24316117 = x;
double r24316118 = cbrt(r24316117);
double r24316119 = y;
double r24316120 = cbrt(r24316119);
double r24316121 = r24316118 / r24316120;
double r24316122 = log(r24316121);
double r24316123 = r24316122 + r24316122;
double r24316124 = r24316117 * r24316123;
double r24316125 = r24316122 * r24316117;
double r24316126 = r24316124 + r24316125;
double r24316127 = z;
double r24316128 = r24316126 - r24316127;
return r24316128;
}




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-rgt-in3.6
Simplified3.6
rmApplied log-prod0.2
Final simplification0.2
herbie shell --seed 2019163
(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))