Open
Description
Neither boost nor Eigen has a sincos function however Julia has a succinct implementation in C at https://github.com/JuliaLang/julia/blob/eabd0212ed974b7128ec77180424090edb4a6d04/base/fastmath.jl#L299. The code is MIT license that is compatible with ours.
A few questions:
- Is it possible to add llvm code like this?
- Do we want to?
The output from this function will be a tuple of whatever the input type was. So if the input is a real the output will be a tuple of reals. If the input is complex
then this falls back to calculating sin and cos separately and returning a tuple of complex types.