CakeFest 2024: The Official CakePHP Conference

gmp_binomial

(PHP 7 >= 7.3.0, PHP 8)

gmp_binomialCalculates binomial coefficient

Descripción

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

Calculates the binomial coefficient C(n, k).

Parámetros

n

resource de número de GMP en PHP 5.5 y anterior, o un objeto de GMP en PHP 5.6 y posterior, o un string numérico siempre que sea posible convertirlo a un número.

k

Valores devueltos

Returns the binomial coefficient C(n, k).

Errores/Excepciones

Throws ValueError if k is negative. Prior to PHP 8.0.0, E_WARNING was issued instead.

Historial de cambios

Versión Descripción
8.0.0 This function no longer returns false on failure.
add a note

User Contributed Notes

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