www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/30/11:30:54

From: "A. Sinan Unur" <Sinan DOT Unur AT cornell DOT edu>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019