php[world] 2019 — 25 years of PHP

gmp_binomial

(PHP 7 >= 7.3.0)

gmp_binomialCalculates binomial coefficient

Description

gmp_binomial ( mixed $n , int $k ) : GMP

Calculates the binomial coefficient C(n, k).

Parameters

n

Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.

k

Return Values

Returns the binomial coefficient C(n, k), or FALSE on failure.

Errors/Exceptions

Issues E_WARNING if k is negative.

add a note add a note

User Contributed Notes

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