array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.log.php', 1 => 'log', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math Funzioni', ), 'prev' => array ( 0 => 'function.log1p.php', 1 => 'log1p', ), 'next' => array ( 0 => 'function.max.php', 1 => 'max', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'it', 'path' => 'reference/math/functions/log.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

log

(PHP 4, PHP 5, PHP 7, PHP 8)

logLogaritmo naturale

Descrizione

log(float $arg, float $base = ?): float

Se si specifica il parametro opzionale base, la funzione log() restituisce logbase arg, altrimenti log() il logaritmo naturale di arg.

Nota:

Il parametro base è disponibile dalla versione 4.3.0 di PHP.

Si può comunque calcolare il logaritmo in base b di un numero n, usando la formula matematica: logb(n) = log(n)/log(b), dove log è il logaritmo neperiano (o naturale).

Vedere anche exp().