<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.bc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.bcdiv.php',
    1 => 'bcdiv',
    2 => 'Division zweier Zahlen beliebiger Genauigkeit',
  ),
  'up' => 
  array (
    0 => 'ref.bc.php',
    1 => 'BC Math Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.bccomp.php',
    1 => 'bccomp',
  ),
  'next' => 
  array (
    0 => 'function.bcdivmod.php',
    1 => 'bcdivmod',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/bc/functions/bcdiv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.bcdiv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bcdiv</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">bcdiv</span> &mdash; <span class="dc-title">Division zweier Zahlen beliebiger Genauigkeit</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.bcdiv-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bcdiv</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$num1</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$num2</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$scale</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="simpara">
   Dividiert <code class="parameter">num1</code> durch <code class="parameter">num2</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.bcdiv-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">num1</code></dt>
     <dd>
      <p class="para">
       Der Dividend als Zeichenkette.
      </p>
     </dd>
    
    
     <dt><code class="parameter">num2</code></dt>
     <dd>
      <p class="para">
       Der Divisor als Zeichenkette.
      </p>
     </dd>
    
    
     <dt><code class="parameter">scale</code></dt>
     <dd>
      <span class="simpara">
       Dieser Parameter wird verwendet, um die Anzahl der Nachkommastellen im
       Ergebnis festzulegen.
       Falls <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, wird die mit <span class="function"><a href="function.bcscale.php" class="function">bcscale()</a></span> definierte
       Standard-Genauigkeit verwendet oder auf den Wert der INI-Direktive
       <a href="bc.configuration.php#ini.bcmath.scale" class="link"><code class="literal">bcmath.scale</code></a>
       zurückgegriffen.
      </span>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.bcdiv-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt das Ergebnis der Division als Zeichenkette zurück.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.bcdiv-errors">
  
  <h3 class="title">Fehler/Exceptions</h3><p class="para">
   Diese Funktion löst in den folgenden Fällen einen
   <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> aus:
   <ul class="simplelist">
    <li>
     <code class="parameter">num1</code> oder <code class="parameter">num2</code>
     ist keine wohlgeformte numerische BCMath-Zeichenkette.
    </li>
    <li>
     <code class="parameter">scale</code> liegt außerhalb des gültigen Bereichs.
    </li>
   </ul>
  </p>
  <p class="simpara">
   Wenn <code class="parameter">num2</code> <code class="literal">0</code> ist, löst diese
   Funktion eine <span class="exceptionname"><a href="class.divisionbyzeroerror.php" class="exceptionname">DivisionByZeroError</a></span>-Exception
   aus.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.bcdiv-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">scale</code> ist jetzt nullbar.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       Die Division durch <code class="literal">0</code> löst nun eine
       <span class="exceptionname"><a href="class.divisionbyzeroerror.php" class="exceptionname">DivisionByZeroError</a></span>-Exception aus,
       anstatt <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> zurückzugeben.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.bcdiv-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>bcdiv()</strong></span>-Beispiel</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">bcdiv</span><span style="color: #007700">(</span><span style="color: #DD0000">'105'</span><span style="color: #007700">, </span><span style="color: #DD0000">'6.55957'</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">);  </span><span style="color: #FF8000">// 16.007<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.bcdiv-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.bcdivmod.php" class="function" rel="rdfs-seeAlso">bcdivmod()</a> - Get the quotient and modulus of an arbitrary precision number</span></li>
    <li><span class="function"><a href="function.bcmod.php" class="function" rel="rdfs-seeAlso">bcmod()</a> - Modulo zweier Zahlen mit beliebiger Genauigkeit</span></li>
    <li><span class="function"><a href="function.bcmul.php" class="function" rel="rdfs-seeAlso">bcmul()</a> - Multiplikation zweier Zahlen beliebiger Genauigkeit</span></li>
    <li><span class="methodname"><a href="bcmath-number.div.php" class="methodname" rel="rdfs-seeAlso">BcMath\Number::div()</a> - Divides by an arbitrary precision number</span></li>
   </ul>
  </p>
 </div>

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