JuliaLang/julia — pull request #8056 by simonbyrne (2014-08-19 16:54:51+00:00)
Title: RFC: use double-double precision for sinpi/cospi

This does the multiplication by pi in `sinpi`/`cospi` using double-double arithmetic. It improves the accuracy, with a maximum error of ~0.8 ulps (from ~1.8 ulps previously). So now we have nice things like `sinpi(1/6) == 0.5`.

Possible downsides:
* It is slightly slower (around 2-3% from what I can tell).
* It requires on openlibm (I don't think the kernel functions are usually exported in other libms). However the functions themselves aren't very complicated (e.g. [sin](https://github.com/JuliaLang/openlibm/blob/master/src/k_sin.c)) so we could easily implement them in native julia.

If we're happy with this, I can do the same for `sind`/`cosd` as well.