From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Testing for float or int Date: Thu, 30 Apr 1998 09:19:09 -0400 Organization: Cornell University (http://www.cornell.edu/) Lines: 20 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <35487A4D.64B3525B@cornell.edu> References: <35481B84 DOT 167E AT jcu DOT edu DOT au> NNTP-Posting-Host: cu-dialup-1305.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Oon Lin wrote: > I'd like to test is if the input was convertable to an int without > loss of precision. For example , if the input given was 6.0000 , then > converting it to an int would give 6. But if the input was 6.1234 , > then conversion should not take place. take a look at http://www.people.cornell.edu/pages/asu1/samples/index.html#Numbers to see if that helps. -- ---------------------------------------------------------------------- A. Sinan Unur Department of Policy Analysis and Management, College of Human Ecology, Cornell University, Ithaca, NY 14853, USA mailto:sinan DOT unur AT cornell DOT edu http://www.people.cornell.edu/pages/asu1/