mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 18:38:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@101383 c90b9560-bf6c-de11-be94-00142212c4b1
58 lines
1.7 KiB
XML
58 lines
1.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<refentry id="function.fmod">
|
|
<refnamediv>
|
|
<refname>fmod</refname>
|
|
<refpurpose>Returns the floating point remainder (modulo) of the division
|
|
of the arguments</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>float</type><methodname>fmod</methodname>
|
|
<methodparam><type>float</type><parameter>x</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>y</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns the floating point remainder of dividing the dividend
|
|
(<parameter>x</parameter>) by the divisor (<parameter>y</parameter>).
|
|
The reminder (<varname>r</varname>) is defined as: x = i * y + r, for
|
|
some integer <varname>i</varname>. If <parameter>y</parameter> is
|
|
non-zero, <varname>r</varname> has the same sign as
|
|
<parameter>x</parameter> and a magnitude less than the magnitude of
|
|
<parameter>y</parameter>.
|
|
</para>
|
|
<example>
|
|
<title>Using <function>fmod</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
$x = 5.7;
|
|
$y = 1.3;
|
|
$r = fmod($x, $y);
|
|
// $r equals 0.5, because 4 * 1.3 + 0.5 = 5.7
|
|
]]>
|
|
</programlisting>
|
|
</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
|
|
-->
|