Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: floating point constants Message-ID: <10611@smoke.BRL.MIL> Date: 26 Jul 89 15:23:10 GMT References: <1925@arisia.Xerox.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <1925@arisia.Xerox.COM> leisner@arisia.Xerox.COM (Marty Leisner) writes: >Is this a valid C program? It's certainly not strictly conforming. Division by zero is handled in an implementation-dependent way, including fatal compile-time error. Some of us think the IEEE inf/Nan scheme is conceptually bogus anyway. However, given that you seem to have a use for these in your (non-portable) application, the only way I know of to safely obtain inf and NaN quantities is to do it at run time, not compile time. In your example that means not computing the quantities by some constant expression, but by one involving variables.