Why not FP for Money?

Carlos Ribeiro carribeiro at gmail.com
Fri Sep 24 20:59:32 EDT 2004


On 25 Sep 2004 00:35:55 GMT, Bengt Richter <bokr at oz.net> wrote:
> [ regarding context ]
> [1] Sorry I haven't read the specs, I just haven't goten to it ;-/

That's it -- there's a context object. And that's what should be used
for fixed point too. I also liked your 10d3 example -- it's a nice
extension to the basic syntax.

A last note: unless dictated by context otherwise, I think that adding
two fixed point numbers should round/truncate to the smallest number
of decimal places, as in:

12.34d + 10.001d --> 32.34

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: carribeiro at gmail.com
mail: carribeiro at yahoo.com



More information about the Python-list mailing list