[PATCH] Fix lrint, lrintf bugs

Dave Korn dave.korn@artimi.com
Tue Jun 28 10:15:00 GMT 2005


----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....



More information about the Newlib mailing list