Public Function NthRoot( _
ByVal vX As Variant _
, ByVal vY As Variant _
) As Variant Y *****
*
*** *
* * X
**
* NthRoot(2, 2) = 1.41421356237309
NthRoot(2, 3) = 1.25992105857044
NthRoot(-2, 3) = "0.629960495232425|1.09112366314537"
NthRoot("-3|-4", 3) = "1.26495290127211|-1.1506137446061"
NthRoot(3, "-3|-4") = "0.862980969502973|0.1532749251185"
NthRoot("-5|-7", "-3|-4") = "0.900647853780349|0.625801119142026"See also: Power FunctionvX: The number whose Nth root is returned. Function returns Null if vX is Null or cannot be fixed up to a real or complex number (as defined by the ComplexStringToReals function). Complex numbers are represented within strings as "R|I" where R is the real part and I is the imaginary part.
Note: NthRoot(X, 2) is equivalent to but less accurate than Sqrt(X).
Definitions:
X ^ (1 / Y)
Power(X, Inv(Y))Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.