x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r32686252 = x;
double r32686253 = y;
double r32686254 = r32686252 / r32686253;
double r32686255 = log(r32686254);
double r32686256 = r32686252 * r32686255;
double r32686257 = z;
double r32686258 = r32686256 - r32686257;
return r32686258;
}
double f(double x, double y, double z) {
double r32686259 = x;
double r32686260 = cbrt(r32686259);
double r32686261 = y;
double r32686262 = cbrt(r32686261);
double r32686263 = r32686260 / r32686262;
double r32686264 = log(r32686263);
double r32686265 = r32686264 + r32686264;
double r32686266 = r32686259 * r32686265;
double r32686267 = r32686264 * r32686259;
double r32686268 = r32686266 + r32686267;
double r32686269 = z;
double r32686270 = r32686268 - r32686269;
return r32686270;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.8 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.8
rmApplied add-cube-cbrt15.8
Applied add-cube-cbrt15.8
Applied times-frac15.8
Applied log-prod3.9
Applied distribute-rgt-in3.9
Simplified3.9
rmApplied log-prod0.2
Final simplification0.2
herbie shell --seed 2019174 +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))