[Python-ideas] Way to check for floating point "closeness"?
ethan at stoneleaf.us
Thu Jan 15 01:38:04 CET 2015
On 01/14/2015 04:18 PM, Steven D'Aprano wrote:
> On Wed, Jan 14, 2015 at 02:44:27AM -0800, Andrew Barnert wrote:
>> I think your confusion here is entirely my fault. For simplicity, it's
>> often helpful to look at tiny float representations--e.g., a 4-bit
>> float with 1 sign bit, 1 mantissa bit, and 2 exponent bits (that, if
>> both 1, mean inf/nan),
> Since this is python-ideas, how about a minifloat type?
> I think a 4-bit float is a bit *too* mini, 8-bit sounds about right.
> (I know, I know, it should be a third-party library, not a built-in :-)
Speaking of which:
I know it's /called/ bigfloat, but it /looks/ like you can specify however many/few bits you want. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the Python-ideas