Page 1 of 1
How do you implement fixed point data type

Posted:
Jan 20, 2003 @ 9:52am
by rangers99
Hi guys
I am porting graphics code that runs on a PC over to an IPAQ. I understand there is no floating point coprocessor on the IPAQ. Therefore I need to convert my floating point stuff to fixed point stuff otherwise the performance will be poor.
Can anyone give some pointers (example code or even links) as to how this is done? Ive tried searching this forum but have had no joy yet. cheers

Posted:
Jan 20, 2003 @ 10:23am
by MirekCz
there is something in forum
you can check easyce functions for some functions that use it
use google to search
there's also an article on arm site about it.
www.arm.com , somewhere on forum there's also a direct link to it

Posted:
Jan 20, 2003 @ 7:24pm
by Digby
Here's a link to the whitepaper from ARM's website:
You might also want to investigate Intel's Graphics Performance Primitives for XScale. They have implemented fixed point math in optimized ARM assembly language:

Posted:
Jan 21, 2003 @ 7:21am
by rangers99
many thanks for the very helpful replies guys.

Posted:
Jan 21, 2003 @ 7:26am
by rangers99
A related question.
How come when I port my code over from a PC to a PocketPC the fractional parts of floats are not recognised? ie. A float of 3.3 on my PC becomes a float of 3.0 on the PocketPC.
I was under the impression that the code should work OK on the PocketPC but would just be very slow since there is no floating point hardware.
I have a really big bit of code that uses floats and the fractional parts are very important. Is using fixed point notation the only answer? Or is there some project setting Im not aware of?

Posted:
Jan 21, 2003 @ 9:29am
by refractor
Floats should work fine - there's no CPU but the system emulates the FPU calls.
Post some code that shows the floats are broken..?

Posted:
Jan 22, 2003 @ 11:13am
by rangers99
you're correct. bugs in my code