\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}\;t \leq -1.6844335713955825 \cdot 10^{-113}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\
\mathbf{elif}\;t \leq -2.683950136323593 \cdot 10^{-266}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\
\mathbf{elif}\;t \leq -4.595287319339345 \cdot 10^{-303}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(c \cdot \left(a + 0.8333333333333334\right) - a \cdot b\right)\right)}}\\
\mathbf{elif}\;t \leq 0.000868470817534886:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(\frac{z \cdot \left(\sqrt{t + a} \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)\right) + t \cdot \left(\left(b - c\right) \cdot \left(\left(a - \frac{5}{6}\right) \cdot 0.6666666666666666 + t \cdot \left(\frac{5}{6} \cdot \frac{5}{6} - a \cdot a\right)\right)\right)}{t \cdot \left(t \cdot \left(a - \frac{5}{6}\right)\right)}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + y \cdot {\left(e^{2}\right)}^{\left(z \cdot \frac{\sqrt{t + a}}{t} + \left(b - c\right) \cdot \left(\log \left(e^{\frac{2}{t \cdot 3}}\right) - \left(a + \frac{5}{6}\right)\right)\right)}}\\
\end{array}(FPCore (x y z t a b c)
:precision binary64
(/
x
(+
x
(*
y
(exp
(*
2.0
(-
(/ (* z (sqrt (+ t a))) t)
(* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.6844335713955825e-113)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(* z (/ (sqrt (+ t a)) t))
(- (* c (+ a 0.8333333333333334)) (* a b)))))))
(if (<= t -2.683950136323593e-266)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(/
(+
(* z (* (sqrt (+ t a)) (* t (- a (/ 5.0 6.0)))))
(*
t
(*
(- b c)
(+
(* (- a (/ 5.0 6.0)) 0.6666666666666666)
(* t (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a a)))))))
(* t (* t (- a (/ 5.0 6.0)))))))))
(if (<= t -4.595287319339345e-303)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(* z (/ (sqrt (+ t a)) t))
(- (* c (+ a 0.8333333333333334)) (* a b)))))))
(if (<= t 0.000868470817534886)
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(/
(+
(* z (* (sqrt (+ t a)) (* t (- a (/ 5.0 6.0)))))
(*
t
(*
(- b c)
(+
(* (- a (/ 5.0 6.0)) 0.6666666666666666)
(* t (- (* (/ 5.0 6.0) (/ 5.0 6.0)) (* a a)))))))
(* t (* t (- a (/ 5.0 6.0)))))))))
(/
x
(+
x
(*
y
(pow
(exp 2.0)
(+
(* z (/ (sqrt (+ t a)) t))
(*
(- b c)
(- (log (exp (/ 2.0 (* t 3.0)))) (+ a (/ 5.0 6.0))))))))))))))double code(double x, double y, double z, double t, double a, double b, double c) {
return (x / ((double) (x + ((double) (y * ((double) exp(((double) (2.0 * ((double) ((((double) (z * ((double) sqrt(((double) (t + a)))))) / t) - ((double) (((double) (b - c)) * ((double) (((double) (a + (5.0 / 6.0))) - (2.0 / ((double) (t * 3.0))))))))))))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.6844335713955825e-113)) {
tmp = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (c * ((double) (a + 0.8333333333333334)))) - ((double) (a * b)))))))))))));
} else {
double tmp_1;
if ((t <= -2.683950136323593e-266)) {
tmp_1 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), (((double) (((double) (z * ((double) (((double) sqrt(((double) (t + a)))) * ((double) (t * ((double) (a - (5.0 / 6.0))))))))) + ((double) (t * ((double) (((double) (b - c)) * ((double) (((double) (((double) (a - (5.0 / 6.0))) * 0.6666666666666666)) + ((double) (t * ((double) (((double) ((5.0 / 6.0) * (5.0 / 6.0))) - ((double) (a * a)))))))))))))) / ((double) (t * ((double) (t * ((double) (a - (5.0 / 6.0)))))))))))))));
} else {
double tmp_2;
if ((t <= -4.595287319339345e-303)) {
tmp_2 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (c * ((double) (a + 0.8333333333333334)))) - ((double) (a * b)))))))))))));
} else {
double tmp_3;
if ((t <= 0.000868470817534886)) {
tmp_3 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), (((double) (((double) (z * ((double) (((double) sqrt(((double) (t + a)))) * ((double) (t * ((double) (a - (5.0 / 6.0))))))))) + ((double) (t * ((double) (((double) (b - c)) * ((double) (((double) (((double) (a - (5.0 / 6.0))) * 0.6666666666666666)) + ((double) (t * ((double) (((double) ((5.0 / 6.0) * (5.0 / 6.0))) - ((double) (a * a)))))))))))))) / ((double) (t * ((double) (t * ((double) (a - (5.0 / 6.0)))))))))))))));
} else {
tmp_3 = (x / ((double) (x + ((double) (y * ((double) pow(((double) exp(2.0)), ((double) (((double) (z * (((double) sqrt(((double) (t + a)))) / t))) + ((double) (((double) (b - c)) * ((double) (((double) log(((double) exp((2.0 / ((double) (t * 3.0))))))) - ((double) (a + (5.0 / 6.0))))))))))))))));
}
tmp_2 = tmp_3;
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}




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 | 3.9 |
|---|---|
| Target | 3.1 |
| Herbie | 4.1 |
if t < -1.68443357139558254e-113 or -2.683950136323593e-266 < t < -4.5952873193393448e-303Initial program Error: 4.6 bits
SimplifiedError: 4.5 bits
Taylor expanded around 0 Error: 4.5 bits
Taylor expanded around inf Error: 7.3 bits
SimplifiedError: 7.3 bits
if -1.68443357139558254e-113 < t < -2.683950136323593e-266 or -4.5952873193393448e-303 < t < 8.6847081753488602e-4Initial program Error: 4.9 bits
SimplifiedError: 6.2 bits
Taylor expanded around 0 Error: 6.2 bits
rmApplied flip-+Error: 8.7 bits
Applied frac-subError: 8.7 bits
Applied associate-*r/Error: 8.7 bits
Applied associate-*r/Error: 7.6 bits
Applied frac-addError: 6.3 bits
SimplifiedError: 7.0 bits
if 8.6847081753488602e-4 < t Initial program Error: 2.6 bits
SimplifiedError: 0.2 bits
rmApplied add-log-expError: 0.2 bits
Final simplificationError: 4.1 bits
herbie shell --seed 2020203
(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.0 (- (+ (* a c) (* 0.8333333333333334 c)) (* a b))))))) (if (< t 5.196588770651547e-123) (/ x (+ x (* y (exp (* 2.0 (/ (- (* (* z (sqrt (+ t a))) (* (* 3.0 t) (- a (/ 5.0 6.0)))) (* (- (* (+ (/ 5.0 6.0) a) (* 3.0 t)) 2.0) (* (- a (/ 5.0 6.0)) (* (- b c) t)))) (* (* (* t t) 3.0) (- a (/ 5.0 6.0))))))))) (/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0))))))))))))
(/ x (+ x (* y (exp (* 2.0 (- (/ (* z (sqrt (+ t a))) t) (* (- b c) (- (+ a (/ 5.0 6.0)) (/ 2.0 (* t 3.0)))))))))))