Subject: Numerical algorithms and code without floating point

From: Oleg Goldshmidt <[email-masked]>
Date: 26 Jun 2001 15:41:35 +0300

Here is a query for gcc/embedded/num-analysis gurus (I posted this
a couple of days ago on sci.math.num-analysis - no replies so far):

I (and a group of others) are facing the following problem. We need to
develop algorithms and software to do real-time data gathering,
processing, and analysis ("real-time" means stringent performance
requirements, context: real time applications in IP networks, such as
Voice over IP). The things we will need to do will include statistics,
time series analysis, ARMA, ARIMA methods, matrix operations (most
likely ill-conditioned matrices will pop up here and there), possibly
neural networks, the list may go on.

The problem is that the hardware platform which is supposed to run all
that does not have floating point instructions. In case anyone here is
in the know, the platform in question is an Intel ARM core (more
precisely StrongARM 1100) without a co-processor on IXP1200 network
processor, running VxWorks 5.4. Basically, the only way to provide
floating-point support in this setting is through software: using
libgcc.a that will implement arithmetic operations via function calls.

The statement that I read, but not yet verified, is that this will work,
though it will be quite slow. I am really concerned about correctness,
loss of precision, etc. I shiver at the thought of having to track
down bugs due to a multiplication gone astray.

An important note, the data gathered will have finite precision, and
I anticipate that they can be represented with integer numbers.

Here is a bunch of questions that I have at this early stage:

1) What are the things we need to worry about besides performance?
   Does anyone have experience developing numerical algorithms and
   code for systems without floating point support? Specifically for
   the platform described? What are the issues involved? Have you come
   across examples that didn't work?

2) Has anyone had experience with libgcc.a? How reliable numerically
   its soft-float support is? Anything about the particular version of
   gcc that comes with the VxWorks development environment:

   ccarm 2.7.9-970819, egcs-971225?

3) How can I test floating-point operations for correctness and
   performance? Can anyone recommend a suitable battery of tests that
   one could try to compile and run on the ARM with gcc and compare to
   a "normal" platform (x86, SPARC), preferably the latter with or
   without -msoft-float.

   I was thinking of finding a numerical library with a comprehensive
   test suite, available in source code. I would try to compile the
   library on several platforms, and run the test suite. Any
   suggestions?

-- 
Oleg Goldshmidt | [email-masked] 
If it ain't broken, it hasn't got enough features yet.