Click or drag to resize
math Class
Implements several C Standard mathematical functions that are missing from the .NET framework.
Inheritance Hierarchy
SystemObject
  Cmath

Namespace:  C
Assembly:  C.math (in C.math.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public sealed class math

The math type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCode examplecopysign(Double, Double)
Copies the sign of number2 to number1.
Public methodStatic memberCode examplecopysign(Single, Single)
Copies the sign of number2 to number1.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberexponent(Double)
Gets the exponent bits of the specified floating-point number.
Public methodStatic memberexponent(Single)
Gets the exponent bits of the specified floating-point number.
Public methodStatic memberfpclassify(Double)
Categorizes the given floating point number into the categories: zero, subnormal, normal, infinite or NAN.
Public methodStatic memberfpclassify(Single)
Categorizes the given floating point number into the categories: zero, subnormal, normal, infinite or NAN.
Public methodStatic memberCode examplefrexp(Double, Int32)
Decomposes the given floating-point number into a normalized fraction and an integral power of two.
Public methodStatic memberCode examplefrexp(Single, Int32)
Decomposes the given floating-point number into a normalized fraction and an integral power of two.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodStatic memberCode exampleilogb(Double)
Gets the unbiased exponent of the specified floating-point number.
Public methodStatic memberCode exampleilogb(Single)
Gets the unbiased exponent of the specified floating-point number.
Public methodStatic memberInt32BitsToSingle
Converts the specified 32-bit signed integer to a single-precision floating point number.
Public methodStatic memberisfinite(Double)
Checks if the given number has finite value.
Public methodStatic memberisfinite(Single)
Checks if the given number has finite value.
Public methodStatic memberisinf(Double)
Checks if the given number is positive or negative infinity.
Public methodStatic memberisinf(Single)
Checks if the given number is positive or negative infinity.
Public methodStatic memberisnan(Double)
Checks if the given number is NaN (Not A Number).
Public methodStatic memberisnan(Single)
Checks if the given number is NaN (Not A Number).
Public methodStatic memberisnormal(Double)
Checks if the given number is normal.
Public methodStatic memberisnormal(Single)
Checks if the given number is normal.
Public methodStatic memberisunordered(Double, Double)
Gets a value that indicates whether two floating-point numbers are unordered.
Public methodStatic memberisunordered(Single, Single)
Gets a value that indicates whether two floating-point numbers are unordered.
Public methodStatic memberCode exampleldexp(Double, Int32)
Scales the specified floating-point number by 2^exponent.
Public methodStatic memberCode exampleldexp(Single, Int32)
Scales the specified floating-point number by 2^exponent.
Public methodStatic memberCode examplelogb(Double)
Gets the unbiased exponent of the specified floating-point number.
Public methodStatic memberCode examplelogb(Single)
Gets the unbiased exponent of the specified floating-point number.
Public methodStatic membermantissa(Double)
Gets the mantissa bits of the specified floating-point number without the implicit leading 1 bit.
Public methodStatic membermantissa(Single)
Gets the mantissa bits of the specified floating-point number without the implicit leading 1 bit.
Public methodStatic memberCode examplenextafter(Double, Double)
Gets the floating-point number that is next after fromNumber in the direction of towardNumber.
Public methodStatic memberCode examplenextafter(Single, Single)
Gets the floating-point number that is next after fromNumber in the direction of towardNumber.
Public methodStatic membernexttoward(Double, Double)
Gets the floating-point number that is next after fromNumber in the direction of towardNumber.
Public methodStatic membernexttoward(Single, Single)
Gets the floating-point number that is next after fromNumber in the direction of towardNumber.
Public methodStatic memberCode examplescalbln(Double, Int64)
Scales the specified floating-point number by 2^exponent.
Public methodStatic memberCode examplescalbln(Single, Int64)
Scales the specified floating-point number by 2^exponent.
Public methodStatic memberCode examplescalbn(Double, Int32)
Scales the specified floating-point number by 2^exponent.
Public methodStatic memberCode examplescalbn(Single, Int32)
Scales the specified floating-point number by 2^exponent.
Public methodStatic membersignbit(Double)
Gets the sign bit of the specified floating-point number.
Public methodStatic membersignbit(Single)
Gets the sign bit of the specified floating-point number.
Public methodStatic memberCode examplesignificand(Double)
Gets the significand of the specified floating-point number.
Public methodStatic memberCode examplesignificand(Single)
Gets the significand of the specified floating-point number.
Public methodStatic memberSingleToInt32Bits
Converts the specified single-precision floating point number to a 32-bit signed integer.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberDBL_DENORM_MAX
Maximum positive, subnormal value of a Double (2.2250738585072009e-308).
Public fieldStatic memberDBL_DENORM_MIN
Minimum positive, subnormal value of a Double (4.94065645841247E-324).
Public fieldStatic memberDBL_EXP_BIAS
The exponent bias of a Double, i.e. value to subtract from the stored exponent to get the real exponent (1023).
Public fieldStatic memberDBL_EXP_BITS
The number of bits in the exponent of a Double (11).
Public fieldStatic memberDBL_EXP_CLR_MASK
Bit-mask used for clearing the exponent bits of a Double (0x800fffffffffffff).
Public fieldStatic memberDBL_EXP_MASK
Bit-mask used for extracting the exponent bits of a Double (0x7ff0000000000000).
Public fieldStatic memberDBL_EXP_MAX
The maximum (unbiased) exponent of a Double (1023).
Public fieldStatic memberDBL_EXP_MIN
The minimum (unbiased) exponent of a Double (-1022).
Public fieldStatic memberDBL_MANT_BITS
The number of bits in the mantissa of a Double, excludes the implicit leading 1 bit (52).
Public fieldStatic memberDBL_MANT_CLR_MASK
Bit-mask used for clearing the mantissa bits of a Double (0xfff0000000000000).
Public fieldStatic memberDBL_MANT_MASK
Bit-mask used for extracting the mantissa bits of a Double (0x000fffffffffffff).
Public fieldStatic memberDBL_MAX
Maximum positive, normal value of a Double (1.7976931348623157E+308).
Public fieldStatic memberDBL_MIN
Minimum positive, normal value of a Double (2.2250738585072014e-308).
Public fieldStatic memberDBL_SGN_CLR_MASK
Bit-mask used for clearing the sign bit of a Double (0x7fffffffffffffff).
Public fieldStatic memberDBL_SGN_MASK
Bit-mask used for extracting the sign bit of a Double (0x8000000000000000).
Public fieldStatic memberFLT_DENORM_MAX
Maximum positive, subnormal value of a Single (1.17549421e-38).
Public fieldStatic memberFLT_DENORM_MIN
Minimum positive, subnormal value of a Single (1.401298E-45).
Public fieldStatic memberFLT_EXP_BIAS
The exponent bias of a Single, i.e. value to subtract from the stored exponent to get the real exponent (127).
Public fieldStatic memberFLT_EXP_BITS
The number of bits in the exponent of a Single (8).
Public fieldStatic memberFLT_EXP_CLR_MASK
Bit-mask used for clearing the exponent bits of a Single (0x807fffff).
Public fieldStatic memberFLT_EXP_MASK
Bit-mask used for extracting the exponent bits of a Single (0x7f800000).
Public fieldStatic memberFLT_EXP_MAX
The maximum (unbiased) exponent of a Single (127).
Public fieldStatic memberFLT_EXP_MIN
The minimum (unbiased) exponent of a Single (-126).
Public fieldStatic memberFLT_MANT_BITS
The number of bits in the mantissa of a Single, excludes the implicit leading 1 bit (23).
Public fieldStatic memberFLT_MANT_CLR_MASK
Bit-mask used for clearing the mantissa bits of a Single (0xff800000).
Public fieldStatic memberFLT_MANT_MASK
Bit-mask used for extracting the mantissa bits of a Single (0x007fffff).
Public fieldStatic memberFLT_MAX
Maximum positive, normal value of a Single (3.40282347e+38).
Public fieldStatic memberFLT_MIN
Minimum positive, normal value of a Single (1.17549435e-38).
Public fieldStatic memberFLT_SGN_CLR_MASK
Bit-mask used for clearing the sign bit of a Single (0x7fffffff).
Public fieldStatic memberFLT_SGN_MASK
Bit-mask used for extracting the sign bit of a Single (0x80000000).
Public fieldStatic memberFP_ILOGB0
Value returned by ilogb(Double) or ilogb(Single) when its input argument is ±0.
Public fieldStatic memberFP_ILOGBNAN
Value returned by ilogb(Double) or ilogb(Single) when its input argument is NaN or NaN respectively..
Public fieldStatic memberFP_INFINITE
Indicates that the value is not representable by the underlying type (positive or negative infinity)
Public fieldStatic memberFP_NAN
Indicates that the value is not representable by the underlying type (positive or negative infinity)
Public fieldStatic memberFP_NORMAL
Indicates that a floating-point value is normal, i.e. not infinity, subnormal, NaN (not-a-number) or zero.
Public fieldStatic memberFP_SUBNORMAL
Indicates that a floating-point value is subnormal.
Public fieldStatic memberFP_ZERO
Indicates that a floating-point value is positive or negative zero.
Public fieldStatic memberINT_MAX
Value returned by ilogb(Double) or ilogb(Single) when its input argument is ±infinity.
Top
Remarks

Both double and single precision functions are implemented. All functions are static and their names follow the C Standard. The class is named after the C header file where the functions are declared.

See Also

Reference