[ANN] FixedPoint with selectable rounding

Doug Fort doug.fort at verizon.net
Wed Oct 9 18:41:30 EDT 2002


On Wed, 09 Oct 2002 23:55:53 +0200, Piet van Oostrum wrote:

>>>>>> "dougfort" <dougfort at dougfort.net> (D) writes:
> 
> D> FixedPoint release 0.1.0
> D> http://fixedpoint.sourceforge.net
> 
> D> This is the second SourceForge release for Tim Peters' FixedPoint math object.
> 
> D> What's New
> D> ==========
> 
> D> The main new feature is settable rounding. 
> 
> D> You can select which rounding algorithm FixedPoint uses by assigning 
> D> a bound function to FixedPoint.RoundingAlgorithm. 
> 
> The problem with such a more or less global assignment is that you can't
> use it in a thread-safe way.

Our assumptions are:
    1) You will assign the rounding algorithm once at start of program
    2) The algorithm will not maintain internal state

Given these assumptions, I believe it is thread-safe.

I'm working on making the rounding algorithm a non-static member, but this
will be no more or less thread-safe that the static member. Ultimately if
you want to maintain internal state, and/or change the algorithm during
processing; you will have to provide your own protection.
	

-- 
Doug Fort, Programmer
http:/www.dougfort.net




More information about the Python-list mailing list