x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\begin{array}{l}
\mathbf{if}\;y \le -5.89143915275239177 \cdot 10^{-102} \lor \neg \left(y \le 1.0531849876054006 \cdot 10^{-72}\right):\\
\;\;\;\;x \cdot \sqrt[3]{{\left(e^{y \cdot \left(\log z - t\right) + \log 1 \cdot a}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot e^{-\left(a \cdot b + \left(1 \cdot \left(a \cdot z\right) + 0.5 \cdot \left(a \cdot {z}^{2}\right)\right)\right)}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (x * exp(((y * (log(z) - t)) + (a * (log((1.0 - z)) - b)))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if (((y <= -5.891439152752392e-102) || !(y <= 1.0531849876054006e-72))) {
VAR = (x * cbrt(pow(exp(((y * (log(z) - t)) + (log(1.0) * a))), 3.0)));
} else {
VAR = (x * exp(-((a * b) + ((1.0 * (a * z)) + (0.5 * (a * pow(z, 2.0)))))));
}
return VAR;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a



Bits error versus b
Results
if y < -5.891439152752392e-102 or 1.0531849876054006e-72 < y Initial program 1.5
Taylor expanded around 0 0.7
rmApplied add-cbrt-cube0.8
Simplified0.8
Taylor expanded around 0 10.4
Simplified10.3
if -5.891439152752392e-102 < y < 1.0531849876054006e-72Initial program 2.5
Taylor expanded around 0 0.1
Taylor expanded around inf 4.5
Final simplification7.9
herbie shell --seed 2020075
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1 z)) b))))))