* chen li <[EMAIL PROTECTED]> [2006-08-20T07:18:59] > I want to get the value 2 out of log based on 10 or > natural number e (the result is 0.301 and 0.609, > respectively). What are the formular for these two > caulculation and how can I find more about math stuff > in perldoc?
Perl has a natural log function built in. It's called "log" and you can read about it by running: perldoc -f log "log 2" will return 0.93147180559945, which is he natural log of 2. To compute a log of another base, you can take ((log $n) / (log $base)), so to get 2 log 10, ((log 2) / (log 10)), which gives you 0.301029995663981. -- rjbs
signature.asc
Description: Digital signature