absq ( x -- y )
Factor documentation > Factor handbook > The language > Numbers > Mathematical functions > Powers and logarithms
Prev:abs ( x -- y )
Next:arg ( z -- arg )


Vocabulary
math.functions

Inputs and outputs
xa number
ya non-negative real number


Word description
Computes the squared absolute value of a complex number. This is marginally more efficient than abs.

Definition
IN: math.functions

GENERIC: absq ( x -- y ) foldable flushable


Methods
USING: kernel math math.functions ;

M: complex absq >rect [ sq ] bi@ + ; inline


USING: math math.functions ;

M: real absq sq ; inline