bcsqrt
(PHP 4, PHP 5)
bcsqrt — Ermittelt die Quadratwurzel einer Zahl beliebiger Genauigkeit
Beschreibung
string bcsqrt
( string $operand
[, int $scale
] )
Liefert die Quadratwurzel von operand .
Parameter Liste
- operand
-
Der 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 die Quadratwurzel als String zurück. Wenn operand ein negativer Wert ist, wird NULL zurückgegeben.
Beispiele
Example#1 bcsqrt()-Beispiel
<?php
echo bcsqrt('2', 3); // 1.414
?>