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.is-nan.php', 1 => 'is_nan', ), 'next' => array ( 0 => 'function.log10.php', 1 => 'log10', ), '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); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
log — Logaritmo naturale
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 numeron
, usando la formula matematica: logb(n) = log(n)/log(b), dove log è il logaritmo neperiano (o naturale).
Vedere anche exp().