This is the mail archive of the
mailing list for the glibc project.
Re: RFC: Creating a more efficient sincos interface
On Thu, 13 Sep 2018, Florian Weimer wrote:
> I think this is totally fine if you call it expif or something like that (and
> put the sine in the imaginary part, of course).
And declare it in bits/cmathcalls.h as included from complex.h, rather
than in math.h. With an appropriate custom RUN_TEST_LOOP_* macro that
deals with the different order of expected results you should be able to
put the tests in libm-test-sincos.inc, sharing the array of expected
results with that for sincos rather than needing to generate a separate
file of expected results with sin and cos swapped. Presumably you'd want
the various type-generic templates for complex functions using M_SINCOS to
move to using (an implementation-namespace name for) the faster interface,
but that could be a separate patch.
Joseph S. Myers