www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/02/08:01:38

Message-Id: <200006021200.PAA10793@alpha.netvision.net.il>
Date: Fri, 02 Jun 2000 14:59:33 +0200
X-Mailer: Emacs 20.6 (via feedmail 8.1.emacs20_6 I) and Blat ver 1.8.5b
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
To: buers AT gmx DOT de (Dieter Buerssner)
CC: djgpp AT delorie DOT com
In-reply-to: <8h89js.3vs4im1.0@buerssner-17104.user.cis.dfn.de>
Subject: Re: Rounding doubles to ints
References: <39363d0a$0$8416$7f31c96c AT news01 DOT syd DOT optusnet DOT com DOT au> <8h67e5 DOT 3vs4im1 DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de> <200006011957 DOT WAA01748 AT alpha DOT netvision DOT net DOT il> <8h89js DOT 3vs4im1 DOT 0 AT buerssner-17104 DOT user DOT cis DOT dfn DOT de>
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

> From: buers AT gmx DOT de (Dieter Buerssner)
> Newsgroups: comp.os.msdos.djgpp
> Date: 2 Jun 2000 10:27:00 GMT
> 
> Eli Zaretskii wrote:
> 
> >IIRC, the version of `rint' in libm.a rounds correctly in a way that
> >doesn't depend on the rounding mode (and without fiddling it).
> 
> rint() depends on the rounding mode, as it should.

I now realize that my wording was inaccurate and confusing.  Sorry for
that.

What I meant to say is that it doesn't access the FPU registers to
find out the rounding mode, and doesn't change it.

> The source code
> (that is difficult to understand), seems to do the equivalent of
> the three-liner I posted.

It's not easy to write code that knows nothing about the FP hardware
and still works...

- Raw text -


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