Files
php-doc-ru/reference/gmp/functions/gmp-div-r.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

121 lines
3.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 039ab719e695141ee54409d26ad828337ec31d6e Maintainer: tmn Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.gmp-div-r" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>gmp_div_r</refname>
<refpurpose>Остаток от деления чисел</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>GMP</type><methodname>gmp_div_r</methodname>
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>rounding_mode</parameter><initializer><constant>GMP_ROUND_ZERO</constant></initializer></methodparam>
</methodsynopsis>
<para>
Вычисляет остаток от деления нацело числа <parameter>num1</parameter> на
<parameter>num2</parameter>. Если число <parameter>num1</parameter> отлично от
нуля, результат будет иметь знак этого числа.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>num1</parameter></term>
<listitem>
<para>
Делимое.
</para>
&gmp.parameter;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>num2</parameter></term>
<listitem>
<para>
Делитель числа <parameter>num1</parameter>.
</para>
&gmp.parameter;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>rounding_mode</parameter></term>
<listitem>
<para>
В документации к функции <function>gmp_div_q</function> приведено
описание аргумента <parameter>rounding_mode</parameter>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Остаток в виде GMP числа.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>gmp_div_r</function></title>
<programlisting role="php">
<![CDATA[
<?php
$div = gmp_div_r("105", "20");
echo gmp_strval($div) . "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
5
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>gmp_div_q</function></member>
<member><function>gmp_div_qr</function></member>
</simplelist>
</para>
</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
-->