On 2/25/2012 12:56 PM, Tobiah wrote:
It seems to me that there are a great many real numbers that can be represented exactly by floating point numbers. The number 1 is an example.
Binary floats can represent and integer and any fraction with a denominator of 2**n within certain ranges. For decimal floats, substitute 10**n or more exactly, 2**j * 5**k since if J < k,
n / (2**j * 5**k) = (n * 2**(k-j)) / 10**k and similarly if j > k. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list