Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: $Revision: 1.6.2.16 $; site ISM780.UUCP Path: utzoo!linus!decvax!cca!ISM780!david From: david@ISM780.UUCP Newsgroups: net.lang.c Subject: Re: How to test for +/- INFINITY, etc. i Message-ID: <30000021@ISM780.UUCP> Date: Mon, 30-Dec-85 18:37:00 EST Article-I.D.: ISM780.30000021 Posted: Mon Dec 30 18:37:00 1985 Date-Received: Wed, 1-Jan-86 04:45:55 EST References: <993@turtlevax.UUCP> Lines: 13 Nf-ID: #R:turtlevax:-99300:ISM780:30000021:000:597 Nf-From: ISM780!david Dec 30 18:37:00 1985 Using a constant like 0x7f800000 should jump out as not being portable. Even if it is hidden in a #define or a union. For a union of a float and a long, the pdp11 and vax show different values for the same float if the long is printed. Also, there is no guarantee that the size of the float will match the size of the long. Besides, 0x7f800000 is obviously wrong on the pdp11 and vax! It might be nice if machine dependent functions could be added to libc (3m) to detect not-a-nums and plus and minus infinities. This seems to me to be where these guys belong.