log

Summary

Returns the natural logarithm (with base e) for a value.

Signatures

Click on a signature to select it and view its documentation.

Usage

public static double log(double value)

Returns

The natural logarithm for the value. If the supplied value is negative, the result is NaN. If the supplied value is zero (0) then the result is negative infinity.

Parameters

value

A positive number to evaluate the natural logarithm for.

Description

Returns the natural logarithm (with base e) for a value.

Mathematically, this would be represented as ln(x).

The input must be a positive number. For negative inputs, this method will return NaN. For a zero (0) input, this method will return negative infinity.

Examples

Basic Usage
1
2
3
import System;
 
Console.log(Math.log(10));

Share

HTML | BBCode | Direct Link