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 Kiriakos.Vlahos
Recipients Kiriakos.Vlahos, brian.curtin, eric.smith, loewis, mark.dickinson, pitrou, sjmachin, skrah, tim.peters
Date 2010-09-30.14:56:23
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <1285858597.59.0.496258395483.issue9980@psf.upfronthosting.co.za>
In-reply-to
Content
>>How about doing the check in Py_Initialize() instead? Then it will >>work for embedders too.
It is not good practice for DLLs to change the FPU control word when loaded, because the host application may have set it to a specific value for a good reason.  Delphi provides a SafeLoadLibrary function that saves the the control word and restores it after loading the DLL.

If _Py_dg_dtoa can be made to work correctly independently of the value of the FPU control word that should be much better.  If this means setting and restoring the control word, then this sounds like a good way forward.

By the way the reason Delphi sets the precision to 64bits is that by design all floating calculations are done in 64 bit presision and then truncated back if needed.  A native 10 byte floating type called Extended is also provided.
History
Date User Action Args
2010-09-30 14:56:37Kiriakos.Vlahossetrecipients: + Kiriakos.Vlahos, tim.peters, loewis, sjmachin, mark.dickinson, pitrou, eric.smith, brian.curtin, skrah
2010-09-30 14:56:37Kiriakos.Vlahossetmessageid: <1285858597.59.0.496258395483.issue9980@psf.upfronthosting.co.za>
2010-09-30 14:56:29Kiriakos.Vlahoslinkissue9980 messages
2010-09-30 14:56:23Kiriakos.Vlahoscreate