Aahz Maruch wrote: > > M.-A. Lemburg wrote: > > > > For the BCD stuff Aahz was talking about, I'd suggest to have > > a look at either arrays or cStringIO buffers. > > cStringIO wouldn't work because I want to store ints. I was thinking of storing integers as chr(value) in these. > Arrays might > work, but I think I'll stick with tuples because they're a bit more > familiar to most Pythonistas. I'm not too concerned with raw speed and > efficiency before I convert the code to C; remember Knuth. If you plan to convert this to C, why not have a look at mxNumber first ? It's a wrapper around GMP and provides high performance implementations for many numeric operations, e.g. it should be easy to create a BCD type using the GMP (arbitrary length) longs and an additional C long for the decimal point position. In fact, there's a GMP extension MPFR which tries to do just this. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4