PHP 8.4.0 RC4 available for testing

gmp_binomial

(PHP 7 >= 7.3.0, PHP 8)

gmp_binomialCalculates binomial coefficient

Beschreibung

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

Calculates the binomial coefficient C(n, k).

Parameter-Liste

n

Ein GMP-Object, ein Integer oder eine numeriche Zeichenkette.

k

Rückgabewerte

Returns the binomial coefficient C(n, k).

Fehler/Exceptions

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

Changelog

Version Beschreibung
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