[SciPy-dev] bug in scipy.stats.norm.cdf ?

David M. Cooke cookedm@physics.mcmaster...
Thu Mar 8 03:48:42 CST 2007


On Mar 4, 2007, at 19:08 , John Hunter wrote:

> On 3/4/07, John Hunter <jdh2358@gmail.com> wrote:
>
>> Yep, it's an isnan bug.  If I add a dummy function "erfjdh" to ndtr.c
>> and _cephesmodule.c
>
> latest update: the ndtr.c module is using cephes_isnan defined in
> cephes/isnan.c.  With some experimenting, it appears I am falling into
> the "size(int)==4 and  #ifdef IBMPC" branch of that function, when I
> should be in the "size(int)==4 and  #ifdef MIEEE" branch as far as I
> can determine.
>
> If I manually define MIEEE in isnan.h, I avoid the unwanted isnans.
> Looking at mconf.h where these macros are defined, it looks like I am
> not hitting the branch
>
> #elif defined(sel) || defined(pyr) || defined(mc68000) || defined  
> (m68k) || \
>           defined(is68k) || defined(tahoe) || defined(ibm032) || \
>           defined(ibm370) || defined(MIPSEB) || defined(_MIPSEB) || \
>           defined(__convex__) || defined(DGUX) || defined(hppa) || \
>           defined(apollo) || defined(_CRAY) || defined(__hppa) || \
>           defined(__hp9000) || defined(__hp9000s300) || \
>           defined(__hp9000s700) || defined(__AIX) || defined(_AIX) ||\
>           defined(__pyr__) || defined(__mc68000__) || defined 
> (__sparc) ||\
>           defined(_IBMR2) || defined (BIT_ZERO_ON_LEFT)
> #define MIEEE 1     /* Motorola IEEE, high order words come first */
> #define BIGENDIAN 1
>
> Is there some additional "defined" check  that needs to be added here?
>  Are other mac power pc users seeing this problem?

Give it a try now; I removed all that and replaced it with using  
WORD_BIGENDIAN, defined in Python's pyconfig.h. (As a side effect, I  
removed support for VAX and PDP-11; somehow, I'm not too concerned  
about that...)

-- 
|>|\/|<
/------------------------------------------------------------------\
|David M. Cooke              http://arbutus.physics.mcmaster.ca/dmc/
|cookedm@physics.mcmaster.ca

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20070308/3dcfe088/attachment.bin 


More information about the Scipy-dev mailing list