mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added warning to gmp_init
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@47587 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
739c68b9a4
commit
6ea02e0092
1 changed files with 19 additions and 0 deletions
|
@ -86,6 +86,25 @@ print gmp_strval (fact (1000)) . "\n";
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
If you want to explicitely specify an integer, do not use
|
||||
<literal>gmp_init(12378473895798475827348979342)</literal>,
|
||||
since first the integer-literal will be interpreted,
|
||||
resulting in an
|
||||
<link linkend="language.types.integer.overflow">overflow</link>
|
||||
and thus in zero, and then gmp_init is called with that
|
||||
zero as argument.
|
||||
<!-- TODO: wrong, it will be converted to float (type-jug), which
|
||||
will lead to loss of precision. -->
|
||||
</para>
|
||||
<simpara>
|
||||
Instead, use
|
||||
<literal>gmp_init('12378473895798475827348979342')</literal>
|
||||
</simpara>
|
||||
</warning>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
It is not necessary to call this function if you want to use
|
||||
|
|
Loading…
Reference in a new issue