On Fri, Jun 30, 2006, Nick Maclaren wrote: > > I Have been thinking about software floating point, and there are > some aspects of Python and decimal that puzzle me. Basically, they > are things that are wanted for this sort of thing and seem to be > done in very contorted ways, so I may have missed something. > > Firstly, can Python C code assume no COMPACTING garbage collector, > or should it allow for things shifting under its feet? > > Secondly, is there any documentation on the constraints and necessary > ritual when allocating chunks of raw data and/or types of variable > size? Decimal avoids the latter. Without answering your specific questions, keep in mind that Python and Python-C code are very different things. The current Decimal implementation was designed to be *readable* and efficient *Python* code. For a look at what the Python-C implementation of Decimal might look closer to, take a look at the Python long implementation. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "I saw `cout' being shifted "Hello world" times to the left and stopped right there." --Steve Gonedes
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