Mark Dickinson <dicki...@gmail.com> added the comment:

So if I'm understanding correctly, the cause of the issue is that the value 
`1.7**(i+1)` computed in the last iteration (i=999) of the list comprehension 
doesn't exactly match the `-1.7**1000` value, because the former is computed at 
runtime using the libm's pow, while the latter is constant-folded and likely 
uses something more accurate than `pow`.

I think it should be easy to rewrite the test so that it precomputes the powers 
of `1.7`, and then makes sure to use those computed values (i.e., so that we're 
only computing `1.7**1000` once rather than twice, eliminating the possibility 
of getting different results).

----------

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

Reply via email to