[issue9980] str(float) failure

Kiriakos Vlahos report at bugs.python.org
Thu Sep 30 01:26:41 CEST 2010

Kiriakos Vlahos <pyscripter at gmail.com> added the comment:

I found out that $x2xx (test both $12xx and $02xx) gives identical results to python.  Here is what it means.

The PC field (bits 9 and 8) or Precision Control determines to what precision the FPU rounds results after each arithmetic instruction in one of three ways:

00 = 24 bits (REAL4)
01 = Not used
10 = 53 bits (REAL8) <- This is required by _Py_dg_dtoa
11 = 64 bits (REAL10) (this is the initialized state) 

So contrary to my expectation it is not the rounding control bits but the Precision control bits that matter.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list