Handbook
Glossary
absq ( x -- y )
Factor handbook
»
The language
»
Numbers
»
Mathematical functions
»
Powers and logarithms
Prev:
abs ( x -- y )
Next:
arg ( z -- arg )
Vocabulary
math
.
functions
Inputs
x
a
number
Outputs
y
a non-negative real number
Word description
Computes the squared absolute value of a number. For complex numbers 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