x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right)\right) \cdot x - zdouble f(double x, double y, double z) {
double r19039535 = x;
double r19039536 = y;
double r19039537 = r19039535 / r19039536;
double r19039538 = log(r19039537);
double r19039539 = r19039535 * r19039538;
double r19039540 = z;
double r19039541 = r19039539 - r19039540;
return r19039541;
}
double f(double x, double y, double z) {
double r19039542 = x;
double r19039543 = cbrt(r19039542);
double r19039544 = y;
double r19039545 = cbrt(r19039544);
double r19039546 = r19039543 / r19039545;
double r19039547 = log(r19039546);
double r19039548 = r19039547 + r19039547;
double r19039549 = r19039547 + r19039548;
double r19039550 = r19039549 * r19039542;
double r19039551 = z;
double r19039552 = r19039550 - r19039551;
return r19039552;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.7 |
|---|---|
| Target | 7.6 |
| Herbie | 0.2 |
Initial program 15.7
rmApplied add-cube-cbrt15.7
Applied add-cube-cbrt15.7
Applied times-frac15.7
Applied log-prod3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2019192 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))