Re: [stella] acceleration and inertia

Subject: Re: [stella] acceleration and inertia
From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx>
Date: Sat, 10 Jan 2004 00:00:11 -0800 (PST)
On Fri, 9 Jan 2004, A Braunsdorf wrote:
> Actually, a lot of folks use fixed point math for money, and they
> do it in BCD, so it is a decimal point.

Dunno about bcd, but yes, whenever I work with money it MUST be in
a fixed point representation;  IEEE 754 floating points cannot
represent 10 cents exactly.  It is .00011001100110011001100110011...
until you run out of mantissa.  Obvious roundoff errors result.
What surprises me more is the number of CS grads who don't know this
as second nature.

(doubters can pull out a pencil and paper, remember their long
division, and divide 1 by 1010 (all in base 2 of course))

-- 
adam@xxxxxxxxxxxxxxxx        http://cuddlepuddle.org/~adam/pgp.html
Will code for food.          http://cuddlepuddle.org/~adam/resume.html
"The dinosaurs are not around today because they did not have a space program."
  -- Arthur C. Clarke

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread