Status of expl logl

Bruce Evans brde at optusnet.com.au
Wed Aug 15 15:39:58 UTC 2012


On Wed, 15 Aug 2012, Peter Jeremy wrote:

> On 2012-Aug-15 08:15:52 +1000, Bruce Evans <brde at optusnet.com.au> wrote:
>> I hardly looked at e_pow.c before.  It is apparently half about repeating
>> e_log.c and e_exp.c, to get at their extra internal precision.
>
> I expect cpow() will similarly have to copy slabs of code from e_pow.c
> to avoid losing precision or domain.  Is it worth pulling some of this
> "common" code out so that it can be shared amongst all the different
> functions that need it?

We already have kernels for exp and log, but it is difficult to find
the right interfaces and internals, and these don't have them.  There
are also __exp__D() and  __log__D().  My s_log*.c have yet another
interface.  With heavyweight inlining and optimization, it works OK
to return internals in a big struct, with flags saying what was
returned.  However, the compiler never seems to do quite as well as
manual inlining.

Bruce


More information about the freebsd-numerics mailing list