Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Ln calculation

by spandox (Novice)
on Feb 05, 2013 at 21:28 UTC ( #1017287=note: print w/ replies, xml ) Need Help??

in reply to Ln calculation

As a reply I will just copy a excerpt from the manual:

log EXPR


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:

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

See also exp for the inverse operation.

Comment on Re: Ln calculation
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017287]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-10-07 16:44 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (191 votes), past polls