is there trivial way to change floats to fixed points?

"Marco Trevisan (Treviño)" mail at
Thu May 14 19:16:18 CEST 2009

Aapo Rantalainen wrote:
> Is there trivial (=automatic) way to change floating point arithmetic
> to fixed point arithmetic?
> 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?)

I had found, some months ago, C implementation of a float-like type that
was really using integer maths.
It was a very well-written example, but unfortunately I can't find it
anymore :°( Damn!

Btw, I've found some theory [1] and also some code snippets in how
implementing it [2].

I hope it will help.


Treviño's World - Life and Linux

More information about the devel mailing list