\frac{x}{x + y \cdot e^{2 \cdot \left(\frac{z \cdot \sqrt{t + a}}{t} - \left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\begin{array}{l}
\mathbf{if}\;z \le 6.2229520126307053 \cdot 10^{271}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \mathsf{fma}\left(\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}, \frac{\sqrt{t + a}}{\sqrt[3]{t}}, -\left(b - c\right) \cdot \left(\left(a + \frac{5}{6}\right) - \frac{2}{t \cdot 3}\right)\right)}}\\
\mathbf{elif}\;z \le 1.0438459173559374 \cdot 10^{300}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\left(z \cdot \sqrt{t + a}\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right) - 0}{t \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot e^{2 \cdot \frac{\left(z \cdot \sqrt{t + a}\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right) - t \cdot \left(\left(b - c\right) \cdot \left(\left(a \cdot a - \frac{5}{6} \cdot \frac{5}{6}\right) \cdot \left(t \cdot 3\right) - \left(a - \frac{5}{6}\right) \cdot 2\right)\right)}{t \cdot \left(\left(a - \frac{5}{6}\right) \cdot \left(t \cdot 3\right)\right)}}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c) {
return (x / (x + (y * exp((2.0 * (((z * sqrt((t + a))) / t) - ((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double VAR;
if ((z <= 6.222952012630705e+271)) {
VAR = (x / (x + (y * exp((2.0 * fma((z / (cbrt(t) * cbrt(t))), (sqrt((t + a)) / cbrt(t)), -((b - c) * ((a + (5.0 / 6.0)) - (2.0 / (t * 3.0))))))))));
} else {
double VAR_1;
if ((z <= 1.0438459173559374e+300)) {
VAR_1 = (x / (x + (y * exp((2.0 * ((((z * sqrt((t + a))) * ((a - (5.0 / 6.0)) * (t * 3.0))) - 0.0) / (t * ((a - (5.0 / 6.0)) * (t * 3.0)))))))));
} else {
VAR_1 = (x / (x + (y * exp((2.0 * ((((z * sqrt((t + a))) * ((a - (5.0 / 6.0)) * (t * 3.0))) - (t * ((b - c) * ((((a * a) - ((5.0 / 6.0) * (5.0 / 6.0))) * (t * 3.0)) - ((a - (5.0 / 6.0)) * 2.0))))) / (t * ((a - (5.0 / 6.0)) * (t * 3.0)))))))));
}
VAR = VAR_1;
}
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




Bits error versus c
Results
| Original | 4.0 |
|---|---|
| Target | 3.0 |
| Herbie | 2.2 |
if z < 6.222952012630705e+271Initial program 3.7
rmApplied add-cube-cbrt3.7
Applied times-frac2.6
Applied fma-neg1.6
if 6.222952012630705e+271 < z < 1.0438459173559374e+300Initial program 15.9
rmApplied flip-+19.3
Applied frac-sub23.6
Applied associate-*r/25.9
Applied frac-sub27.0
Taylor expanded around 0 21.2
if 1.0438459173559374e+300 < z Initial program 11.3
rmApplied flip-+13.6
Applied frac-sub17.0
Applied associate-*r/18.3
Applied frac-sub24.0
Final simplification2.2
herbie shell --seed 2020103 +o rules:numerics
(FPCore (x y z t a b c)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, I"
:precision binary64
:herbie-target
(if (< t -2.118326644891581e-50) (/ x (+ x (* y (exp (* 2 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2 (/ (- (* (* z (sqrt (+ t a))) (* (* 3 t) (- a (/ 5 6)))) (* (- (* (+ (/ 5 6) a) (* 3 t)) 2) (* (- a (/ 5 6)) (* (- b c) t)))) (* (* (* t t) 3) (- a (/ 5 6))))))))) (/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3))))))))))))
(/ x (+ x (* y (exp (* 2 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5 6)) (/ 2 (* t 3)))))))))))