Re: C++ Compiling Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 24, 2005 at 12:40:06PM -0700, wj wrote:
> > Fixed point is a "lossless" way to represent decimal fractions. Standard
> > floating-point uses binary internally, and so "0.01" can't actually be
> >  represented properly (just as 1/3 can't be represented completely in
> > decimal -- 0.33333...). Fixed point is generally implemented by using
> > integers and keeping track of where a decimal point ought to be. (Addition
> > is straightforward, multiplication/division gets an extra step.)
> Fixed point is _not_ lossless. It is exactly what the name is implies, a
> floating point format where the decimal point is in a fixed location. I
> am very that there will be some "loss" when representing the number 1/3.
> You either have to store it as a fraction or there is loss ;-)

Hence the quote marks -- I didn't mean that there wasn't any rounding. :)



-- 
Matthew Miller           mattdm@xxxxxxxxxx        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 73 degrees Fahrenheit.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux