[PATCH] Fix lrint, lrintf bugs

Dave Korn dave.korn@artimi.com
Mon Jun 27 09:25:00 GMT 2005

----Original Message----
>From: Dave Korn
>Sent: 26 June 2005 17:09

> ----Original Message----
>> From: Dave Korn
>> Sent: 26 June 2005 16:56
>> ----Original Message----
>>> From: Dave Korn
>>> Sent: 26 June 2005 16:25
>>>   Um.  If I'm brutally honest I suppose I should point out that the
>>> testing doesn't cover very large values.  I'll do that offline after I
>>> send this post.  In the meantime, assume this is good unless I report
>>> back it went wrong!
>>   :)  It went right!
>   For reference, here's the improved testcase I used with big nums, and it
> also uses long ints instead of recycling the float/double vars to receive
> the function results.  Still no discrepancies.

  Oh, and as CV has pointed out, one of these might be needed:

2005-06-26  Dave Korn  <dave.korn@artimi.com>

	* libm/common/s_lrint.c (lrint):  Fix signed-vs-unsigned comparison
	and miscalculation caused by fp representation of zero.
	* libm/common/sf_lrint.c (lrintf):  Likewise.

Can't think of a witty .sigline today....

More information about the Newlib mailing list