x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r398109 = x;
double r398110 = y;
double r398111 = r398109 / r398110;
double r398112 = log(r398111);
double r398113 = r398109 * r398112;
double r398114 = z;
double r398115 = r398113 - r398114;
return r398115;
}
double f(double x, double y, double z) {
double r398116 = x;
double r398117 = 2.0;
double r398118 = cbrt(r398116);
double r398119 = y;
double r398120 = cbrt(r398119);
double r398121 = r398118 / r398120;
double r398122 = log(r398121);
double r398123 = r398117 * r398122;
double r398124 = r398123 + r398122;
double r398125 = r398116 * r398124;
double r398126 = z;
double r398127 = r398125 - r398126;
return r398127;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))