CakeFest 2024: The Official CakePHP Conference

gmp_binomial

(PHP 7 >= 7.3.0, PHP 8)

gmp_binomialCalcul le coefficient binomial

Description

gmp_binomial(GMP|int|string $n, int $k): GMP

Calcul le coefficient binomial C(n, k).

Liste de paramètres

n

Un objet GMP, un entier, ou une chaîne de caractères numérique.

k

Valeurs de retour

Retourne le coefficient binomial C(n, k).

Erreurs / Exceptions

Lance une ValueError si k est négatif. Antérieur à PHP 8.0.0, E_WARNING était émis à la place.

Historique

Version Description
8.0.0 Cette fonction ne retourne plus false en cas d'échec.
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top