Board index » cppbuilder » Using _finite() and _isnan()

Using _finite() and _isnan()


2003-10-21 05:19:16 AM
cppbuilder11
For a given number, if _isfinite() returns true, does that imply that _isnan() must return false? I need a Venn diagram of the floating point qualifiers... :)
Thanks
 
 

Re:Using _finite() and _isnan()

"Victor Hannak" < XXXX@XXXXX.COM >wrote in
Quote
For a given number, if _isfinite() returns true, does that imply that
_isnan() must return false?
Yes, in IEEE math a number can only be one of a NaN, Infinity or have a
valid value
--
Peter Strömberg
C2K2 C2K3 ISCCIV02 ISCCIV03
 

Re:Using _finite() and _isnan()

"Victor Hannak" < XXXX@XXXXX.COM >wrote in message
Quote

For a given number, if _isfinite() returns true, does that imply that
_isnan() must return false? I need a Venn diagram of the floating point
qualifiers... :)
The following general classifications exist for floating-point numbers:
NaN (sign bit ignored)
Infinite (positive & negative)
Finite (positive and negative)
The "finite" range may be further divided into "normal" numbers, "subnormal"
numbers and "zero". Each of these ranges may be either positive or negative.
If _isnan() is true, all other classification functions should return false.
If _isfinite() is true, _isnan() and _isinfinite() should return false.
HTH,
Daniel Pfeffer
 

{smallsort}