Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
[-1,1]? ( x -- ? )
Vocabulary
math.functions
Inputs and outputs
x
a
number
?
a boolean
Word description
Tests if
x
is a real number between -1 and 1, inclusive.
Definition
USING:
kernel
math
;
IN:
math.functions
:
[-1,1]?
( x -- ? )
dup
complex?
[
drop
f
]
[
abs
1
<=
]
if
;
inline