-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ldexp broken (Trac #866) #1464
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
Comments
@cournape wrote on 2008-09-01 Which platform are you using ? (64 vs 32). It works for me on ubuntu 32 bits with gcc 4.2 |
@huard wrote on 2008-09-02 Replying to [comment:1 cdavid]:
64 bits and gcc 4.3.0 |
@huard wrote on 2008-09-04 The umathmodule defines
But since the default int on 64 bits platform is a long, we would need to define as well
Now since ldexp returns x1 * 2 ** x2, an a 32 bit integer spans [-231 + 1, 231 -1], I doubt long x2 are really useful. I suggest long x2 are simply cast to int x2. Don't really know where this should be done though. |
@huard wrote on 2008-09-04 In umathmodule.c.src, if I change !PyArray_INT by !PyArray_Long as in the following, ldexp works. This might not be THE solution, but this is as far as I can go for now. Here is a patch for someone familiar with ufuncs to review and test on a 32 bit platform.
|
@charris wrote on 2010-05-25 I think we should make this fix. |
@huard wrote on 2010-05-25 Commited in r8438. Please test on 32 bits. |
@charris wrote on 2010-05-25 This passes on the 32 bit buildbots after r8438, so close the ticket. |
@charris wrote on 2010-05-25 However, I think your test should cover all three floating types. |
@huard wrote on 2010-05-25 Added tests for float96 in r8439. I don't have permissions to close tickets. |
Original ticket http://projects.scipy.org/numpy/ticket/866 on 2008-07-29 by @huard, assigned to @cournape.
On Fedora 9, gcc 4.3.0, NumPy 1.2.0.dev5566
The text was updated successfully, but these errors were encountered: