delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/23/08:31:14

Date: Thu, 23 Apr 1998 14:30:38 +0200
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Message-Id: <199804231230.OAA11215@acp3bf.physik.rwth-aachen.de>
To: pderbysh AT usa DOT net (Paul Derbyshire)
Cc: djgpp AT delorie DOT com
Subject: Re: Spotting NaNs
Newsgroups: comp.os.msdos.djgpp
Organization: RWTH Aachen, III. physikalisches Institut B

In article <353F141B DOT 24547B62 AT usa DOT net> you wrote:
> I also noticed neither isnan() nor isnanf() appear to be ANSI or
> POSIX. 

I don't think they can possibly be. After all, there's nothing that
would guarantee that there even _is_ such a thing as a NaN on every
possible platform. (But rumor has it that the requirement of such IEEE
754 compatibility may be added to the next of the ANSI C Standard,
nicknamed C9X).

> Are they widely supported? Or a Gnu extension? 

Widely supported: yes, I'ld say (just checked on Linux, Solaris, DEC
Unix, DEC Ultrix, and SGI's IRIX). According to one of those systems'
man pages, it's defined by 'XPG4' (by X/Open, a Unix standardisation
effort). Certainly no GNU extension.

Generally, I'ld guess you'll find isnan() & friends on every system
with an IEEE 754 compatible floating point system.

--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019