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 r401345 = x;
double r401346 = y;
double r401347 = r401345 / r401346;
double r401348 = log(r401347);
double r401349 = r401345 * r401348;
double r401350 = z;
double r401351 = r401349 - r401350;
return r401351;
}
double f(double x, double y, double z) {
double r401352 = 2.0;
double r401353 = x;
double r401354 = cbrt(r401353);
double r401355 = y;
double r401356 = cbrt(r401355);
double r401357 = r401354 / r401356;
double r401358 = log(r401357);
double r401359 = r401352 * r401358;
double r401360 = 1.0;
double r401361 = r401359 * r401360;
double r401362 = r401361 * r401353;
double r401363 = r401353 * r401358;
double r401364 = r401362 + r401363;
double r401365 = z;
double r401366 = r401364 - r401365;
return r401366;
}




Bits error versus x




Bits error versus y




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