Handbook
Glossary
fp-qnan? ( x -- ? )
Factor handbook
»
The language
»
Numbers
»
Floats
»
Bitwise operations on floats
Prev:
fp-nan? ( x -- ? )
Next:
fp-snan? ( x -- ? )
Vocabulary
math
Inputs
x
a
real
Outputs
?
a
boolean
Word description
Tests if
x
is an IEEE Quiet Not-a-Number value. While
x
can be any real number, this word will only ever yield true if
x
is a
float
.
See also
fp-special?
,
fp-nan?
,
fp-snan?
,
fp-infinity?
,
fp-nan-payload
,
<fp-nan>
Definition
IN:
math
GENERIC:
fp-qnan?
( x -- ? )
Methods
USING:
kernel
math
;
M:
float
fp-qnan?
dup
fp-nan?
[
fp-nan-payload
51
bit?
]
[
drop
f
]
if
;
inline
USING:
kernel
math
;
M:
object
fp-qnan?
drop
f
;
inline