Signature (Visual Basic / VBA)
Public Function NthRoot( _
ByVal vX As Variant _
, ByVal vY As Variant _
) As Variant
Code Examples
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"
Y *****
*
*** *
* * X
**
*
X ^ (1 / Y)
Power(X, Inv(Y))
Parameters
| Parameter | Description |
|---|---|
| vX | 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. |
| vY | The root of vX that is to be returned. Function returns Null if vY is Null or cannot be fixed up to a real or complex number. |
Notes & Version History
| Note | NthRoot(X, 2) is equivalent to but less accurate than Sqrt (X). |