is there trivial way to change floats to fixed points?

Evgeniy Ginzburg nad.oby at
Tue May 12 16:46:19 CEST 2009

On Tue, May 12, 2009 at 5:27 PM, Visti Andresen <talpa at> wrote:
> On Tue, 12 May 2009 13:28:06 +0300
> Aapo Rantalainen <aapo.rantalainen at> wrote:
>> Is there trivial (=automatic) way to change floating point arithmetic
>> to fixed point arithmetic?
> Not that I'm aware of...
> Floating and fixed point numbers have different limitations and
> therefor not all software would work with fixed point.
> But it "should be possible" (not trivial) to extend gcc to allow
> faking floats using fixed point?
>> I have some compilable and runnable code, but it is too slow on
>> Freerunner and I think it is because of used floats. It runs on Nokia
>> Internet Tablet very well and I think it has almost same specks than
>> Freerunner expect it has FPU.
>> So is there some other way than reading and learning whole source code
>> and make changes? (Maybe some compile options to use fixed points
>> instead of floats?)
AFAIR one of developers (GSoC) used double precision fixed point
arithmetic for voice recognition
code might be public so it will be nice hint for you.
Here it is
So long, and thanks for all the fish.

More information about the devel mailing list