Kiriakos Vlahos <pyscrip...@gmail.com> added the comment:

>>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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9980>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to