On Dec 1, 10:21 am, Hrvoje Niksic <hnik...@xemacs.org> wrote: > Chris Rebert <c...@rebertia.com> writes: > > C does not have a built-in fixed-point datatype, so the `struct` > > module doesn't handle fixed-point numbers directly. > > The built-in decimal module supports fixed-point arithmetic, but the > struct module doesn't know about it. A bug report (or patch) by someone > who works with binary representations of fixed-point would be a good > start to improve it.
Not really: the decimal module is for floating-point, not fixed- point, though its semantics for significant trailing zeros can help give the appearance of fixed-point arithmetic for simple operations (addition, subtraction) that stay within suitable bounds. And decimal fixed-point isn't so much use for a binary fixed-point format, anyway. -- Mark -- http://mail.python.org/mailman/listinfo/python-list