History log of /netbsd/lib/libm/complex/csqrt.c (Results 1 – 4 of 4)
Revision Date Author Comments
# bf3b7e6d 01-Jan-2017 maya <maya@NetBSD.org>

compare to zero, instead of using signbit, and be more specific in comment.
-0.0 > 0 is also false. no functional change.

while this is mostly a change to be consistent in style (the rest of the
com

compare to zero, instead of using signbit, and be more specific in comment.
-0.0 > 0 is also false. no functional change.

while this is mostly a change to be consistent in style (the rest of the
comparisons aren't done with signbit), it is also a micro-optimization.

with our default compile flags, calls to copysign are libm calls (and a
whole function call!!). this generates more efficient code.

show more ...


# 00e942c2 31-Dec-2016 maya <maya@NetBSD.org>

csqrt has a branch cut on the negative real axis, and this requires
delicacy in order to maintain continuity around it.

we have an initial case to deal with a fairly common case: getting
a real numb

csqrt has a branch cut on the negative real axis, and this requires
delicacy in order to maintain continuity around it.

we have an initial case to deal with a fairly common case: getting
a real number. Avoid dealing with the branch cut in this case by
checking if the real part is negative.

later, -0.0 < 0 is not met, so instead, test for a negative number
using signbit, so negative zero is also treated as a negative number.

Fixes last part of PR lib/51427: libm issues triggered by py-numpy

ok riastradh

show more ...


# 1102a777 31-Dec-2016 maya <maya@NetBSD.org>

Spare ourselves a fabs call. We already check the sign later.
w = r + y*I is the same as w = r because this is the y == 0 case.

no functional change.


# 9d8b5fa7 20-Aug-2007 drochner <drochner@NetBSD.org>

Add C99 complex support, for double and float.
Most complex function implementations are from the "c9x-complex" library,
originating from the "cephes" math library, see
http://www.netlib.org/cephes/,

Add C99 complex support, for double and float.
Most complex function implementations are from the "c9x-complex" library,
originating from the "cephes" math library, see
http://www.netlib.org/cephes/, from Stephen L. Moshier, incorporated and
redistributed with the NetBSD license by permission of the author.

Error behaviour and other boundary conditions (branch cuts)
need to be looked at.

For namespace sanity, I've done the rename/weak alias procedure to
most of the exported functions which are also used internally.
Didn't do so for sin/cos(f) yet because assembler implementations use
them directly, and renaming functions shared between the main libm
and the machine specific "overlay" might raise binary compatibility
issues.

show more ...