🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.num-analysis
Article #1298

NaN/Inf in gnu C

#1298
From: Ivo Welch
Date: Sun, 23 Oct 1994 22:54
14 lines
1123 bytes
I used to use the following definitions on an Intel computer

#define NaN	0.0/0.0
#define Inf	1.0/0.0
#define isNaN(x)	((x)!=(x))

Unfortunately, the new gnu C and C++ compilers complain about division  
errors.  What is the currently recommended way either to shut this warning  
off, or to define Inf/NaN?

Ivo Welch			ivo@128.97.74.50 = next.agsm.ucla.edu
Asst Prof of Finance		iwelch@agsm.ucla.edu
AGSM at UCLA			
Technical Details
Message-ID: <38epj9$n3q@news.mic.ucla.edu>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!usenet

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 107079,47da2fb6ae54bedb,start
X-Google-Attributes: gid107079,public
X-Google-Thread: f97d0,47da2fb6ae54bedb,start
X-Google-Attributes: gidf97d0,public
X-Google-ArrivalTime: 1994-10-23 15:59:15 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!usenet
From: ivo@next.agsm.ucla.edu (Ivo Welch)
Newsgroups: sci.math.num-analysis,gnu.g++
Subject: NaN/Inf in gnu C
Date: 23 Oct 1994 22:54:33 GMT
Organization: UCLA Microcomputer Support Office
Lines: 14
Distribution: inet
Message-ID: <38epj9$n3q@news.mic.ucla.edu>
NNTP-Posting-Host: next.agsm.ucla.edu