RFA: Add ! LDBL_EQ_DBL implementations of cosl, sinl and tanl

Nicholas Clifton nickc@redhat.com
Tue Mar 3 12:09:00 GMT 2015

Hi Corinna,

> That's right, a math.h patch is missing.

Snafu - I had patched the file, but forgot to include it in the 
submission. :-(

> Setting errno should be easy to add:
> - cosl, sinl and tanl just need an extra check for Inf to set errno to
>    EDOM.
> - tanl needs an extra check if the result of a non-Inf arg is Inf to
>    return ERANGE.
> - fabsl doesn't define errors>
> - floorl doesn't produce errors (see Linux man page),
> Nick, any problem to add this?

I can do this, but... sleeping on it last night, I realised that I had 
not checked all of the code paths in the new functions.  When I checked 
them this morning I discovered that they were broken.  Ie sinl(), cosl() 
and tanl() all return incorrect values for certain, large, input values. 
  I tried to investigate, but the maths involved is beyond me, so I am 
going to have to shelve this patch until I have more time.  Sorry.


More information about the Newlib mailing list