cpow and clog

dimpase at gmail.com dimpase at gmail.com
Tue Nov 7 10:39:04 UTC 2017

On Mon, Nov 06, 2017 at 12:41:21PM -0800, Steve Kargl wrote:
> On Mon, Nov 06, 2017 at 08:49:43PM +0100, Michael Danilov wrote:
> > I would like to have some feedback on my attempt to import OpenBSD
> > code for cpow and clog:
> > 
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221341
> > https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187693
> > 
> > What happened to the alternative implementation mentioned in the thread below?
> bde has an implementation of clog[fl].  He may someday 
> commit it.  I don't know if anyone ever worked on cpow[fl].
> I stopped working on powl and tgammal when I returned my
> commit bit due to differences with "higher-ranking" committers.
> > And what had stopped the developers from just reusing the Net-i
> > or OpenBSD code?
> How have you tested the NetBSD and/or OpenBSD code?  What is the
> quality?  Have the long double clogl and cpowl been tested on both
> ld80 and ld128 hardware?  See FreeBSD's lib/msun/src/math_private.h
> for a discussion of possible issues of using I from complex.h in this
> code.

I would like to point out that various FreeBSD ports already contain
implementations of the functions in question.  For instance, the current
numpy includes these implementations - they say it's taken from msun's
FreeBSD back in 2013, mostly (sic!).
Another such port, semi-obsolete, is sage (a.k.a. sagemath), something that I am keen on
reviving. I am sure there are more such ports (e.g. in the C++-land), surely you ought
to know better.

Sorry for being blunt, but IMHO the attitude on this list appears to be
to let the numerics stack on FreeBSD die a slow death. Indeed, most
people hate to reinvent the wheel. It's
really no fun at all to scramble to get these missing implementations
somehow, there are certainly much better ways to use one's time and
brainpower.  On this list people prefer to point at some private code in
uncertain shape, and hope that somehow by some magic FreeBSD will have
the best humanely possible implementation of the complex transcendental
Why don't you first of all try to provide *some* reasonably
working implementation (thus allowing porters not to have to reinvent
this wheel, badly, for $n$-th time over, and then having *fun* making
sure the tools know where to get these functions), and only then try to
improve it?

> > Far as I see, FreeBSD's msun source resembles those other libm's a
> > lot anyway?
> Well, of course, the various libm's look alike.  They all started
> life from Sun Microsystems fdlibm code.  You can get the last
> release from Netlib.
> http://www.netlib.org/fdlibm/index.html
> -- 
> Steve
> _______________________________________________
> freebsd-numerics at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-numerics
> To unsubscribe, send any mail to "freebsd-numerics-unsubscribe at freebsd.org"

More information about the freebsd-numerics mailing list