This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q: (d = NAN) != NAN?
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: <gcc at gcc dot gnu dot org>
- Cc: <nd at arm dot com>
- Date: Fri, 8 Apr 2016 11:12:22 +0100
- Subject: Re: Q: (d = NAN) != NAN?
- Authentication-results: sourceware.org; auth=none
- Nodisclaimer: True
- References: <57079F7E020000A1000208A1 at gwsmtp1 dot uni-regensburg dot de>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
On 08/04/16 11:09, Ulrich Windl wrote:
> Probably I'm doing something wrong, but I have some problems comparing a double with NAN: The value is NAN, but the test fails. Probably I should use isnana().
yes, that's how ieee works, nan != nan is true.