Page 1 of 1

Floating point?

PostPosted: Apr 23, 2001 @ 12:28am
by simonwc
Can somebody be nice enough to explain what does floating point means in pocket pc and what this function does-_- (I only know it is deal with video stuff....and that's is)....<br><br>Thanx<br>

Re: Floating point?

PostPosted: Apr 23, 2001 @ 1:05am
by Paul
floating point is a type of number like an integer, that can contain a fraction:<br><br>2.5, 1/2, -37.2 etc<br><br>its a 'floating' point because the number of decimal places isnt fixed<br><br>i think the problem is that pocket pc's cant do floating point math (you need a coprocessor i think)<br>Last modification: Paul - 04/22/01 at 22:05:17

Re: Floating point?

PostPosted: Apr 23, 2001 @ 2:56am
by Moose or Chuck
Floating points are "as opposed to" integers. Integers are any whole number, such as 1, 27, 93, 65536. A floating point number can be anythign with a decimal point, such as 1.00032, 27.9, 93.786, 65536.738231089735017690146139481637<br>As you can see calculating a floating point number, a number without a predetermined amount of digits, can take a whole lot longer than integer calculation. Computers first possessed floating point co-processors in the days of the Pentium processor. That's why it was such a leap. PocketPCs don't have these co-processors and must do the calculations slowly in software mode. Floating points are extremely easy to work with in a 3D Program because of their exacting precision and accuracy. An integer can not come close to the precision of a floating point. However, a seperate type of numbering system, inbetween the two, is being used by Dan East to optimised the Quake code for greater speed on a PocketPC. This type is called Fixed Point, where a number can not go past... say, 3 digits past the decimal. You could have a number like 65.536, 0.345, or 7.452. These are still precise, but maintain the fixed amount of digits that is so attractive about integer whole numbers.Last modification: Moose Master - 04/22/01 at 23:56:48

Re: Floating point?

PostPosted: Apr 23, 2001 @ 4:05am
by simonwc
Isn't that answer how come some games' graphic is worse than others since the worse one use the fixed point instead of the floating point calculation?<br>

Re: Floating point?

PostPosted: Apr 23, 2001 @ 4:55am
by Moose or Chuck
No. Fixed Point is relatively accurate, especially in a game like Quake. But it is only faster because a PocketPC cannot process float numbers. Real computers, like the kind that use Pentiums and Athlons, can process floating points at many times faster than any other type. Graphics depend on many things, and all games now-a-days use floating point numbers. It would be unheard of to use anything but, because there's no reason not to on full fledge computers or laptops.

Re: Floating point?

PostPosted: Apr 23, 2001 @ 6:16am
by Dan East
Floating point (or fixed point) math is only used in 3D routines to store the coordinates of the various models / objects. It has nothing to do with the color depth of the display, or the resolution of the output, etc.<br><br>Dan East

Re: Floating point?

PostPosted: Apr 23, 2001 @ 7:22am
by SonicSilicon
(Funny I don't remember ever being able to buy a math co-processor for my 486.)<br><br>I was just thinking, MPEG and many other types of video compression fall under the Discrete Cosine class. Since cosines are typically floating point, does that mean all of these decompressors on the PocketPC are emulating floating point operations? If so, wouldn't a compression scheme based on integers work faster? Are the MPEG-based playback programs using fixed point as well?

Re: Floating point?

PostPosted: Apr 23, 2001 @ 7:49am
by Dan East
I'm not familiar with video compression, but the use of trigonometry does not mean that integer math cannot be used. Most applications (where speed is important) generate a sine table at startup at the resolution and range needed for its particular algorithms (or it is precalculated and built directly into the app). In fact, these highly efficient lookup tables cannot be used with floating point math (because arrays require an integer (not the literal int type) index).<br><br>Dan East