This blog defines various functions of Math class
in VB.NET. Math class Provides constants and static methods for trigonometric,
logarithmic, and other common mathematical functions. There are many situation
when we need some mathematical operation in our program, such as some
trigonometric and logarithm operation.
Module
Module1
Sub New()
Dim a As
Double = 0
a =
Math.Log(11)
Console.WriteLine("Log
value of 15 = " & a)
Dim b As
Integer = 0
b =
Math.Pow(2, 5)
Console.WriteLine("5
to the power= " & b)
b =
Math.Sqrt(5)
Console.WriteLine("squre
root of 5= " & b)
b =
Math.Round(5.68743)
Console.WriteLine("round
figure of 5.6756= " & b)
b =
Math.Min(4, 7)
Console.WriteLine("minimum
value in 6 and 7= " & b)
a =
Math.Sin(90)
Console.WriteLine("sin
60 = " & a)
Dim x As
Integer = 511
Dim y As
Integer = 50
Dim Value As
Integer = 0
Dim Remainder As
Integer = 0
Value =
Math.DivRem(x, y, Remainder)
Console.WriteLine("value
is = " & Value & " and reminder is = "
& Remainder)
End Sub
End
Module