This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
RE: [PATCH] Fix lrint, lrintf bugs
- From: jjohnstn <jjohnstn at redhat dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 28 Jun 2005 13:06:31 -0400 (EDT)
- Subject: RE: [PATCH] Fix lrint, lrintf bugs
On Tue, 28 Jun 2005, Dave Korn wrote:
> ----Original Message----
> >From: Jeff Johnston
> >Sent: 27 June 2005 20:44
>
>
> > Thanks Dave. I see the 2nd check for 0 in lrint as being extraneous.
> > There is no way that adding a value to 2**52 that has an exponent >= 20
> > and less than 8 * sizeof int can result in 0. Ok if I remove that and
> > check it in?
>
>
> Well, I put it in because I'm not 100% confident I grokked the code fully,
> so I was being overcautious, and as long as you're doing bitwise
> decomoposition of a float, it can't *hurt* to check for abnormal
> representations. I guess it has to be ok to take it out. I was kinda
> worried about denormalized numbers but after looking it up it seems that
> only small values, not huge ones, can ever be denormalized, so we should be
> in the clear there too.
>
Ok, code has been checked in minus the extra zero check. Thanks again.
-- Jeff J.