On Sun, Nov 22, 2009 at 10:01 AM, David Cournapeau <courn...@gmail.com> wrote: > On Sun, Nov 22, 2009 at 11:45 PM, Charles R Harris > <charlesr.har...@gmail.com> wrote: >> >> Might be nice to print out the actual values of np.spacing and np.nextafter >> here. >> > > Yes, I should add some utilities to print those for this kind of test. > But in this case, I know the problem: mingw gcc use 80 bits long > double but it uses the MS runtime which considers double and long > double to be the same (8 bytes). > > I think the real fix is to force npy_longdouble to be double on mingw, > but I don't want to make that change now for 1.4.0.
adding the failing type in the test to the failure message would also be helpful from test_umath test_spacing(): >>> for t in [np.float32, np.float64, np.longdouble]: ... one = t(1) ... eps = np.finfo(t).eps ... nan = t(np.nan) ... inf = t(np.inf) ... print t ... print np.spacing(one), eps ... print np.isnan(np.spacing(nan)) ... print np.isnan(np.spacing(inf)) ... print np.isnan(np.spacing(-inf)) ... <type 'numpy.float32'> 1.19209e-007 1.19209e-007 True True True <type 'numpy.float64'> 2.22044604925e-016 2.22044604925e-016 True True True <type 'numpy.float96'> 1.08420217249e-019 2.22044604925e-016 True True True Josef > > David > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion