mirror of
https://github.com/php/doc-pl.git
synced 2026-03-24 15:12:16 +01:00
110 lines
3.0 KiB
XML
110 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 2b7eebaaf61adf4b14a18a046f1a6c2b61cc8e72 Maintainer: sobak Status: ready -->
|
|
<refentry xml:id="function.fdiv" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>fdiv</refname>
|
|
<refpurpose>Dzieli dwie liczby zgodnie z IEEE 754</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>float</type><methodname>fdiv</methodname>
|
|
<methodparam><type>float</type><parameter>num1</parameter></methodparam>
|
|
<methodparam><type>float</type><parameter>num2</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Zwraca zmiennoprzecinkowy wynik dzielenia wartości
|
|
<parameter>num1</parameter> przez <parameter>num2</parameter>.
|
|
Jeżeli <parameter>num2</parameter> jest zerem to zostanie zwrócone jedno z:
|
|
<constant>INF</constant>, -<constant>INF</constant> lub <constant>NAN</constant>.
|
|
</para>
|
|
<para>
|
|
Zwróć uwagę, że w porównaniach <constant>NAN</constant> nigdy nie będzie równe (<code>==</code>) ani identyczne(<code>===</code>) z
|
|
inną wartością, w tym samą sobą.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>num1</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Dzielnik
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>num2</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Dzielna
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Zmiennoprzecinkowy wynik dzielenia
|
|
<parameter>num1</parameter>/<parameter>num2</parameter>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Przykład użycia <function>fdiv</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump(fdiv(5.7, 1.3)); // float(4.384615384615385)
|
|
var_dump(fdiv(4, 2)); // float(2)
|
|
var_dump(fdiv(1.0, 0.0)); // float(INF)
|
|
var_dump(fdiv(-1.0, 0.0)); // float(-INF)
|
|
var_dump(fdiv(0.0, 0.0)); // float(NAN)
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member>
|
|
Operator dzielenia
|
|
<link linkend="language.operators.arithmetic"><literal>/</literal></link>
|
|
</member>
|
|
<member><function>intdiv</function> - Dzielenie liczb całkowitych</member>
|
|
<member><function>fmod</function></member>
|
|
<member><function>fpow</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
|
|
-->
|