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 r414557 = x;
double r414558 = y;
double r414559 = r414557 / r414558;
double r414560 = log(r414559);
double r414561 = r414557 * r414560;
double r414562 = z;
double r414563 = r414561 - r414562;
return r414563;
}
double f(double x, double y, double z) {
double r414564 = x;
double r414565 = 2.0;
double r414566 = cbrt(r414564);
double r414567 = y;
double r414568 = cbrt(r414567);
double r414569 = r414566 / r414568;
double r414570 = log(r414569);
double r414571 = r414565 * r414570;
double r414572 = r414571 + r414570;
double r414573 = r414564 * r414572;
double r414574 = z;
double r414575 = r414573 - r414574;
return r414575;
}




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
(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))