Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2011 18:33:56 -0400
From:      John Lindgren <john.lindgren@tds.net>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: Support for C99 cexpf?
Message-ID:  <4E98B8D4.5060006@tds.net>
In-Reply-To: <20111014212919.GA34658@stack.nl>
References:  <4E9897FF.2040307@tds.net> <20111014212919.GA34658@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E98B8D4.5060006>