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 r465440 = x;
double r465441 = y;
double r465442 = r465440 / r465441;
double r465443 = log(r465442);
double r465444 = r465440 * r465443;
double r465445 = z;
double r465446 = r465444 - r465445;
return r465446;
}
double f(double x, double y, double z) {
double r465447 = 2.0;
double r465448 = x;
double r465449 = cbrt(r465448);
double r465450 = y;
double r465451 = cbrt(r465450);
double r465452 = r465449 / r465451;
double r465453 = log(r465452);
double r465454 = r465447 * r465453;
double r465455 = 1.0;
double r465456 = r465454 * r465455;
double r465457 = r465456 * r465448;
double r465458 = r465448 * r465453;
double r465459 = r465457 + r465458;
double r465460 = z;
double r465461 = r465459 - r465460;
return r465461;
}




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