[Numpy-discussion] Branch cuts, inf, nan, C99 compliance

Nils Wagner nwagner at iam.uni-stuttgart.de
Sun Jul 20 04:51:39 EDT 2008


On Sun, 20 Jul 2008 02:34:48 -0600
  "Charles R Harris" <charlesr.harris at gmail.com> wrote:
> On Sun, Jul 20, 2008 at 2:18 AM, Nils Wagner 
><nwagner at iam.uni-stuttgart.de>
> wrote:
> 
>> On Sat, 19 Jul 2008 13:29:45 -0500
>>  "Travis E. Oliphant" <oliphant at enthought.com> wrote:
>> > Pauli Virtanen wrote:
>> >> Hi all,
>> >>
>> >> Re: Ticket 854.
>> >>
>> >> I wrote tests for the branch cuts for all complex 
>>arc*
>> >>functions
>> >> in umathmodule. It turns out that all except arccosh
>> >>were OK.
>> >> The formula for arcsinh was written in a non-standard
>> >>form with
>> >> an unnecessary nc_neg, but this didn't affect the
>> >>results.
>> >> I also wrote tests for checking values of the 
>>functions
>> >>at infs and nans.
>> >>
>> >
>> > Thanks for looking into these.   These functions were
>> >contributed by
>> > Konrad Hinsen (IIRC) many years ago and I don't think
>> >they've really
>> > been reviewed since then.
>> >
>> > I'm all for using C99 when it is available and 
>>improving
>> >these functions
>> > with help from cmathmodule.  IIRC, the cmathmodule was
>> >contributed by
>> > Konrad originally also.
>> >
>> > So +1 on C99 standardization.
>> >
>> > -Travis
>> >
>>
>> ======================================================================
>> ERROR: test_umath.TestC99.test_catanh(<ufunc 'arctanh'>,
>> (nan, nan), (nan, nan), '')
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>   File
>> "/usr/lib/python2.4/site-packages/nose-0.10.3-py2.4.egg/nose/case.py",
>> line 182, in runTest
>>     self.test(*self.arg)
>>   File
>> "/usr/lib/python2.4/site-packages/numpy/core/tests/test_umath.py",
>> line 405, in _check
>>     func(point)
>> FloatingPointError: invalid value encountered in arctanh
>>
> 
> <snip>
> 
> What architecture and OS?

Linux linux 2.6.11.4-21.17-default #1 Fri Apr 6 08:42:34 
UTC 2007 i686 athlon i386 GNU/Linux

SuSe Linux 9.3

gcc --version
gcc (GCC) 3.3.5 20050117 (prerelease) (SUSE Linux)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying 
conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.

/usr/bin/python
Python 2.4 (#1, Oct 13 2006, 17:13:31)
[GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more 
information.

  Nils
  



More information about the NumPy-Discussion mailing list