Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] recomendations for a functional language



Curt Sampson writes:
 > On 2009-11-03 04:33 +0900 (Tue), Stephen J. Turnbull wrote:
 > 
 > > Again, CL is a Lisp-2 while Scheme is Lisp-1.
 > 
 > Sorry, I got the two backwards there.

OK, just checking that *I* didn't get them backwards. :)

 > > Did you point out that 90 trillion dollars is a pretty damn big order,
 > > even for the United States federal government?
 > 
 > No, but that wasn't really the issue. The main worry was rounding errors
 > that might make cents appear or disappear.

My point is that shopping cart calculations are add, add, add, add,
then multiply.  The adds are exact until you get to 2^53 ~= 9
quadrillion (pennies), while the multiplies are gonna be close enough
until 2^50 ~= 1 quadrillion pennies, which is still real money, even
to a senior Senator from North Carolina.

As for the disappearing cents, raise all your prices by one cent, then
always truncate in favor of the customer, never round.

This just isn't hard to get right in a business sense.  Is it?  Am I
missing something?


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links