Search DaTutorials:  
HOME
Php Tutorials
Articles
Basics
Date and Time
File Manipulations
Forms
Functions
General
Interactivity
MySql
Navigation
News,Shoutboxes and Blogs
Language Structure and Data Types
Searching
Security
String Manipulation
User Information and Stats
Search For a Tutorial
Php Reference

log

(PHP 3, PHP 4 , PHP 5)

log -- Natural logarithm

Description

float log ( float arg [, float base])

If the optional base parameter is specified, log() returns logbase arg, otherwise log() returns the natural logarithm of arg.

Note: The base parameter became available with PHP 4.3.0.

As always you can calculate the logarithm in base b of a number n, but using the mathematical identity: logb(n) = log(n)/log(b), where log is the neperian (or natural) logarithm.

See also exp().



Copyright © 2001-2004 The PHP Group
All rights reserved.

     Mortgage Calculator | Loans | Buy Anything On eBay | Car Insurance | Mortgages
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp