This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #14412] Define __sincos_finite as a fast version of sincos


On 04/29/2013 03:15 PM, OndÅej BÃlka wrote:
> On Mon, Apr 29, 2013 at 01:34:42PM +0000, Joseph S. Myers wrote:
>> On Mon, 29 Apr 2013, Siddhesh Poyarekar wrote:
>>
>>> This patch brings back the assembly implementation of sincos (with
>>> some changes) to give a fast alternative to the default sincos
>>> implementation.  This is defined as __sincos_finite and is used if the
>>> implementing program is compiled with the -ffinite-math-only gcc flag.
>>
>> The changes don't seem to include accurate range reduction.  Without that, 
>> I think this is inappropriate, as it will result in wildly inaccurate 
>> results for large but finite inputs.
>>
> These inputs contain zero significant digits. You cannot expect any
> accuracty from them.

You can't possibly know that.  If the caller asks for sin(2^80) you should
return a close approximation to sin(2^80), not garbage.

Andrew.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]