StephenAshley.Biostatistics.DecMath Class Reference

Provides a set of static methods to perform numerical operations, mostly on Decimal values. More...

List of all members.

Static Public Member Functions

static Decimal Abs (Decimal value)
 Returns the absolute value of a number.
static Decimal Atan (Decimal angle)
 Returns the angle whose tangent is the specified number.
static Decimal Cos (Decimal angle)
 Returns the cosine of the specified angle.
static Decimal Exp (Decimal value)
 Returns e raised to the specified power.
static double Factorial (Int32 value)
 Returns the factorial of a value.
static Decimal Pow (Decimal value, Int32 power)
 Returns a value raised to a power.
static Decimal Pow (Decimal value, Int64 power)
 Returns a value raised to a power.
static bool IsDecimal (string value)
 Determines whether a string represents a Decimal.
static bool IsEven (Int32 value)
 Determines whether an Int32 is even.
static bool IsOdd (Int32 value)
 Determines whether an Int32 is odd.
static Decimal Log (Decimal value)
 Returns the logarithm of a specified number.
static Decimal Log10 (Decimal value)
 Returns the base 10 logarithm of a specified number.
static Decimal Sin (Decimal angle)
 Returns the sine of the specified angle.
static Decimal Sqrt (Decimal value)
 Calculates the square root of a Decimal.
static Decimal KahanSum (Decimal[] values)
 Returns the Kahan Sum of an array of Decimal numbers.
static Decimal KahanSum (List< Decimal > values)
 Returns the Kahan Sum of a List of Decimal numbers.

Public Attributes

const Decimal PI = 3.1415926535897932384626433833m
 Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
const Decimal e = 2.71828182845904523536028747m
 Represents Euler’s constant.


Detailed Description

Provides a set of static methods to perform numerical operations, mostly on Decimal values.

Definition at line 11 of file DecMath.cs.


Member Function Documentation

static Decimal StephenAshley.Biostatistics.DecMath.Abs ( Decimal  value  )  [static]

Returns the absolute value of a number.

Parameters:
value The number.
Returns:
The absolute value.

Definition at line 33 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Atan ( Decimal  angle  )  [static]

Returns the angle whose tangent is the specified number.

Parameters:
angle A number representing a tangent.
Returns:
An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2.

-or-

System.Double.NaN if d equals System.Double.NaN, -π/2 rounded to double precision (-1.5707963267949) if d equals System.Double.NegativeInfinity, or π/2 rounded to double precision (1.5707963267949) if d equals System.Double.PositiveInfinity.

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

Multiply the return angle by 180/DecMath.PI to convert from radians to degrees.

Definition at line 56 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Cos ( Decimal  angle  )  [static]

Returns the cosine of the specified angle.

Parameters:
angle An angle, measured in radians.
Returns:
The cosine of angle .

Definition at line 66 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Exp ( Decimal  value  )  [static]

Returns e raised to the specified power.

Parameters:
value A number specifying a power.
Returns:
The number e raised to the power d . If d equals System.Double.NaN or System.Double.PositiveInfinity, that value is returned. If d equals System.Double.NaN, 0 is returned.

Definition at line 81 of file DecMath.cs.

static double StephenAshley.Biostatistics.DecMath.Factorial ( Int32  value  )  [static]

Returns the factorial of a value.

Parameters:
value The value.
Returns:
The factorial.

Definition at line 91 of file DecMath.cs.

static bool StephenAshley.Biostatistics.DecMath.IsDecimal ( string  value  )  [static]

Determines whether a string represents a Decimal.

Parameters:
value The string.
Returns:
true if value is a Decimal; otherwise false.
Exceptions:
OverflowException value represents a number less than -79,228,162,514,264,337,593,543,950,335 or greater than 79,228,162,514,264,337,593,543,950,335.

Definition at line 155 of file DecMath.cs.

static bool StephenAshley.Biostatistics.DecMath.IsEven ( Int32  value  )  [static]

Determines whether an Int32 is even.

Parameters:
value The Int32.
Returns:
true if value is even, otherwise false.

Definition at line 191 of file DecMath.cs.

static bool StephenAshley.Biostatistics.DecMath.IsOdd ( Int32  value  )  [static]

Determines whether an Int32 is odd.

Parameters:
value The Int32.
Returns:
true if value is odd, otherwise false.

Definition at line 219 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.KahanSum ( List< Decimal >  values  )  [static]

Returns the Kahan Sum of a List of Decimal numbers.

Parameters:
values The list of numbers
Returns:
The sum.

Definition at line 356 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.KahanSum ( Decimal[]  values  )  [static]

Returns the Kahan Sum of an array of Decimal numbers.

Parameters:
values The array of numbers
Returns:
The sum.

Definition at line 330 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Log ( Decimal  value  )  [static]

Returns the logarithm of a specified number.

Parameters:
value A number whose logarithm is to be found.
Returns:
If value is positive, returns the natural logarithm of d. If value is , returns System.Double.NegativeInfinity. If value is negative, returns System.Double.NaN. If value is equal to System.Double.NaN, returns System.Double.NaN. If value is equal to System.Double.PositiveInfinity, returns System.Double.PositiveInfinity.

Definition at line 239 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Log10 ( Decimal  value  )  [static]

Returns the base 10 logarithm of a specified number.

Parameters:
value A number whose logarithm is to be found.
Returns:
The logarithm.

Definition at line 249 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Pow ( Decimal  value,
Int64  power 
) [static]

Returns a value raised to a power.

Parameters:
value The value.
power The exponent.
Returns:
The result.
power must be a positive integer.

Definition at line 127 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Pow ( Decimal  value,
Int32  power 
) [static]

Returns a value raised to a power.

Parameters:
value The value.
power The exponent.
Returns:
The result.
power must be a positive integer.

Definition at line 110 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Sin ( Decimal  angle  )  [static]

Returns the sine of the specified angle.

Parameters:
angle An angle, measured in radians.
Returns:
The sine of angle .

Definition at line 259 of file DecMath.cs.

static Decimal StephenAshley.Biostatistics.DecMath.Sqrt ( Decimal  value  )  [static]

Calculates the square root of a Decimal.

Parameters:
value The Decimal.
Returns:
The square root.
Exceptions:
ArgumentException Thrown when value is negative.

Definition at line 271 of file DecMath.cs.


Member Data Documentation

const Decimal StephenAshley.Biostatistics.DecMath.e = 2.71828182845904523536028747m

Represents Euler’s constant.

The value of this field is 2.71828182845904523536028747.

Definition at line 26 of file DecMath.cs.

const Decimal StephenAshley.Biostatistics.DecMath.PI = 3.1415926535897932384626433833m

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

The value of this field is 3.1415926535897932384626433833.

Definition at line 20 of file DecMath.cs.


The documentation for this class was generated from the following file:

Generated on Sun May 31 19:43:39 2009 for "Biostatistics Documentation" by  doxygen 1.5.9