For REAL, INTEGER,and LONG arguments, the result of the ABS function is the same type as the argument.
COMPLEX Arguments
For COMPLEX arguments, ABS returns the absolute value (magnitude or modulus) of the argument. The absolute value of a number CMPLX(X,Y) is the distance from the origin to the point (X,Y) in the complex plane:
ABS(CMPLX(X,Y)) = SQRT(X^2+Y^2)
Notice that intermediate values generated during the calculation of the function can cause over or underflow errors for very large or small values of X and Y. Complex numbers are stored in rectangular form, but may be used in polar form using ABS and ARG. For example:
PRINT "Magnitude = ";ABS(Z),"Angle = ";ARG(Z)
To enter a number in polar form, convert it from polar form to rectangular in this manner: