System.Math
Provides static methods for common mathematical functions including trigonometric and logarithm functions
Abs
Returns the absolute value of a number
System.Math.Abs() - absolute value
System.Math.Abs(23.7) = 23.7
System.Math.Abs(-23.7) - 23.7
Decimal absolutevalue;
Absolutevalue = System.Math.Abs(10.5M); // decimal
Absolutevalue = System.Math.Abs(System.Convert.ToDecimal(10.5D)); // double
Acos
Asin
Atan
Atan - returns the arctangent in radians of n
Atan2
BigMul
Ceiling
Returns a number rounded up to the nearest integer.
System.Math.Ceiling() - rounds x to the smallest integer not less than x
System.Math.Ceiling(9.2) = 10
System.Math.Ceiling(-9.8) = -9
System.Math.Ceiling(0) = 1.0
Cos
Cos - returns the cosine of an angle. The angle must be expressed in radians
Cosh
DivRem
E
public const double E = 2.7182818284590451;
Exp
Returns the constant e raised to the power of the argument
System.Math.Exp() - exponential method
Floor
Returns a number rounded down to the nearest integer.
System.Math.Floor() - round x to the largest integer not greater than x
IEEERemainder
Log
Returns the logarithm of a number to the base you specify.
Log10
Returns the logarithm of a number to the base 10
Max
Returns the largest number
Min
Returns the smallest number
Pi
public const double PI = 3.1415926535897931;
Pow
Returns a number raised to the specified power.
Round
Returns a number rounded to a specified number of digits
Sign
Returns a value indicating the sign of a number.
returns -1 if n < 0 , 0 if n = 0 or =1 if n > 0
Sqrt
Returns the square root of a number.
Sin
Sinh
Tan
Tan - returns the tangent of the angle. The angle must be in radians.
Tanh
Truncate
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext