x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot x - z\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)double f(double x, double y, double z) {
double r360704 = x;
double r360705 = y;
double r360706 = r360704 / r360705;
double r360707 = log(r360706);
double r360708 = r360704 * r360707;
double r360709 = z;
double r360710 = r360708 - r360709;
return r360710;
}
double f(double x, double y, double z) {
double r360711 = 2.0;
double r360712 = x;
double r360713 = cbrt(r360712);
double r360714 = y;
double r360715 = cbrt(r360714);
double r360716 = r360713 / r360715;
double r360717 = log(r360716);
double r360718 = r360711 * r360717;
double r360719 = r360718 * r360712;
double r360720 = z;
double r360721 = r360719 - r360720;
double r360722 = r360712 * r360717;
double r360723 = r360721 + r360722;
return r360723;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.6
Applied distribute-lft-in3.6
rmApplied times-frac3.6
Applied log-prod0.2
rmApplied add-cube-cbrt0.2
Final simplification0.2
herbie shell --seed 2019308
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.59507779908377277e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))