Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
v*n ( u n -- w )
Factor documentation
>
Factor handbook
>
The language
>
Numbers
>
Vector operations
>
Vector arithmetic
Prev:
vtruncate ( u -- v )
Next:
n*v ( n v -- w )
Vocabulary
math.vectors
Inputs and outputs
u
a sequence of numbers
n
a number
w
a sequence of numbers
Word description
Multiplies each element of
u
by
n
.
Definition
IN:
math.vectors
GENERIC#
v*n
1
( u n -- w )
Methods
USING:
kernel
math.vectors
sequences.cords
;
M:
cord
v*n
[
v*n
]
curry
cord-map
;
inline
USING:
kernel
math
math.vectors
sequences
;
M:
object
v*n
[
*
]
curry
map
;
inline
USING:
kernel
math.vectors
math.vectors.simd
;
M:
simd-128
v*n
over
simd-with
v*
;
inline