www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/01/00:38:28

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problems with DJGPP V2.01 - atof() function
Date: Sat, 30 Nov 1996 20:40:30 -0800
Organization: Alcyone Systems
Lines: 19
Message-ID: <32A10C3E.33B7E15B@alcyone.com>
References: <329e68a5 DOT 10316617 AT news DOT ua DOT pt> <32A03F1D DOT 4967 AT pobox DOT oleane DOT com>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Francois Charton wrote:

> Not in the library : I can reproduce your bug without any call to atof()
> or other functions of the kind:
    ...

Right.  The standard (though ugly) way of handling these things is to have
a `round' function/pseudofunction which does something like the following:

    #define _round(_f) ((int) (_f + 0.5))

An extra add, but that's what you get when you use floating point.

-- 
                             Erik Max Francis | max AT alcyone DOT com
                              Alcyone Systems | http://www.alcyone.com/max/
                         San Jose, California | 37 20 07 N 121 53 38 W
                                 &tSftDotIotE | R^4: the 4th R is respect
         "But since when can wounded eyes see | If we weren't who we were"

- Raw text -


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