Re: Fixed Point Arithmetic

From: Gene Wirchenko <>
Date: Thu, 29 Mar 2007 09:48:06 -0700
Message-ID: <>

"David Cressey" <> wrote:


>When it comes to the stock market, it depends on the country. AFAIK, the
>NYSE still records stock "points" in units of dollars, with binary
>fractional points like 1/4, 1/32, and the like. The use of decimal FPs
>with this kind of data will introduce round off problems that would have
>been avoided with binary floating point numbers.

     Try again. Since 10 is evenly divisible by 2, you simply need more precision. For example, 1/32 is exactly representable in decimal as .03125.


>Are fixed point numbers a useful from for DBMSes to support?

     Of course, since they often deal with such numbers. Currency amounts are almost certainly the most common example.


Gene Wirchenko

Computerese Irregular Verb Conjugation:

     I have preferences.
     You have biases.
     He/She has prejudices.
Received on Thu Mar 29 2007 - 18:48:06 CEST

Original text of this message