<-- Previous || Up || Next -->

Nth Root Function
Math Complex Class

Public Function NthRoot( _
      ByVal vX As Variant _
    , ByVal vY As Variant _
    ) As Variant

Return the Nth root given real and/or complex numbers.

      Y    *****
          *
    ***  *
      * *  X
      **
      *

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"
See also:
    Power Function
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.

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.