tony2001 Mon Apr 3 18:13:21 2006 UTC Added files: /phpdoc/en/reference/gmp/functions gmp-nextprime.xml Log: add documentation for gmp_nextprime()
http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/gmp/functions/gmp-nextprime.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/gmp/functions/gmp-nextprime.xml +++ phpdoc/en/reference/gmp/functions/gmp-nextprime.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry id="function.gmp-nextprime"> <refnamediv> <refname>gmp_nextprime</refname> <refpurpose>Find next prime number</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>resource</type><methodname>gmp_nextprime</methodname> <methodparam><type>int</type><parameter>a</parameter></methodparam> </methodsynopsis> <para> Return next prime number greater than <parameter>a</parameter>. </para> <para> This function uses a probabilistic algorithm to identify primes and chances to get a composite number are extremely small. </para> <example> <title><function>gmp_nextprime</function> example</title> <programlisting role="php"> <![CDATA[ <?php $prime1 = gmp_nextprime(10); // next prime number greater than 10 $prime2 = gmp_nextprime(-1000); // next prime number greater than -1000 echo gmp_strval($prime1) . "\n"; echo gmp_strval($prime2) . "\n"; ?> ]]> </programlisting> <para> The printout of the above program is: </para> <screen> <![CDATA[ 11 -997 ]]> </screen> </example> </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:"../../../../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 -->