Signature (Visual Basic / VBA)
Public Function Square( _
ByVal vX As Variant _
) As Variant
Code Example
Square(3.4) = 11.56
Square(-3.4) = 11.56
Square("-2|-3") = "-5|12"
Square("-2|3") = "-5|-12"
IsNull(Square(Null)) = True
Parameters
| Parameter | Description |
|---|---|
| vX | The number whose square is returned; the number is multiplied by itself. 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. |
Notes & Version History
| Note | Square(X) is equivalent to and faster than Mult (X, X). |
| Note | Square(X) is equivalent to and more accurate than Power (X, 2). |