<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.gmp-binomial" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>gmp_binomial</refname>
  <refpurpose>Calculates binomial coefficient</refpurpose>
 </refnamediv>

  <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>GMP</type><methodname>gmp_binomial</methodname>
   <methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>n</parameter></methodparam>
   <methodparam><type>int</type><parameter>k</parameter></methodparam>
  </methodsynopsis>
  <para>
   Calculates the binomial coefficient C(n, k).
  </para>
 </refsect1>


  <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>n</parameter></term>
     <listitem>
      &gmp.parameter;
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>k</parameter></term>
     <listitem>
      <para>

      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

  <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the binomial coefficient C(n, k).
  </para>
 </refsect1>
 
 <refsect1 role="errors">
  &reftitle.errors;
  <para>
   Throws <classname>ValueError</classname> if <parameter>k</parameter> is negative.
   Prior to PHP 8.0.0, <constant>E_WARNING</constant> was issued instead.
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>8.0.0</entry>
      <entry>
       This function no longer returns &false; on failure.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
