gmp_binomial

(PHP 7 >= 7.3.0, PHP 8)

gmp_binomialCalculates binomial coefficient

Descrição

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

Calculates the binomial coefficient C(n, k).

Parâmetros

n

Ele pode ser qualquer número GMP resource, ou uma string numérica que é possível convertê-la para um número.

k

Valor Retornado

Returns the binomial coefficient C(n, k).

Erros

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

Changelog

Versão Descrição
8.0.0 This function no longer returns false on failure.
add a note add a note

User Contributed Notes

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