Let's get moving
Montgomery-Smith, Stephen
stephen at missouri.edu
Mon Jun 1 23:33:41 UTC 2015
Hey people,
I was looking at https://wiki.freebsd.org/Numerics, and we are stalling.
For example, we have working code for clog and clogf - why don't we
commit it?
One of the reasons I bring this up is I would like to create a port for
http://librsb.sourceforge.net/, and the only barriers are the lack of
cpowf and cpow. Right now I intend to commit it with a rather
simplistic patch:
+complex float clogf(complex float a) {
+ return logf(cabsf(a)) + I*cargf(a);
+}
+
+complex float cpowf(complex float a, complex float b) {
+ return cexpf(b*clogf(a));
+}
+
+complex double clog(complex double a) {
+ return log(cabs(a)) + I*carg(a);
+}
+
+complex double cpow(complex double a, complex double b) {
+ return cexp(b*clog(a));
+}
+
More information about the freebsd-numerics
mailing list