Fixedpoint arithmetic
From Academic Kids

See also fixed point (mathematics).
In computing, a fixedpoint number representation is a real data type for a number that has a fixed number of digits after the decimal (or binary or hexadecimal) point. For example, a fixedpoint number with 4 digits after the decimal point could be used to store numbers such as 1.3467, 281243.3234 and 0.1000, but would round 1.0301789 to 1.0302 and 0.0000654 to 0.0001.
Fixedpoint can exactly represent decimal fractions while still employing the base 2 arithmetic that is efficient in most of today's computers. Most floating point representations in computers use base 2 values, which cannot exactly represent most fractions that are easily represented in base 10. For example, onetenth (.1) and onehundredth (.01) can be represented only approximately by base2 floating point representations, while they can be represented exactly in fixedpoint representations — one simply stores the data values multiplied by the appropriate power of 10.
As long as the numeric value uses only the number of digits specified after the decimal point, fixedpoint values can exactly represent all values up to its maximum value (determined by the number of bits in its representation). This is in contrast to floatingpoint representations, which include an automaticallymanaged exponent but cannot represent as many digits accurately (given the same number of bits in its representation).
A common use for fixedpoint numbers is for storing monetary values, where the inexact values of floatingpoint numbers are often a liability. Fixedpoint representations are also sometimes used if either the executing processor does not have any floating point unit (FPU) or if fixedpoint provides an improved performance necessary for an application. Historically, fixedpoint representations were the norm for decimal data types (for example, in PL/I or COBOL). The Ada programming language includes builtin support for both fixedpoint and floatingpoint.
Very few computer languages include builtin support for fixed point values, because for most applications, floatingpoint representations are fast enough and accurate enough. Floatingpoint representations are more flexible than fixedpoint representations, because they can handle a wider dynamic range. Floatingpoint representations are also slightly easier to use, because they do not require programmers to specify the number of digits after the decimal point.
However, if they are needed, fixedpoint numbers can be implemented even in programming languages like C and C++ that do not include such support builtin.
Here are some examples of fixedpoint representations still in common use:
 GnuCash is an application for tracking money. It is written in C and switched from a floatingpoint representation of money to a fixedpoint implementation as of version 1.6. This change was made to avoid the potential rounding errors of floatingpoint representations.
 Tremor and Toast are software libraries that decode the Ogg Vorbis and GSM Full Rate audio formats respectively. These codecs use fixedpoint arithmetic because many audio decoding hardware devices do not have an FPU (to save money) and audio decoding requires enough performance that a software implementation of floatingpoint on lowspeed devices would not produce output in real time.
 All 3D graphics engines on Sony's original PlayStation and Nintendo's Game Boy Advance and Nintendo DS video game systems use fixedpoint arithmetic for the same reason as Tremor and Toast: to gain throughput on an architecture without an FPU.
External links
 What's New in GNUCash (version 1.6) (http://www.gnucash.org/docs/v1.6/C/t7204.html)
 Ogg Vorbis web site (http://www.xiph.org/ogg/vorbis)es:Coma fija