This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients eric.smith, jcea, mark.dickinson, python-dev, samuel.iseli, skrah
Date 2012-03-13.11:47:31
SpamBayes Score 1.0122991e-10
Marked as misclassified No
Message-id <1331639252.57.0.280781355485.issue13889@psf.upfronthosting.co.za>
In-reply-to
Content
I've looked at the latest patch: It seems that new_387controlword is
not set if old_387controlword already has the desired precision and
rounding mode.

Attached is a revised patch that uses the same logic as the Linux
version. A couple of remarks:

  - It would be possible to negate (_PC_53|_RC_NEAR) instead of
    enumerating (_MCW_DN|_MCW_EM|_MCW_IC). I found it nice to
    see all possibilities listed.

  - Technically we might need to use #pragma fenv_access (on). I'm not sure
    where though: If it is set in pyport.h, VS complains that Py_MATH_PI / 180.0
    is not constant.


The patch is tested on win32/x64. Additionally, the patch is tested
with setting the rounding mode to _PC_64 in main.c. Then, the
patch is tested with replacing the 'if' bodies by 'abort()'. This
shows that in the regular build (_PC_53 on startup) the bodies of
the if statements are never executed.

Finally, inserting an #error after #if defined(_MSC_VER) && !defined(_WIN64)
on the x64 build shows that !defined(_WIN64) really does its job.
History
Date User Action Args
2012-03-13 11:47:32skrahsetrecipients: + skrah, jcea, mark.dickinson, eric.smith, python-dev, samuel.iseli
2012-03-13 11:47:32skrahsetmessageid: <1331639252.57.0.280781355485.issue13889@psf.upfronthosting.co.za>
2012-03-13 11:47:31skrahlinkissue13889 messages
2012-03-13 11:47:31skrahcreate