x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r492297 = x;
double r492298 = y;
double r492299 = r492297 / r492298;
double r492300 = log(r492299);
double r492301 = r492297 * r492300;
double r492302 = z;
double r492303 = r492301 - r492302;
return r492303;
}
double f(double x, double y, double z) {
double r492304 = x;
double r492305 = 2.0;
double r492306 = cbrt(r492304);
double r492307 = y;
double r492308 = cbrt(r492307);
double r492309 = r492306 / r492308;
double r492310 = log(r492309);
double r492311 = r492305 * r492310;
double r492312 = r492304 * r492311;
double r492313 = r492304 * r492310;
double r492314 = r492312 + r492313;
double r492315 = z;
double r492316 = r492314 - r492315;
return r492316;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.6
Applied distribute-lft-in3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2020064
(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))