<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 21, 2017 at 7:32 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Thu, Sep 21, 2017 at 01:09:11PM -0700, David Mertz wrote:<br>
> -1<br>
><br>
> Writing a floating point literal requires A LOT more knowledge than writing<br>
> a hex integer.<br>
><br>
> What is the bit length of floats on your specific Python compile?<br>
<br>
</span>Are there actually any Python implementations or builds which have<br>
floats not equal to 64 bits? If not, perhaps it is time to make 64 bit<br>
floats a language guarantee.<br></blockquote><div><br></div>Jython passes the hexadecimal float tests in Lib/test/test_float.py, since Java uses 64-bit IEEE 754 double representation for the storage type of its double primitive type. (One can further constrain with strictfp, for intermediate representation, not certain how widely used that would be. I have never seen it.) In turn, Jython uses such doubles for its PyFloat implementation.<br><div><br></div><div>I wonder if CPython is the only implementation that could potentially supports other representations, such as found on System/360 (or the successor z/OS architecture). And I vaguely recall VAX VMS had an alternative floating point, but is that still around???</div><div><br></div><div>- Jim</div></div></div></div>