J3/05-111r1
Date: 29 Jan 2005
To: J3
From: John Reid
Subject: Signbit of NaN
Here is a draft response for F03/0032, with thanks to Malcolm Cohen
for his help.
NUMBER: F03/0032
TITLE: Sign bit of IEEE NaN
KEYWORDS: IEEE-754, NaN, sign bit, negative
DEFECT TYPE: Interpretation
STATUS: For consideration
QUESTION:
Do IEEE-754 NaNs have a sign bit? Can they be negative? Does a
sign bit imply a value can be either positive or negative?
Fortran 2003 in 14.10.2 (IEEE_COPY_SIGN) says that NaNs have a
sign bit. But, 14.10.10 (IEEE_IS_NEGATIVE) says NaNs are not
negative. This appears to be a contradiction between two parts
of Fortran 2003.
ANSWER:
The representation of a NaN has a sign bit, and this is what is
referred to in 14.10.2. However, that bit is not interpreted as
a sign (see IEEE standard, 6.3 "This standard does not interpret the
sign of a NaN"). Thus 14.10.10 correctly says that a NaN is never
negative.
EDITS: None.
SUBMITTED BY: Fred Tydeman
HISTORY: J3/05-111 m171 Submitted