# Numerically evaluating giant fractions

I would like to know the numerical value of a giant fraction, which I got from doing some combinatoric calculation (n choose k gets huge).

For example, say I have

Sum[Binomial[2048, k] (1/5)^k (4/5)^(2048 - k), {k, 9728/25, 10752/
25}]


This code runs fine and gives me a huge fraction, and I know its value should be somewhere between .6 and 1. However, I cannot simply use N[] or Round[] since the value gets too large/too small as Mathematica tries to work it out and reaches the precision limits of machine numbers.

What other options do I have for finding the value of this fraction?

• Note that sometimes even numeric expressions can be simplified. LeafCount /@ {sum, sum // Simplify} evaluates to {575, 295} Dec 21, 2022 at 5:54

one option

res = Sum[Binomial[2048, k] (1/5)^k (4/5)^(2048 - k), {k, 9728/25, 10752/25}];
N[res, 50]


Compare to

N[res]


Note that N with no options uses MachinePrecision. From help

Which is only

But note what help says

Better is using general symbolic solution of series:

series = Sum[Binomial[c, k] (1/5)^k (4/5)^(c - k), {k, a, b}, Assumptions -> {a > 0, b > 0, c > 0, c > b}]

(*4^(-1 - a - b + c) 5^-c (4^(1 + b)
Binomial[c, a] Hypergeometric2F1[1, a - c, 1 + a, -(1/4)] -
4^a Binomial[c, 1 + b] Hypergeometric2F1[1, 1 + b - c,
2 + b, -(1/4)])*)

f = series /. {a -> 9728/25, b -> 10752/25, c -> 2048} (*Short expression*)

N[f, 20]

(*0.75358037090014508511*)