Skip to main content
Erschienen in: Numerical Algorithms 2/2021

19.03.2020 | Original Paper

Fast computation of binomial coefficients

verfasst von: Leonardo C. Araujo, João P. H. Sansão, Adriano S. Vale-Cardoso

Erschienen in: Numerical Algorithms | Ausgabe 2/2021

Einloggen

Aktivieren Sie unsere intelligente Suche um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

One problem that arises in computation involving large numbers is precision. In certain situations, the result might be represented by the standard data type, but arithmetic precision might be compromised when dealing with large numbers in the course to the result. Binomial coefficients are an example that suffer from this torment. In the present paper, we review numerical methods to compute the binomial coefficients: Pascal’s recursive method; prime factorization to cancel out terms; gamma function approximation; and a simplified iterative method that avoids loss in precision. Acknowledging that the binomial coefficients might be obtained by a successive convolution of a simple discrete rectangular function, we propose a different approach based on the discrete Fourier transform and another based on its fast implementation. We analyze and compare performance and precision of all of them. The proposed methods overcome the previous ones when computing all coefficients for a given level n, attaining better precision for large values of n.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Fußnoten
2
We have also tested the minimum, which gave similar result.
 
3
Octave documentation states that “by default numeric constants are represented within Octave by IEEE 754 double precision (binary64) floating-point format” [1] which uses 1 bit for sign, 11 to represent the exponent and 52 to the significant (53-bit precision) [12].
 
4
The bigfloat package in Python is a wrapper for the GNU MPFR library for arbitrary-precision floating-point reliable arithmetic.
 
Literatur
4.
Zurück zum Zitat Keprt, A.: Simple and fast computation of binomial coefficients. In: Wofex 2006, pp. 346–351, VŠB Technical University, Ostrava, Czech Republic, ISBN 80-248-1152-9 (2006) Keprt, A.: Simple and fast computation of binomial coefficients. In: Wofex 2006, pp. 346–351, VŠB Technical University, Ostrava, Czech Republic, ISBN 80-248-1152-9 (2006)
5.
Zurück zum Zitat Knuth, D.E.: The Art of Computer Programming: Volume 1: Fundamental Algorithms. Addison Wesley. ISBN 0-201-89683-4 (1997) Knuth, D.E.: The Art of Computer Programming: Volume 1: Fundamental Algorithms. Addison Wesley. ISBN 0-201-89683-4 (1997)
6.
Zurück zum Zitat Koepf, W.: Hypergeometric Summation: An Algorithmic Approach to Summation and Special Function Identities (Advanced Lectures in Mathematics). Vieweg Teubner Verlag. ISBN 3528069503 (1998) Koepf, W.: Hypergeometric Summation: An Algorithmic Approach to Summation and Special Function Identities (Advanced Lectures in Mathematics). Vieweg Teubner Verlag. ISBN 3528069503 (1998)
10.
Zurück zum Zitat Wells, D.: The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books. ISBN 0140080295 (1987) Wells, D.: The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books. ISBN 0140080295 (1987)
11.
Zurück zum Zitat Widrow, B., Kollár, I.: Quantization Noise: Roundoff Error in Digital Computation, Signal Processing, Control, and Communications. Cambridge University Press. ISBN 9780521886710 (2008) Widrow, B., Kollár, I.: Quantization Noise: Roundoff Error in Digital Computation, Signal Processing, Control, and Communications. Cambridge University Press. ISBN 9780521886710 (2008)
Metadaten
Titel
Fast computation of binomial coefficients
verfasst von
Leonardo C. Araujo
João P. H. Sansão
Adriano S. Vale-Cardoso
Publikationsdatum
19.03.2020
Verlag
Springer US
Erschienen in
Numerical Algorithms / Ausgabe 2/2021
Print ISSN: 1017-1398
Elektronische ISSN: 1572-9265
DOI
https://doi.org/10.1007/s11075-020-00912-x

Weitere Artikel der Ausgabe 2/2021

Numerical Algorithms 2/2021 Zur Ausgabe