Handbook
Glossary
vabs ( v -- w )
Factor handbook
»
The language
»
Numbers
»
Vector operations
»
Vector arithmetic
Prev:
vneg ( v -- w )
Next:
vsqrt ( v -- w )
Vocabulary
math
.
vectors
Inputs
v
a
sequence
of
number
s
Outputs
w
a sequence of non-negative real numbers
Word description
Takes the absolute value of each element of
v
.
Definition
IN:
math.vectors
GENERIC:
vabs
( v -- w )
Methods
USING:
math.vectors
sequences.cords
;
M:
cord
vabs
[
vabs
]
cord-map
;
inline
USING:
kernel
math
math.vectors
sequences
;
M:
object
vabs
[
abs
]
map
;
inline
USING:
generic
kernel
math.vectors
math.vectors.simd
math.vectors.simd.intrinsics
math.vectors.simd.private
;
M:
simd-128
vabs
dup
simd-rep
[
(simd-vabs)
]
[
M\
simd-128
vabs
(call-next-method)
]
v->v-op
;
inline