x + \frac{e^{y \cdot \log \left(\frac{y}{z + y}\right)}}{y}x + \frac{e^{\left(2 \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)\right) \cdot y + y \cdot \log \left(\frac{\sqrt[3]{y}}{\sqrt[3]{z + y}}\right)}}{y}double f(double x, double y, double z) {
double r263808 = x;
double r263809 = y;
double r263810 = z;
double r263811 = r263810 + r263809;
double r263812 = r263809 / r263811;
double r263813 = log(r263812);
double r263814 = r263809 * r263813;
double r263815 = exp(r263814);
double r263816 = r263815 / r263809;
double r263817 = r263808 + r263816;
return r263817;
}
double f(double x, double y, double z) {
double r263818 = x;
double r263819 = 2.0;
double r263820 = y;
double r263821 = cbrt(r263820);
double r263822 = z;
double r263823 = r263822 + r263820;
double r263824 = cbrt(r263823);
double r263825 = r263821 / r263824;
double r263826 = log(r263825);
double r263827 = r263819 * r263826;
double r263828 = r263827 * r263820;
double r263829 = r263820 * r263826;
double r263830 = r263828 + r263829;
double r263831 = exp(r263830);
double r263832 = r263831 / r263820;
double r263833 = r263818 + r263832;
return r263833;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.0 |
|---|---|
| Target | 1.1 |
| Herbie | 1.1 |
Initial program 6.0
rmApplied add-cube-cbrt19.4
Applied add-cube-cbrt6.1
Applied times-frac6.1
Applied log-prod2.1
Applied distribute-lft-in2.1
Simplified1.1
Final simplification1.1
herbie shell --seed 2019303 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, G"
:precision binary64
:herbie-target
(if (< (/ y (+ z y)) 7.1154157598e-315) (+ x (/ (exp (/ -1 z)) y)) (+ x (/ (exp (log (pow (/ y (+ y z)) y))) y)))
(+ x (/ (exp (* y (log (/ y (+ z y))))) y)))