[Python-ideas] Way to check for floating point "closeness"?

Neil Girdhar mistersheik at gmail.com
Thu Jan 15 01:54:15 CET 2015


There's already float16, float32, float64, and float128 in numpy.  That 
would be the best place to add float8 if you want it.

Best,
Neil

On Wednesday, January 14, 2015 at 7:19:01 PM UTC-5, 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 :-) 
>
>
> -- 
> Steven 
> _______________________________________________ 
> Python-ideas mailing list 
> Python... at python.org <javascript:> 
> https://mail.python.org/mailman/listinfo/python-ideas 
> Code of Conduct: http://python.org/psf/codeofconduct/ 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150114/6235e90c/attachment.html>


More information about the Python-ideas mailing list