The PHP Online Conference 2021

gmp_binomial

(PHP 7 >= 7.3.0)

gmp_binomialCalculates binomial coefficient

说明

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

Calculates the binomial coefficient C(n, k).

参数

n

PHP 5.5 之前为 GMP 数值资源,PHP 5.6 之后为 GMP 对象或数字,或可以转为数字的字符串。

k

返回值

Returns the binomial coefficient C(n, k), 或者在失败时返回 FALSE.

错误/异常

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