"Johan Kullstam" a �crit dans le message news: m3r8x6tsa5.fsf@sysengr.res.ray.com... > you can always do fixed point with integers. > > for example, to do dollars to two decimal places, just count pennies > instead of dollars. > > other than a little notational convenience, i've never understood what > the big deal was with fixed point. > Everything looks simple to people who didn't try to implement it... Addition and subtraction are easy, but multiplication and division require some care. If you implement fixed points with integers, you'll end up doing by hand exactly what the compiler does for you, except that the people who wrote the compiler were educated in computer arithmetic, and believe me, there are lots of pitfalls there. (Said by someone who did an implementation of fixed point arithmetic). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr