[issue1381] cmath is numerically unsound

Christian Heimes report at bugs.python.org
Tue Jan 8 23:42:19 CET 2008


Christian Heimes added the comment:

* I've added a configure test for copysign a while ago. I'm using this
constructor for Windows compatibility in mathmodule.c:

#ifdef MS_WINDOWS
#  define copysign _copysign
#  define HAVE_COPYSIGN 1
#endif
#ifdef HAVE_COPYSIGN
#endif

I know no platform besides Windows with a _copysign method. You don't
have to add tests for _copysign for Windows. You may want to add the
code to PC/pyconfig.h and define HAVE_COPYSIGN there.

* test_file = testdir + os.sep + 'cmath.ctest
  make that:
  test_file = os.path.join(testdir, 'cmath.ctest')

* Windows doesn't have log1p, the hyperbolic area functions (asinh) and
some other functions, too. IIRC Windows does only implement the Bessel
functions of 1st and 2nd kind but non of the other C99 math functions.

----------
nosy: +tiran

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1381>
__________________________________


More information about the Python-bugs-list mailing list