Start · Sprachen · PHP · Referenz · sqrt

sqrt

Funktion

Quadratwurzel einer Zahl.

seit PHP 4.0.0 Kategorie: math

Signatur

sqrt(float $num): float

Beschreibung

Bei negativem Input gibt es NAN.

Parameter

Name Typ Default Beschreibung
$num Pflicht float Zahl (nicht-negativ).

Rückgabewert

Typ
float
Beschreibung
Quadratwurzel.

Beispiele

Basis

<?php

echo sqrt(144); // 12