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

Sqrt Function
Math Complex Class

Public Function Sqrt( _
    ByVal vX As Variant _
    ) As Variant

"Square Root"
Square root of a real or complex number.

    Sqrt(3.4) = 1.84390889145858
    Sqrt(-3.4) = "0|1.84390889145858"
    Sqrt("-2|-3") = "0.895977476129838|-1.67414922803554"
    Sqrt("-2|3") = "0.895977476129838|1.67414922803554"
    IsNull(Sqrt(Null)) = True
See also:
    NthRoot Function
    Square Function
    Sqr Function (Visual Basic)
vX: The number whose square 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: Sqrt(X) is equivalent to and more accurate than NthRoot(X, 2).

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.