<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.math.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.fdiv.php',
    1 => 'fdiv',
    2 => 'Divides two numbers, according to IEEE 754',
  ),
  'up' => 
  array (
    0 => 'ref.math.php',
    1 => 'Функції Math',
  ),
  'prev' => 
  array (
    0 => 'function.expm1.php',
    1 => 'expm1',
  ),
  'next' => 
  array (
    0 => 'function.floor.php',
    1 => 'floor',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/math/functions/fdiv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.fdiv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">fdiv</h1>
  <p class="verinfo">(PHP 8)</p><p class="refpurpose"><span class="refname">fdiv</span> &mdash; <span class="dc-title">Divides two numbers, according to IEEE 754</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.fdiv-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>fdiv</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$num1</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$num2</code></span>): <span class="type"><a href="language.types.float.php" class="type float">float</a></span></div>

  <p class="para rdfs-comment">
   Returns the floating point result of dividing the
   <code class="parameter">num1</code> by the <code class="parameter">num2</code>.
   If the <code class="parameter">num2</code> is zero, then one of <strong><code><a href="math.constants.php#constant.inf">INF</a></code></strong>,
   -<strong><code><a href="math.constants.php#constant.inf">INF</a></code></strong>, or <strong><code><a href="math.constants.php#constant.nan">NAN</a></code></strong> will be returned.
  </p>
  <p class="para">
   Note that in comparisons, <strong><code><a href="math.constants.php#constant.nan">NAN</a></code></strong> will never be equal (<code class="code">==</code>) or identical (<code class="code">===</code>) to
   any value, including itself.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.fdiv-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">num1</code></dt>
     <dd>
      <p class="para">
       The dividend (numerator)
      </p>
     </dd>
    
    
     <dt><code class="parameter">num2</code></dt>
     <dd>
      <p class="para">
       The divisor
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.fdiv-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   The floating point result of
   <code class="parameter">num1</code>/<code class="parameter">num2</code>
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.fdiv-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 Using <span class="function"><strong>fdiv()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">fdiv</span><span style="color: #007700">(</span><span style="color: #0000BB">5.7</span><span style="color: #007700">, </span><span style="color: #0000BB">1.3</span><span style="color: #007700">)); </span><span style="color: #FF8000">// float(4.384615384615385)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">fdiv</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">)); </span><span style="color: #FF8000">// float(2)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">fdiv</span><span style="color: #007700">(</span><span style="color: #0000BB">1.0</span><span style="color: #007700">, </span><span style="color: #0000BB">0.0</span><span style="color: #007700">)); </span><span style="color: #FF8000">// float(INF)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">fdiv</span><span style="color: #007700">(-</span><span style="color: #0000BB">1.0</span><span style="color: #007700">, </span><span style="color: #0000BB">0.0</span><span style="color: #007700">)); </span><span style="color: #FF8000">// float(-INF)<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">fdiv</span><span style="color: #007700">(</span><span style="color: #0000BB">0.0</span><span style="color: #007700">, </span><span style="color: #0000BB">0.0</span><span style="color: #007700">)); </span><span style="color: #FF8000">// float(NAN)<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.fdiv-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li>
     Division operator
     <a href="language.operators.arithmetic.php" class="link"><code class="literal">/</code></a>
    </li>
    <li><span class="function"><a href="function.intdiv.php" class="function" rel="rdfs-seeAlso">intdiv()</a> - Integer division</span> - Integer division</li>
    <li><span class="function"><a href="function.fmod.php" class="function" rel="rdfs-seeAlso">fmod()</a> - Returns the floating point remainder (modulo) of the division
  of the arguments</span></li>
    <li><span class="function"><a href="function.fpow.php" class="function" rel="rdfs-seeAlso">fpow()</a> - Raise one number to the power of another, according to IEEE 754</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>