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 r678153 = x;
double r678154 = y;
double r678155 = r678153 / r678154;
double r678156 = log(r678155);
double r678157 = r678153 * r678156;
double r678158 = z;
double r678159 = r678157 - r678158;
return r678159;
}
double f(double x, double y, double z) {
double r678160 = x;
double r678161 = 2.0;
double r678162 = cbrt(r678160);
double r678163 = y;
double r678164 = cbrt(r678163);
double r678165 = r678162 / r678164;
double r678166 = log(r678165);
double r678167 = r678161 * r678166;
double r678168 = r678167 + r678166;
double r678169 = r678160 * r678168;
double r678170 = z;
double r678171 = r678169 - r678170;
return r678171;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 8.1 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020045 +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))