3

Recall IEEE Double Precision Arithmetic. Now, for which n > 1 can binom(n,k) be computed in IEEE Double Precision? Additionally on the same interval, when will intermediate factorial values overflow?

For my first question, I have found the interval n < 2^53. Not sure if this is correct though.

Ilya
  • 4,583
  • 4
  • 26
  • 51
manu solan
  • 31
  • 3
  • 1
    Just a comment (and this applies to your other [Factorial Overflow on an Interval for n>1](http://mathoverflow.net/questions/229310/factorial-overflow-on-an-interval-for-n1) as well) but the title doesn't match the contents of the question. It's not clear whether you really mean `be computed`, or `be represented`. If the former, then using factorials would be a poor choice as far as both precision and performance go. Compare for example `binom(n, n-1) = n! / (n-1)! 1!` vs. `binom(n, n-1) = n`. – dxiv Jan 26 '16 at 07:05
  • @dxiv I mean be represented. So how would I continue to show this? Is my first answer correct? – manu solan Jan 26 '16 at 16:44
  • @manusolan, please put this information (that you are are asking about representation, not computation) in the question. And also please put correct tags next time. – Ilya Jan 27 '16 at 06:06

1 Answers1

1

For a given n the largest binom(n, k) value is attained for k = [n/2] (integer part of n/2). For binom(n, k) to be representable in double precision precision format, it is therefore sufficient for binom(n, [n/2]) to be representable.

The following lists the number of bits (binary digits) required for the exact representation of binom(n, [n/2]) (retrieved from Wolfram Alpha using queries similar to this one).

 n       binom(n, [n/2])

56          53 bits
57          54 bits

The following lists the values in binary exponent form for binom(n, [n/2]).

 n       binom(n, [n/2])

1029     1.1... * 2^1023
1030     1.1... * 2^1024

The max n for which all binom(n, k) can be exactly represented in a double precision floating point (53 bits mantissa) is 56.

The max n for which all binom(n, k) can be approximately represented in a double precision floating point (11 bit exponent) is 1029.

The similar max limits for n! are n = 18 (exact representation) and n = 170 (floating point approximation).

dxiv
  • 16,984
  • 2
  • 27
  • 49