Math.Log Function in VB.NET

What is the use of math.log() mathematical function in VB.NET?

Explanation

Math.Log Function

Math.Log() Mathematical Function in Visual Basic.net 2008 is used to find the logarithm for the specified value.
Syntax:

Math.Log(Value)

In the above syntax Value is the number whose logarithmic value is returned.
Example:

Module Module1
Sub Main()
Console.WriteLine("The Log value of 1 is::" & Math.Log(1))
Console.WriteLine("The Log value of 0 is::" & Math.Log(0))
Console.ReadLine()
End Sub
End Module
Result:

The Log value of 1 is::0
The Log value of 0 is::-Infinity

In the above example, the Math.Log() mathematical function is used to get the logarithmic value of '1' and for '0' it returns infinity.

Visual Basic Tutorial


Ask Questions

Ask Question