ExtendedNumerics mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Object To be added.

Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  The following example demonstrates the () method.

  `using System; public class MathAbsExample { public static void Main() { Decimal d1 = Math.Abs( (Decimal)0.00 ); Decimal d2 = Math.Abs( (Decimal)(-1.23) ); Console.WriteLine("Math.Abs( (Decimal)0.00 ) returns {0}",d1); Console.WriteLine("Math.Abs( (Decimal)(-1.23) ) returns {0}",d2); } }`

  The output is

  Math.Abs( (Decimal)0.00 ) returns 0

  Math.Abs( (Decimal)(-1.23) ) returns 1.23

  The absolute value of a is its numeric value without its sign. For example, the absolute value of both 1.2 and -1.2 is 1.2.

  Returns the absolute value of a number.

  A decimal number, x, such that 0 ≤ x ≤ .

  A number that is greater than or equal to , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The absolute value of a is its numeric value without its sign. For example, the absolute value of both 1.2e-03 and -1.2e03 is 1.2e03.

  If is equal to or , the return value is . If is equal to , the return value is .

  Returns the absolute value of a double-precision floating-point number.

  A double-precision floating-point number, x, such that 0 ≤ x ≤ .

  A number that is greater than or equal to , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int16 `` equals .

  The absolute value of an is its numeric value without its sign. For example, the absolute value of both 123 and -123 is 123.

  Returns the absolute value of a 16-bit signed integer.

  A 16-bit signed integer, x, such that 0 ≤ x ≤ .

  A number that is greater than , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` equals .

  The absolute value of an is its numeric value without its sign. For example, the absolute value of both 123 and -123 is 123.

  Returns the absolute value of a 32-bit signed integer.

  A 32-bit signed integer, x, such that 0 ≤ x ≤ .

  A number that is greater than , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 `` equals .

  The absolute value of an is its numeric value without its sign. For example, the absolute value of both 123 and -123 is 123.

  Returns the absolute value of a 64-bit signed integer.

  A 64-bit signed integer, x, such that 0 ≤ x ≤ .

  A number that is greater than , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.SByte `` equals .

  The absolute value of a signed byte is its numeric value without its sign. For example, the absolute value of both 12 and -12 is 12.

  Returns the absolute value of an 8-bit signed integer.

  An 8-bit signed integer, x, such that 0 ≤ x ≤ .

  A number that is greater than , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Single ``

  The absolute value of a is its numeric value without its sign. For example, the absolute value of both 1.2e-03 and -1.2e03 is 1.2e03.

  If is equal to or , the return value is . If is equal to , the return value is .

  Returns the absolute value of a single-precision floating-point number.

  A single-precision floating-point number, x, such that 0 ≤ x ≤ .

  A number that is greater than or equal to , but less than or equal to . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  Multiply the return value by 180/ to convert from radians to degrees.

  Returns the angle whose cosine is the specified number.

  An angle, θ, measured in radians, such that 0 ≤ θ ≤ π

  -or-

  if < -1 or > 1 or equals .

  A number representing a cosine, where must be greater than or equal to -1, but less than or equal to 1. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  A positive return value represents a counterclockwise angle from the x-axis; a negative return value represents a clockwise angle.

  Multiply the return value by 180/ to convert from radians to degrees.

  Returns the angle whose sine is the specified number.

  An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2

  -or-

  if < -1 or > 1 or equals .

  A number representing a sine, where must be greater than or equal to -1, but less than or equal to 1. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  A positive return value represents a counterclockwise angle from the x-axis; a negative return value represents a clockwise angle.

  Multiply the return value by 180/ to convert from radians to degrees.

  Returns the angle whose tangent is the specified number.

  An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2.

  -or-

  if equals , -π/2 rounded to double precision (-1.5707963267949) if equals , or π/2 rounded to double precision (1.5707963267949) if equals .

  A number representing a tangent. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` ``

  The following example demonstrates using the method.

  `using System; public class MathAtan2Example { public static void Main() { Double d1 = Math.Atan2(2,0); Double d2 = Math.Atan2(0,0); Console.WriteLine("Math.Atan2(2,0) returns {0}", d1); Console.WriteLine("Math.Atan2(0,0) returns {0}", d2); } }`

  The output is

  Math.Atan2(2,0) returns 1.5707963267949

  Math.Atan2(0,0) returns 0

  The return value is the angle in the Cartesian plane formed by the x-axis, and a vector starting from the origin, (0,0), and terminating at the point, (x,y).

  Returns the angle whose tangent is the quotient of two specified numbers.

  An angle, θ, measured in radians, such that -π ≤ θ ≤ π, and tan(θ) = / , where (, ) is a point in the Cartesian plane. Observe the following:

  For (, ) in quadrant 1, 0 < θ < π/2.

  For (, ) in quadrant 2, π/2 < θ ≤ π.

  For (, ) in quadrant 3, -π < θ < -π/2.

  For (, ) in quadrant 4, -π/2 < θ < 0.

  For points on the boundaries of the quadrants, the return value is the following:

  If y is 0 and x is not negative, θ = 0.

  If y is 0 and x is negative, θ = π.

  If y is positive and x is 0, θ = π/2.

  If y is negative and x is 0, θ = -π/2.

  If y is 0 and x is 0, θ = 0.

  If or is , or if and are either or , the method returns .

  The y coordinate of a point. The x coordinate of a point. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 `` `` To be added.

  Produces the full product of two 32-bit numbers.

  The number containing the product of the specified numbers.

  The first number to multiply. The second number to multiply. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward positive infinity. In other words, if is positive, the presence of any fractional component causes to be rounded to the next highest integer. If is negative, the rounding operation causes any fractional component of to be discarded. The operation of this method differs from the method, which supports rounding toward negative infinity.

  Returns the smallest integral value that is greater than or equal to the specified decimal number.

  The smallest integral value that is greater than or equal to . Note that this method returns a instead of an integral type.

  A decimal number.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathCeilingExample { public static void Main() { Double d1 = Math.Ceiling(3.4); Double d2 = Math.Ceiling(-3.4); Console.WriteLine("Math.Ceiling(3.4) returns {0}", d1); Console.WriteLine("Math.Ceiling(-3.4) returns {0}", d2); } }`

  The output is

  Math.Ceiling(3.4) returns 4

  Math.Ceiling(-3.4) returns -3

  The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward positive infinity. In other words, if is positive, the presence of any fractional component causes to be rounded to the next highest integer. If is negative, the rounding operation causes any fractional component of to be discarded. The operation of this method differs from the method, which supports rounding toward negative infinity.

  Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.

  The smallest integral value that is greater than or equal to . If is equal to , , or , that value is returned. Note that this method returns a instead of an integral type.

  A double-precision floating-point number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Acceptable values of range from approximately -9223372036854775295 to approximately 9223372036854775295. For values outside this range, the method returns unchanged rather than throwing an exception.

  Returns the cosine of the specified angle.

  The cosine of . If is equal to , , or , this method returns .

  An angle, measured in radians. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Returns the hyperbolic cosine of the specified angle.

  The hyperbolic cosine of . If is equal to or , is returned. If is equal to , is returned.

  An angle, measured in radians. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` A that contains the dividend. A that contains the divisor. A that receives the remainder.

  Returns the quotient of two numbers, also passing the remainder as an output parameter.

  A containing the quotient of the specified numbers.

  To be added. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 `` `` `` A that contains the dividend. A that contains the divisor. A that receives the remainder.

  Returns the quotient of two numbers, also passing the remainder as an output parameter.

  A containing the quotient of the specified numbers.

  To be added. 0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double 2.71828182845905

  The value of this field is 2.7182818284590452354.

  Represents the natural logarithmic base, specified by the constant, e.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  Use the method to calculate powers of other bases.

  is the inverse of .

  Returns e raised to the specified power.

  The number e raised to the power . If equals or , that value is returned. If equals , 0 is returned.

  A number specifying a power. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward negative infinity. In other words, if is positive, any fractional component is truncated. If is negative, the presence of any fractional component causes it to be rounded to the smaller integer. The operation of this method differs from the method, which supports rounding toward positive infinity.

  Returns the largest integer less than or equal to the specified decimal number.

  The largest integer less than or equal to . Note that the method returns an integral value of type .

  A decimal number.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathFloorExample { public static void Main() { Double d1 = Math.Floor(3.4); Double d2 = Math.Floor(-3.4); Console.WriteLine("Math.Floor(3.4) returns {0}", d1); Console.WriteLine("Math.Floor(-3.4) returns {0}", d2); } }`

  The output is

  Math.Floor(3.4) returns 3

  Math.Floor(-3.4) returns -4

  The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward negative infinity. In other words, if is positive, any fractional component is truncated. If is negative, the presence of any fractional component causes it to be rounded to the smaller integer. The operation of this method differs from the method, which supports rounding toward positive infinity.

  Returns the largest integer less than or equal to the specified double-precision floating-point number.

  The largest integer less than or equal to . If is equal to , , or , that value is returned.

  A double-precision floating-point number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` ``

  The following example demonstrates using the method.

  `using System; public class MathIEEERemainderExample { public static void Main() { Double d1 = Math.IEEERemainder(3.54,0); Double d2 = Math.IEEERemainder(9.99,-3.33); Double d3 = Math.IEEERemainder(-9.99,3.33); Double d4 = Math.IEEERemainder(9.5,1.5); Console.WriteLine("Math.IEEERemainder(3.54,0) returns {0}", d1); Console.WriteLine("Math.IEEERemainder(9.99,-3.33) returns {0}", d2); Console.WriteLine("Math.IEEERemainder(-9.99,3.33) returns {0}", d3); Console.WriteLine("Math.IEEERemainder(9.5,1.5) returns {0}", d4); } }`

  The output is

  Math.IEEERemainder(3.54,0) returns NaN

  Math.IEEERemainder(9.99,-3.33) returns 0

  Math.IEEERemainder(-9.99,3.33) returns 0

  Math.IEEERemainder(9.5,1.5) returns 0.5

  This operation complies with the remainder operation defined in Section 5.1 of ANSI/IEEE Std 754-1985; IEEE Standard for Binary Floating-Point Arithmetic; Institute of Electrical and Electronics Engineers, Inc; 1985.

  The method is not the same as the modulus operator. Although both return the remainder after division, the formulas they use are different. The formula for the method is:

  `IEEERemainder = dividend - (divisor * Math.Round(dividend / divisor))`

  In contrast, the formula for the modulus operator is:

  `Modulus = (Math.Abs(dividend) - (Math.Abs(divisor) * (Math.Floor(Math.Abs(dividend) / Math.Abs(divisor))))) * Math.Sign(dividend)`

  Returns the remainder resulting from the division of a specified number by another specified number.

  A number equal to - ( Q), where Q is the quotient of / rounded to the nearest integer (if / falls halfway between two integers, the even integer is returned).

  If - ( Q) is zero, the value +0 is returned if is positive, or -0 if is negative.

  If = 0, is returned.

  A dividend. A divisor. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  Parameter is specified as a base 10 number.

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

  One of the values in the following table.

  parameter

  Return value

  Positive

  The natural logarithm of ; that is, ln , or log e

  Zero

  Negative

  Equal to

  Equal to

  The number whose logarithm is to be found. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` `` To be added.

  Returns the logarithm of a specified number in a specified base.

  One of the values in the following table. (+Infinity denotes , -Infinity denotes , and NaN denotes .)

  Return value

  > 0

  (0 < < 1) -or-( > 1)

  lognewBase(a)

  < 0

  (any value)

  NaN

  (any value)

  < 0

  NaN

  != 1

  = 0

  NaN

  != 1

  = +Infinity

  NaN

  = NaN

  (any value)

  NaN

  (any value)

  = NaN

  NaN

  (any value)

  = 1

  NaN

  = 0

  0 < < 1

  +Infinity

  = 0

  > 1

  -Infinity

  = +Infinity

  0 < < 1

  -Infinity

  = +Infinity

  > 1

  +Infinity

  = 1

  = 0

  0

  = 1

  = +Infinity

  0

  The number whose logarithm is to be found. The base of the logarithm. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  Parameter is specified as a base 10 number.

  Returns the base 10 logarithm of a specified number.

  One of the values in the following table.

  parameter

  Return value

  Positive

  The base 10 log of ; that is, log 10 .

  Zero

  Negative

  Equal to

  Equal to

  A number whose logarithm is to be found. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Byte `` `` To be added.

  Returns the larger of two 8-bit unsigned integers.

  Parameter or , whichever is larger.

  The first of two 8-bit unsigned integers to compare. The second of two 8-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Decimal `` `` To be added.

  Returns the larger of two decimal numbers.

  Parameter or , whichever is larger.

  The first of two decimal numbers to compare. The second of two decimal numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Double `` `` To be added.

  Returns the larger of two double-precision floating-point numbers.

  Parameter or , whichever is larger. If , , or both and are equal to , is returned.

  The first of two double-precision floating-point numbers to compare. The second of two double-precision floating-point numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int16 `` `` To be added. The first of two 16-bit signed integers to compare. The second of two 16-bit signed integers to compare.

  Returns the larger of two 16-bit signed integers.

  Parameter or , whichever is larger.

  The first of two 16-bit signed integers to compare. The second of two 16-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int32 `` `` To be added.

  Returns the larger of two 32-bit signed integers.

  Parameter or , whichever is larger.

  The first of two 32-bit signed integers to compare. The second of two 32-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int64 `` `` To be added.

  Returns the larger of two 64-bit signed integers.

  Parameter or , whichever is larger.

  The first of two 64-bit signed integers to compare. The second of two 64-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.SByte `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the larger of two 8-bit signed integers.

  Parameter or , whichever is larger.

  The first of two 8-bit signed integers to compare. The second of two 8-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Single `` `` To be added.

  Returns the larger of two single-precision floating-point numbers.

  Parameter or , whichever is larger. If , or , or both and are equal to , is returned.

  The first of two single-precision floating-point numbers to compare. The second of two single-precision floating-point numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt16 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the larger of two 16-bit unsigned integers.

  Parameter or , whichever is larger.

  The first of two 16-bit unsigned integers to compare. The second of two 16-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt32 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the larger of two 32-bit unsigned integers.

  Parameter or , whichever is larger.

  The first of two 32-bit unsigned integers to compare. The second of two 32-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt64 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the larger of two 64-bit unsigned integers.

  Parameter or , whichever is larger.

  The first of two 64-bit unsigned integers to compare. The second of two 64-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Byte `` `` To be added.

  Returns the smaller of two 8-bit unsigned integers.

  Parameter or , whichever is smaller.

  The first of two 8-bit unsigned integers to compare. The second of two 8-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Decimal `` `` To be added.

  Returns the smaller of two decimal numbers.

  Parameter or , whichever is smaller.

  The first of two decimal numbers to compare. The second of two decimal numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Double `` `` To be added.

  Returns the smaller of two double-precision floating-point numbers.

  Parameter or , whichever is smaller. If , , or both and are equal to , is returned.

  The first of two double-precision floating-point numbers to compare. The second of two double-precision floating-point numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int16 `` `` To be added.

  Returns the smaller of two 16-bit signed integers.

  Parameter or , whichever is smaller.

  The first of two 16-bit signed integers to compare. The second of two 16-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int32 `` `` To be added.

  Returns the smaller of two 32-bit signed integers.

  Parameter or , whichever is smaller.

  The first of two 32-bit signed integers to compare. The second of two 32-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Int64 `` `` To be added.

  Returns the smaller of two 64-bit signed integers.

  Parameter or , whichever is smaller.

  The first of two 64-bit signed integers to compare. The second of two 64-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.SByte `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the smaller of two 8-bit signed integers.

  Parameter or , whichever is smaller.

  The first of two 8-bit signed integers to compare. The second of two 8-bit signed integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Single `` `` To be added.

  Returns the smaller of two single-precision floating-point numbers.

  Parameter or , whichever is smaller. If , , or both and are equal to , is returned.

  The first of two single-precision floating-point numbers to compare. The second of two single-precision floating-point numbers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt16 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the smaller of two 16-bit unsigned integers.

  Parameter or , whichever is smaller.

  The first of two 16-bit unsigned integers to compare. The second of two 16-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt32 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the smaller of two 32-bit unsigned integers.

  Parameter or , whichever is smaller.

  The first of two 32-bit unsigned integers to compare. The second of two 32-bit unsigned integers to compare. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.UInt64 `` ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use (, ).

  Returns the smaller of two 64-bit unsigned integers.

  Parameter or , whichever is smaller.

  The first of two 64-bit unsigned integers to compare. The second of two 64-bit unsigned integers to compare. 0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double 3.14159265358979

  The value of this field is 3.14159265358979323846.

  Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` ``

  The following table indicates the return value when various values or ranges of values are specified for the and parameters. For more information, see , , and .

  Parameters

  Return value

  or = NaN.

  NaN

  = Any value except NaN; = 0.

  1

  = NegativeInfinity; < 0.

  0

  = NegativeInfinity; is a positive odd integer.

  NegativeInfinity

  = NegativeInfinity; is positive but not an odd integer.

  PositiveInfinity

  < 0 but not NegativeInfinity; is not an integer, NegativeInfinity, or PositiveInfinity.

  NaN

  = -1; = NegativeInfinity or PositiveInfinity.

  NaN

  -1 < < 1; = NegativeInfinity.

  PositiveInfinity

  -1 < < 1; = PositiveInfinity.

  0

  < -1 or > 1; = NegativeInfinity.

  0

  < -1 or > 1; = PositiveInfinity.

  PositiveInfinity

  = 0; < 0.

  PositiveInfinity

  = 0; > 0.

  0

  = 1; is any value except NaN.

  1

  = PositiveInfinity; < 0.

  0

  = PositiveInfinity; > 0.

  PositiveInfinity

  Returns a specified number raised to the specified power.

  The number raised to the power .

  A double-precision floating-point number to be raised to a power. A double-precision floating-point number that specifies a power. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  The following example demonstrates using the () method.

  `using System; public class MathRoundExample { public static void Main() { Double d1 = Math.Round(4.4); Double d2 = Math.Round(4.5); Double d3 = Math.Round(4.6); Console.WriteLine("Math.Round(4.4) returns {0}", d1); Console.WriteLine("Math.Round(4.5) returns {0}", d2); Console.WriteLine("Math.Round(4.6) returns {0}", d3); } }`

  The output is

  Math.Round(4.4) returns 4

  Math.Round(4.5) returns 4

  Math.Round(4.6) returns 5

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a decimal value to the nearest integral value.

  The integer nearest parameter . If the fractional component of is halfway between two integers, one of which is even and the other odd, the even number is returned. Note that this method returns a instead of an integral type.

  A decimal number to be rounded. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the () method.

  `using System; public class MathRoundExample { public static void Main() { Double d1 = Math.Round(4.4); Double d2 = Math.Round(4.5); Double d3 = Math.Round(4.6); Console.WriteLine("Math.Round(4.4) returns {0}", d1); Console.WriteLine("Math.Round(4.5) returns {0}", d2); Console.WriteLine("Math.Round(4.6) returns {0}", d3); } }`

  The output is

  Math.Round(4.4) returns 4

  Math.Round(4.5) returns 4

  Math.Round(4.6) returns 5

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a double-precision floating-point value to the nearest integral value.

  The integer nearest . If the fractional component of is halfway between two integers, one of which is even and the other odd, then the even number is returned. Note that this method returns a instead of an integral type.

  A double-precision floating-point number to be rounded. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Decimal `` ``

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a decimal value to a specified number of fractional digits.

  The number nearest to that contains a number of fractional digits equal to .

  A decimal number to be rounded. The number of decimal places in the return value.
- Method
  2.0.0.0
  4.0.0.0
  System.Decimal `` ``

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two numbers.

  The integer nearest . If is halfway between two numbers, one of which is even and the other odd, then determines which of the two is returned.

  A decimal number to be rounded. Specification for how to round if it is midway between two other numbers.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double `` ``

  < 0

  -or-

  > 15

  The following example demonstrates using the (, ) method.

  `using System; public class MathRoundExample { public static void Main() { Double d1 = Math.Round(3.44,1); Double d2 = Math.Round(3.45,1); Double d3 = Math.Round(3.55,1); Console.WriteLine("Math.Round(3.44, 1) returns {0}", d1); Console.WriteLine("Math.Round(3.45, 1) returns {0}", d2); Console.WriteLine("Math.Round(3.55, 1) returns {0}", d3); } }`

  The output is

  Math.Round(3.44, 1) returns 3.4

  Math.Round(3.45, 1) returns 3.4

  Math.Round(3.55, 1) returns 3.6

  The number of fractional digits in the return value.

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a double-precision floating-point value to a specified number of fractional digits.

  The number nearest to that contains a number of fractional digits equal to .

  A double-precision floating-point number to be rounded. The number of fractional digits in the return value. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Double `` ``

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a double-precision floating-point value to the nearest integer. A parameter specifies how to round the value if it is midway between two numbers.

  The integer nearest . If is halfway between two integers, one of which is even and the other odd, then determines which of the two is returned.

  A double-precision floating-point number to be rounded. Specification for how to round if it is midway between two other numbers.
- Method
  2.0.0.0
  4.0.0.0
  System.Decimal `` `` ``

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a decimal value to a specified number of fractional digits. A parameter specifies how to round the value if it is midway between two numbers.

  The number nearest to that contains a number of fractional digits equal to . If has fewer fractional digits than , is returned unchanged.

  A decimal number to be rounded. The number of decimal places in the return value. Specification for how to round if it is midway between two other numbers.
- Method
  2.0.0.0
  4.0.0.0
  System.Double `` `` ``

  For examples and comprehensive usage information about this and other overloads of the Round method, see the reference page.

  Rounds a double-precision floating-point value to a specified number of fractional digits. A parameter specifies how to round the value if it is midway between two numbers.

  The number nearest to that has a number of fractional digits equal to . If has fewer fractional digits than , is returned unchanged.

  A double-precision floating-point number to be rounded. The number of fractional digits in the return value. Specification for how to round if it is midway between two other numbers.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Returns a value indicating the sign of a decimal number.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed decimal number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added. is equal to .

  The following example demonstrates using the () method.

  `using System; public class MathSignExample { public static void Main() { Double d1 = Math.Sign(4.4); Double d2 = Math.Sign(0.0); Double d3 = Math.Sign(-4.5); Console.WriteLine("Math.Sign(4.4) returns {0}", d1); Console.WriteLine("Math.Sign(0.0) returns {0}", d2); Console.WriteLine("Math.Sign(-4.5) returns {0}", d3); } }`

  The output is

  Math.Sign(4.4) returns 1

  Math.Sign(0.0) returns 0

  Math.Sign(-4.5) returns -1

  Returns a value indicating the sign of a double-precision floating-point number.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Returns a value indicating the sign of a 16-bit signed integer.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Returns a value indicating the sign of a 32-bit signed integer.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added.

  Returns a value indicating the sign of a 64-bit signed integer.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Int32 ``

  This method is not CLS-compliant. For a CLS-compliant alternative, use ().

  Returns a value indicating the sign of an 8-bit signed integer.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` To be added. is equal to .

  Returns a value indicating the sign of a single-precision floating-point number.

  A number that indicates the sign of , as shown in the following table.

  Return value

  Meaning

  -1

  is less than zero.

  0

  is equal to zero.

  1

  is greater than zero.

  A signed number. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathSinExample { public static void Main() { Double d1 = Math.Sin(0); Double d2 = Math.Sin(Math.PI/2.0); Console.WriteLine("Math.Sin(0) returns {0}", d1); Console.WriteLine("Math.Sin(Math.PI/2.0) returns {0}", d2); } }`

  The output is

  Math.Sin(0) returns 0

  Math.Sin(Math.PI/2.0) returns 1

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Acceptable values of range from approximately -9223372036854775295 to approximately 9223372036854775295. For values outside of this range, the method returns unchanged rather than throwing an exception.

  Returns the sine of the specified angle.

  The sine of . If is equal to , , or , this method returns .

  An angle, measured in radians. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathSinhExample { public static void Main() { Double d1 = Math.Sinh(0); Double d2 = Math.Sinh(Math.PI); Console.WriteLine("Math.Sinh(0) returns {0}", d1); Console.WriteLine("Math.Sinh(Math.PI) returns {0}", d2); } }`

  The output is

  Math.Sinh(0) returns 0

  Math.Sinh(Math.PI) returns 11.5487393572577

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Returns the hyperbolic sine of the specified angle.

  The hyperbolic sine of . If is equal to , , or , this method returns a equal to .

  An angle, measured in radians. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Double `` To be added.

  The following example demonstrates using the method.

  `using System; public class MathSqrtExample { public static void Main() { Double d1 = Math.Sqrt(16.0); Double d2 = Math.Sqrt(0.0); Double d3 = Math.Sqrt(-10.0); Console.WriteLine("Math.Sqrt(16.0) returns {0}", d1); Console.WriteLine("Math.Sqrt(0.0) returns {0}", d2); Console.WriteLine("Math.Sqrt(-10.0) returns {0}", d3); } }`

  The output is

  Math.Sqrt(16.0) returns 4

  Math.Sqrt(0.0) returns 0

  Math.Sqrt(-10.0) returns NaN

  Returns the square root of a specified number.

  One of the values in the following table.

  parameter

  Return value

  Zero or positive

  The positive square root of .

  Negative

  Equals

  Equals

  The number whose square root is to be found. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathTanExample { public static void Main() { Double d1 = Math.Tan(0); Double d2 = Math.Tan(Math.PI/2.0); Console.WriteLine("Math.Tan(0) returns {0}", d1); Console.WriteLine("Math.Tan(Math.PI/2.0) returns {0}", d2); } }`

  The output is

  Math.Tan(0) returns 0

  Math.Tan(Math.PI/2.0) returns 1.63317787283838E+16

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Returns the tangent of the specified angle.

  The tangent of . If is equal to , , or , this method returns .

  An angle, measured in radians. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  The following example demonstrates using the method.

  `using System; public class MathTanhExample { public static void Main() { Double d1 = Math.Tanh(0); Double d2 = Math.Tanh(Math.PI); Console.WriteLine("Math.Tanh(0) returns {0}", d1); Console.WriteLine("Math.Tanh(Math.PI) returns {0}", d2); } }`

  The output is

  Math.Tanh(0) returns 0

  Math.Tanh(Math.PI) returns 0.99627207622075

  The angle, , must be in radians. Multiply by /180 to convert degrees to radians.

  Returns the hyperbolic tangent of the specified angle.

  The hyperbolic tangent of . If is equal to , this method returns -1. If value is equal to , this method returns 1. If is equal to , this method returns .

  An angle, measured in radians. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  rounds to the nearest integer towards zero.

  Calculates the integral part of a specified decimal number.

  The integral part of ; that is, the number that remains after any fractional digits have been discarded.

  A number to truncate.
- Method
  2.0.0.0
  4.0.0.0
  System.Double ``

  rounds to the nearest integer towards zero.

  Calculates the integral part of a specified double-precision floating-point number.

  The integral part of ; that is, the number that remains after any fractional digits have been discarded, or one of the values listed in the following table.

  Return value

  A number to truncate.
0