LogTen

Description

Determines the base 10 logarithm of a number.

Syntax

LogTen ( n )

Argument

Description

n

The number for which you want the base 10 logarithm. The value of n must not be negative.

Usage

Double. Returns the base 10 logarithm of n. An execution error occurs if n is negative. If n is null, LogTen returns null.

NoteInverse of LogTen The expression 10^n is the inverse of LogTen(n). To obtain the value of n in the equation r = LogTen(n), use n = 10^r.

Examples

Example 1

This statement returns 1:

LogTen(10)

Example 2

The following statements both return 0:

LogTen(1)


LogTen(0)

Example 3

This statement results in an execution error:

LogTen(  2)

Example 4

After the following statements execute, the value of a is 200:

double a, b = LogTen(200)

a = 10^b// a = 200

See also