EsbDecimals - a Free Subset of ESBPCS for .NET

DecimalOps.NthRoot Method (Double, Int32)

Computes the Decimal Nth Root using Newton's Method.

[Visual Basic]
Overloads Public Shared Function NthRoot( _
   ByVal x As Double, _
   ByVal n As Integer _
) As Decimal
[C#]
public static decimal NthRoot(
   double x,
   int n
);

Parameters

x
We desire the Nth root of this Value. Must be >= 0
n
The Level of Root - ie Nth Root.

Return Value

Nth Root of given Value

Exceptions

Exception TypeCondition
ArithmeticException Thrown when a negative value is passed or n < 2.

See Also

DecimalOps Class | Esb.Math Namespace | DecimalOps.NthRoot Overload List