Exact integer-valued floats
Paul Rubin
no.email at nospam.invalid
Fri Sep 21 18:23:41 EDT 2012
More information about the Python-list mailing list
Fri Sep 21 18:23:41 EDT 2012
- Previous message (by thread): Exact integer-valued floats
- Next message (by thread): Exact integer-valued floats
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano <steve+comp.lang.python at pearwood.info> writes: > Have I got this right? Is there a way to work out the gap between one > float and the next? Yes, 53-bit mantissa as people have mentioned. That tells you what ints can be exactly represented. But, arithmetic in some situations can have a 1-ulp error. So I wonder if it's possible that if n is large enough, you might have something like n+1==n even if the integers n and n+1 have distinct floating point representations.
- Previous message (by thread): Exact integer-valued floats
- Next message (by thread): Exact integer-valued floats
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list