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 r387775 = x;
double r387776 = y;
double r387777 = r387775 / r387776;
double r387778 = log(r387777);
double r387779 = r387775 * r387778;
double r387780 = z;
double r387781 = r387779 - r387780;
return r387781;
}
double f(double x, double y, double z) {
double r387782 = x;
double r387783 = 2.0;
double r387784 = cbrt(r387782);
double r387785 = y;
double r387786 = cbrt(r387785);
double r387787 = r387784 / r387786;
double r387788 = log(r387787);
double r387789 = r387783 * r387788;
double r387790 = r387789 + r387788;
double r387791 = r387782 * r387790;
double r387792 = z;
double r387793 = r387791 - r387792;
return r387793;
}




Bits error versus x




Bits error versus y




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