perl-5.38.0
log EXPR
log

Returns the natural logarithm (base e) of EXPR. If EXPR is omitted, returns the log of $_. To get the log of another base, use basic algebra: The base-N log of a number is equal to the natural log of that number divided by the natural log of N. For example:

EXPR の (e を底とする) 自然対数を返します。 EXPR が省略されると、$_ の対数を返します。 底の異なる対数を求めるためには、基礎代数を利用してください: ある数の N を底とする対数は、その数の自然対数を N の自然対数で割ったものです。 例えば:

    sub log10 {
        my $n = shift;
        return log($n)/log(10);
    }

See also exp for the inverse operation.

逆操作については exp を参照してください。