RE: [Dev-C++] Checking validity of float and double
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-04-27 00:48:56
|
What would be valid data for a float and how it would differ from the random data stored in an unitialised one? Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Glen Corby Sent: Friday, April 26, 2002 12:49 PM To: dev...@li... Subject: [Dev-C++] Checking validity of float and double This isnt a dev-C++ specific question, but i am wondering if anyone knows how you check if a float or double carrys valid data. My program runs fine most of the time but every now and again it spits out -NaN. I figure its from uninitialised variables, however I cant track down where they enter the program without performing periodick checks at suspect locations. So is there a function like bool validFloat(float num) for instance? |