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