Why not FP for Money?

Carlos Ribeiro carribeiro at gmail.com
Sat Sep 25 00:21:35 EDT 2004


On Fri, 24 Sep 2004 18:47:46 -0700, Jeff Shannon <jeff at ccvcorp.com> wrote:
> Personally,  I think that it makes the most sense (i.e., will result in
> the fewest surprises) if the greatest possible number of places is
> preserved.  If you truncate decimal places, then you might get this:

Your point is valid, specially for floating point decimal numbers. I
was thinking about the special case of money with 2 decimal places,
but that's far from a general situation as far as rounding is
concerned (despite the fact that money is probably the biggest
application for fixed point decimals). It only shows that we still
have lots of things to try and discuss before proposing something for
our BDFL to consider...


-- 
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