mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: catrig
Date: Sun, 12 Feb 2017 16:42:19 +0100	[thread overview]
Message-ID: <20170212154219.GE12395@port70.net> (raw)
In-Reply-To: <m3y3xcypfh.fsf@jhcloos.com>

* James Cloos <cloos@jhcloos.com> [2017-02-11 23:59:46 -0500]:
> There was a recent post on one of the freebsd lists about Stephen
> Montgomery-Smith's catrig routines:
> 
>   http://faculty.missouri.edu/~stephen/software/#catrig
> 
> which is based on the paper "Implementing the complex arcsine and
> arccosine functions using exception handling" by T. E. Hull, Thomas
> F. Fairgrieve, and Ping Tak Peter Tang, published in ACM Transactions on
> Mathematical Software, Volume 23 Issue 3, 1997, Pages 299-335,
> http://dl.acm.org/citation.cfm?id=275324.
> 
> It looks to be the most accurate catrig code availalbe.  Stephen writes
> that tests indicate that both the real and imaginary parts of the
> results are good to within 4 ULP, that catrigl.c supports both 80 bit and
> 128 bit long double but that the float version is occasionally slightly
> worse that 4 ULP.
> 
> I don't know how much interest the musl community has in better accuracy
> for libm, but in case there is interest Stephen's code looks like a good
> choice.
> 
> And I see musl already uses freebsd libm code for some of the complex trig.

glibc and freebsd have precise complex math,
i think musl should do it too, but i dont yet
have the testing infrastructure

musl has slightly different tradeoffs than freebsd
so we cannot take the code as is: i prefer to do
bithacks in a more explicit way, volatile hacks are
not allowed and code size matters so unnecessary
optimization/special case branches should be pruned.

it was low prio because i dont know of any actual
users of these functions (for a long time glibc
and bsd implementations were bad so nobody could
rely on the precision of these functions).


      reply	other threads:[~2017-02-12 15:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-12  4:59 catrig James Cloos
2017-02-12 15:42 ` Szabolcs Nagy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170212154219.GE12395@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).