A few years back I wrote a fixed point library in C++, with a
fixed-point class & operator overrides (+, *, etc.). You could use them
just like regular floats allowing you to switch from floating point to
fixed point by just changing the "float"s to "fxpoint"s.
Pretty simple to do, but could make it a lot easier to convert some
floating point code into fixed point code. If you inline the operator
overrides it's almost as quick as writing fixed point directly.
I don't think I've got the code anymore, but would only take a day or so
for someone to re-write it. Or in fact, someone else has done one:
http://wiki.yak.net/675 (although I think you can get marginally better
performance with some in-line assembly for the division, as of GCC 2.95
There are also lots of very good fixed point math libraries with FFTs
and other bits.
[mailto:gumstix-users-bounces@...] On Behalf Of
Alexandre Pereira Nunes
Sent: 30 October 2006 19:46
To: General mailing list for gumstix users.
Subject: [Gumstix-users] Tips for Fixed Point Arithmetic
Now and then people seems to face the need of faster floating-point=20
computing on integer hardware, such as pxa.
There are of course more elaborated (and complex) solutions, but I wish=20
to point to ARM's application note 33, document name DAI0033A, that=20
gives hints about fixed point arithmetic and how it compares to floating
I found it to be a nice introductory reading, since it also comes with=20
code examples, both as C macros and assembler code (arm & thumb).
I'm not sure if this application note is easily found on the ARM's web=20
site or the internet as a whole; I got it from ARM on the technical=20
publications cdrom, which can be ordered from the site for free. There=20
are also other application notes I suspect are worth reading but I=20
couldn't find the time (I'll get there eventually).
Using Tomcat but need to do more? Need to support web services,
Get stuff done quickly with pre-integrated technology to make your job
Download IBM WebSphere Application Server v.1.0.1 based on Apache
gumstix-users mailing list