www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/26/07:13:13

Date: Wed, 26 Sep 2001 13:09:04 +0200
Message-Id: <200109261109.NAA20381@acp3bf.physik.rwth-aachen.de>
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
To: djgpp AT delorie DOT com
Subject: Re: Fwd: [LIP] sprintf. I am stumped
X-Newsgroups: comp.os.msdos.djgpp
In-Reply-To: <20010926093422.5514.qmail@web8006.mail.in.yahoo.com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

In article <20010926093422 DOT 5514 DOT qmail AT web8006 DOT mail DOT in DOT yahoo DOT com> you wrote:
> I got this program from a friend and I tried this out
> on DJGPP. I expected that it would round to the
> nearest even number as the ISO standard says (hope I'm
> remembering it right), but it doesn't happen so. 

Nor does the ISO standard actually say so, in classical C89/C90.  It
just says "The value is rounded to the appropriate number of digits."
It does not specify by what rounding strategy.  In C99, there's a long
sermon dealing with it, which boils down to the rounding mode being
controlled by the same functions that control the FPU itself.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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