x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot 1\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r423238 = x;
double r423239 = y;
double r423240 = r423238 / r423239;
double r423241 = log(r423240);
double r423242 = r423238 * r423241;
double r423243 = z;
double r423244 = r423242 - r423243;
return r423244;
}
double f(double x, double y, double z) {
double r423245 = 2.0;
double r423246 = x;
double r423247 = cbrt(r423246);
double r423248 = y;
double r423249 = cbrt(r423248);
double r423250 = r423247 / r423249;
double r423251 = log(r423250);
double r423252 = r423245 * r423251;
double r423253 = 1.0;
double r423254 = r423252 * r423253;
double r423255 = r423254 * r423246;
double r423256 = r423246 * r423251;
double r423257 = r423255 + r423256;
double r423258 = z;
double r423259 = r423257 - r423258;
return r423259;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 16.0 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 16.0
rmApplied add-cube-cbrt16.0
Applied add-cube-cbrt16.0
Applied times-frac16.0
Applied log-prod3.8
Applied distribute-lft-in3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2020001 +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))