Forum und email

bcdiv

(PHP 4, PHP 5)

bcdiv — Division zweier Zahlen beliebiger Genauigkeit

Beschreibung

string bcdiv ( string $left_operand , string $right_operand [, int $scale ] )

Dividiert left_operand durch right_operand .

Parameter Liste

left_operand

Der linke Operand in Stringform.

right_operand

Der rechte Operand in Stringform.

scale

This optional parameter is used to set the number of digits after the decimal place in the result. You can also set the global default scale for all functions by using bcscale().

Rückgabewerte

Gibt das Ergebnis der Division als String zurück. Wenn der Parameter right_operand 0 ist, wird NULL zurückgegeben.

Beispiele

Example#1 bcdiv()-Beispiel

<?php

echo bcdiv('105''6.55957'3);  // 16.007

?>

Siehe auch