次の方法で共有


Math.Log Method (Double)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns the natural (base e) logarithm of a specified number.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<SecuritySafeCriticalAttribute> _
Public Shared Function Log ( _
    d As Double _
) As Double
[SecuritySafeCriticalAttribute]
public static double Log(
    double d
)

Parameters

Return Value

Type: System.Double
One of the values in the following table.

Sign of d

Returns

Positive

The natural logarithm of d; that is, ln d, or log ed

Zero

NegativeInfinity

Negative

NaN

Equal to NaN

NaN

Equal to PositiveInfinity

PositiveInfinity

Remarks

Parameter d is specified as a base 10 number.

Examples

The following example uses Log to evaluate certain logarithmic identities for selected values.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.