Support for C99 cexpf?

John Lindgren john.lindgren at tds.net
Fri Oct 14 22:34:19 UTC 2011


On 10/14/2011 05:29 PM, Jilles Tjoelker wrote:
> The cexpf() function is available in 9.0.
Ah, good.

> However, even if it were to be
> MFCed to stable/8, this would still require people to upgrade to a new
> stable/8 and compile audacious themselves (either from upstream sources
> or via ports); packages are built against the oldest supported release
> from the branch.
>
> Therefore, I recommend checking for cexpf() in your configure script and
> providing an own implementation if it is not available. You could take
> the one from FreeBSD 9 in lib/msun/src/s_cexpf.c and
> lib/msun/src/math_private.h, for example.
I'm going to add the following dead-simple fallback and print a warning,
since this is clearly non-optimal:

    #define cexpf(x) (expf(crealf(x))*(cosf(cimagf(x))+sinf(cimagf(x))*I))

Thanks for your response.

-- John Lindgren


More information about the freebsd-standards mailing list