Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Get the integer portion of a numberRetrieve the next pseudorandom ... (Berikutnya)
Numeric functions

Retrieve the natural logarithm for a number

Daftar Isi

  • log EXPR

  • log

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

    1. sub log10 {
    2. my $n = shift;
    3. return log($n)/log(10);
    4. }

    See also exp for the inverse operation.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Get the integer portion of a numberRetrieve the next pseudorandom ... (Berikutnya)