<?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.bcmul.php',
    1 => 'bcmul',
    2 => 'Multiplikation zweier Zahlen beliebiger Genauigkeit',
  ),
  'up' => 
  array (
    0 => 'ref.bc.php',
    1 => 'BC Math Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.bcmod.php',
    1 => 'bcmod',
  ),
  'next' => 
  array (
    0 => 'function.bcpow.php',
    1 => 'bcpow',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/bc/functions/bcmul.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

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

 </div>

 <div class="refsect1 description" id="refsect1-function.bcmul-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bcmul</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">
   Multipliziert <code class="parameter">num1</code> mit <code class="parameter">num2</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.bcmul-parameters">
  <h3 class="title">Parameter-Liste</h3><p class="para">
   <dl>
    
     <dt><code class="parameter">num1</code></dt>
     <dd>
      <p class="para">
       Der linke Operand als Zeichenkette.
      </p>
     </dd>
    
    
     <dt><code class="parameter">num2</code></dt>
     <dd>
      <p class="para">
       Der rechte Operand 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.bcmul-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt das Ergebnis als Zeichenkette zurück.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.bcmul-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>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.bcmul-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>7.3.0</td>
      <td>
       <span class="function"><strong>bcmul()</strong></span> liefert nun Zahlen mit den angeforderten
       Nachkommastellen zurück. Zuvor haben die zurückgelieferten Zahlen
       möglicherweise abschließende Dezimalnullen ausgelassen.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


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

  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.bcmul-notes">
  <h3 class="title">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Vor PHP 7.3.0 kann <span class="function"><strong>bcmul()</strong></span> ein Ergebnis mit weniger
    Nachkommastellen zurückgeben, als der Parameter
    <code class="parameter">scale</code> angibt. Dies geschieht nur, wenn das Ergebnis
    nicht die gesamte durch <code class="parameter">scale</code> erlaubte Genauigkeit
    erfordert. Zum Beispiel:
    <div class="example" id="example-2">
     <p><strong>Beispiel #2 <span class="function"><strong>bcmul()</strong></span>-Nachkommastellen-Beispiel</strong></p>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">bcmul</span><span style="color: #007700">(</span><span style="color: #DD0000">'5'</span><span style="color: #007700">, </span><span style="color: #DD0000">'2'</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">);     </span><span style="color: #FF8000">// gibt "10" aus, nicht "10.00"<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

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


 <div class="refsect1 seealso" id="refsect1-function.bcmul-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.bcdiv.php" class="function" rel="rdfs-seeAlso">bcdiv()</a> - Division zweier Zahlen beliebiger Genauigkeit</span></li>
    <li><span class="methodname"><a href="bcmath-number.mul.php" class="methodname" rel="rdfs-seeAlso">BcMath\Number::mul()</a> - Multiplies an arbitrary precision number</span></li>
   </ul>
  </p>
 </div>

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