Tim Peters added the comment:

FYI, my results match Serhiy's, on Windows, under Pythons 3.4.2 and 2.7.8.

It's not surprising to me.  Since IEEE 754 standardized sqrt, most vendors 
complied, delivering a square root "as if infinitely precise" with one anally 
correct rounding.  But unless the platform pow() special-cases 0.5, that's 
going to involve a logarithm, multiplication, and exponentiation under the 
covers.  pow() implementations usually fake some "extra precision" (else the 
worst-case errors can be horrendous), but it's still not always the same as 
single-rounding.

Raymond, I didn't understand this part: "It's odd because your two result as 
same number, just displayed differently."  The output immediately following 
that showed they _are_ different numbers on your box too (the .hex() outputs 
differ by one in the last place).

----------

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

Reply via email to