Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Strange behavior of ldexp on Python2.5 + Wine (Trac #1641) #2237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 1 comment
Closed

Strange behavior of ldexp on Python2.5 + Wine (Trac #1641) #2237

numpy-gitbot opened this issue Oct 19, 2012 · 1 comment

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/1641 on 2010-10-19 by @pv, assigned to unknown.

On Python 2.5 + MinGW + Wine (and probably on a real Windows, too):

>>> import numpy as np
>>> np.iinfo('l').max
2147483647
>>> np.ldexp(2, 2147483647)
0.0
>>> np.ldexp(2, 2147483646)
0.0
>>> np.ldexp(2, 2147483645)
Warning: overflow encountered in ldexp
inf

On Python 2.6 the above works correctly.

This occurs also on d24db3430a and is therefore independent of #2229.

@numpy-gitbot
Copy link
Author

@pv wrote on 2010-10-19

Ok, got WineDBG working (see http://www.winehq.org/pipermail/wine-devel/2010-July/084788.html for an important hint).

The reason seems to be that python.org 2.5 binary is linked with a C runtime that has a broken implementation of ldexp (oh joy), and this is also what Numpy gets. This is easily tested by inserting printf("\n>>>%g<<<<\n", ldexp(2.0, 2147483647)); in e.g. multiarraymodule.c:initmultiarray.

We cannot fix this, as it's not our bug. The test should just be marked as KNOWNFAIL on Python < 2.5 on Windows. Marked so in 3747ab5 and c6504f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant