[Richard Damon <rich...@damon-family.org>] > IEEE total_order puts NaN as bigger than infinity, and -NaN as less than > -inf. > > One simple way to implement it is to convert the representaton to a 64 > bit signed integer (not its value, but its representation) and if the > sign bit is set, complement the bottom 63 bits (because floats are > signed-magnitude). For pure python code, I don't know how hard it is to > get the representation of a float as a 64 bit integer. In C or Assembly > it is fairly easy as you can easily get around the type system, but I > don't know python well enough to do it.
There's a Python implementation here: https://bugs.python.org/msg336487 _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HGCIHFU3ZLK3YLLK6A7GKFPUIRRITXQV/ Code of Conduct: http://python.org/psf/codeofconduct/