delorie.com/archives/browse.cgi | search |
From: | "Jason" <j_ring AT optusnet DOT com DOT au> |
Newsgroups: | comp.os.msdos.djgpp |
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> <200006021200 DOT PAA10793 AT alpha DOT netvision DOT net DOT il> |
Subject: | Re: Rounding doubles to ints |
Date: | Mon, 5 Jun 2000 20:24:58 +1000 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
Lines: | 32 |
Message-ID: | <393b7f50$0$8422$7f31c96c@news01.syd.optusnet.com.au> |
NNTP-Posting-Host: | 198.142.196.73 |
X-Trace: | 960200530 news01.syd.optusnet.com.au 8422 198.142.196.73 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Thanks for your help in this matter. I've taken your suggestions on board and because I'm not too good at assembler, I've got some research to do! Jase. Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote in message news:200006021200 DOT PAA10793 AT alpha DOT netvision DOT net DOT il... > > 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...
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |