This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
RE: [PATCH] Fix lrint, lrintf bugs
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Jeff Johnston'" <jjohnstn at redhat dot com>
- Cc: <newlib at sources dot redhat dot com>
- Date: Tue, 28 Jun 2005 11:15:14 +0100
- Subject: RE: [PATCH] Fix lrint, lrintf bugs
----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.
cheers,
DaveK
--
Can't think of a witty .sigline today....