Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: /-INFINITY and NaN Message-ID: <4749@alice.UUCP> Date: Fri, 27-Dec-85 11:30:19 EST Article-I.D.: alice.4749 Posted: Fri Dec 27 11:30:19 1985 Date-Received: Sat, 28-Dec-85 01:48:20 EST References: <360@l5.uucp> Organization: Bell Labs, Murray Hill Lines: 10 > Sun Unix uses IEEE float. They provide library routines isnan() and isinf(). > Note that there are two infinite values (positive and negative) and many > NaNs, so a simple compare to a single value is not good enough. > These library routines seem to be a good idea, since they can be implemented > for all kinds of float (eg, Vax, IBM) and increase portability. (A system > without infinites or NaNs would always return false of course.) One does have to be a tiny bit careful on architectures where an attempt to, say, pass a NaN to a subroutine causes a trap.