Hi!

I committed yesterday changes to src/mantissa.h and src/mantissa.c. The
main points are:
- the ME_TO_DOUBLE() macro was promoted to a real function
  This saves code on - roughly - a dozen places. where it was used.
- And I rewrote/reformulated the calculations to minimize floating point
  operations at run-time (and some of the remaining are compile-time
  stuff).
  More detailed descriptions are in src/mantissa.c.
Validation test was to let it run in parallel for half an hour
(connected to the FunkFeuer net in Vienna) and compare the result of
every operation.
The (obvious) purpose is: save CPU power (where it is easy to implement
and verify).

What I also noticed (and tried): The floating point operations as such
(in src/mantissa.c) also work with the identical results on i386 if one
uses "float" instead of "double" everywhere (within the functions). So
I'm in favor of doing that if it buys something.

Since I'm not a guru on the LinkSys hardware and toolchain, I have some
questions:
- Does s/double/float/ (for the calculations in the first step) actually
  save CPU speed (or something else) there?
- Does the MIPS CPU there use IEEE-754 format for the binary
  representation (like Intel and others) or - if not - which other?
  E.g. how many bytes need a float and a double in the RAM and how many
  bits for the mantissa and the exponent/bias?
- Do we use "-msoft-float" or "-mhard-float" (and if none of them
  explicitly), which is the - obviously used - default)? 

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services



