Fixed Point and Floating Point NumbersDate: 05/19/2000 at 00:36:58 From: Paul Huband Subject: Fixed point numbers What are "fixed point" or "fixed decimal" numbers? How do they behave in basic math operations? What are they used for? I have searched many sites, including yours, and can find nothing on fixed point numbers, or fixed point mathematics. Most searches return topics dealing with points fixed in space. I wish to know about numbers with fixed decimal places, as opposed to floating point or floating decimal. Thank you. Date: 05/19/2000 at 10:12:37 From: Doctor Rob Subject: Re: Fixed point numbers Thanks for writing to Ask Dr. Math, Paul. This is not a mathematical idea, but a computer science idea, which is why you didn't find anything about this on our site. There are two ways to store a decimal number in a computer. In one method, the decimal point is assumed to be in a particular place, such as at the left-most or high-order end of the computer word, and the exponent of a power of 10 is adjoined to give you the value in scientific notation. For example, 6.0235 * 10^23 (Avogadro's number) might be stored as +6023500000 +24, with the decimal to the left of the 6, and Pi as +3141592654 +01, with the decimal to the left of the 3. The first part is the "mantissa" of the number, and the second is the "characteristic." This is what is meant by floating point numbers. Fixed point decimal numbers are stored essentially as integers, and it is left up to the programmer to deal with the decimal point. Thus Avogadro's number might be stored as +602350000000, and Pi as +314159256359, with no characteristic stored. Actually the terms "fixed point" and "floating point" are misnomers: with floating point numbers, the decimal location is fixed (in the examples, at the far left), and with fixed point numbers, the decimal location is floating (and in fact unspecified). - Doctor Rob, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/