section_path: Computing the digits
section_name: Computing the digits
paragraph_text: Computing the digits
  
  One way to compute the digits of e is with the series e = ∑ k = 0 ∞ 1 k !. {\displaystyle e=\sum _{k=0}^{\infty }{\frac {1}{k!}}.}
  
  A faster method involves two recursive functions p (a, b) {\displaystyle p(a,b)} and q (a, b) {\displaystyle q(a,b)}. The functions are defined as (p (a, b) q (a, b)) = { (1 b), if b = a + 1, (p (a, m) q (m, b) + p (m, b) q (a, m) q (m, b)), otherwise, where m = ⌊ (a + b) / 2 ⌋. {\displaystyle {\binom {p(a,b)}{q(a,b)}}={\begin{cases}{\binom {1}{b}},&{\text{if }}b=a+1{\text{,}}\\{\binom {p(a,m)q(m,b)+p(m,b)}{q(a,m)q(m,b)}},&{\text{otherwise, where }}m=\lfloor (a+b)/2\rfloor.\end{cases}}}
  
  The expression 1 + p (0, n) q (0, n) {\displaystyle 1+{\frac {p(0,n)}{q(0,n)}}} produces the n th partial sum of the series above. This method uses binary splitting to compute e with fewer single-digit arithmetic operations and thus reduced bit complexity. Combining this with fast Fourier transform -based methods of multiplying integers makes computing the digits very fast.