Mark Dickinson <dicki...@gmail.com> added the comment: Updated patch; applies cleanly to current trunk. No significant changes.
Note that there's now a new reason to apply this patch: it ensures that the result of a long->float conversion is independent of whether we're using 30-bit digits or 15-bit digits for longs. One problem: if long->float conversions are correctly rounded, then int->float conversions should be correctly rounded as well. (And ideally, we should have float(int(n)) == float(long(n)) for any integer n.) This problem only affects 64-bit machines: on 32-bit machines, all integers are exactly representable as floats, and the C99 standard specifies that in that case the conversion should be exact. ---------- Added file: http://bugs.python.org/file13582/long_as_double4.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3166> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com