Mark Dickinson <[EMAIL PROTECTED]> added the comment: [Alexander] > I also wonder whether round to nearest float can be implemented without > floating point arithmetics. I would think round towards zero should be > a simple matter of extracting an appropriate number of bits from the > long and round to nearest would at most require a long addition.
The idea's attractive. The problem is finding an integer type that's guaranteed to have enough bits to store the mantissa for the float (probably plus one or two bits more for comfort); for IEEE 754 this means a 64-bit integer type, and there aren't any of those in C89. (One could use two 32-bit integer variables, but that's going to get messy.) _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3166> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com