To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 5173
5172  |  5174
Subject: 
Floating point support for 1142 bytes
Newsgroups: 
lugnet.robotics, lugnet.robotics.rcx
Date: 
Thu, 27 May 1999 23:09:15 GMT
Viewed: 
942 times
  
Following some discussion about the topic a few weeks ago, I was
sufficiently curious and motivated enough to write a floating point library
for the H8/RCX.  Initially I thought I'd implement a non-IEEE floating
point format optimized for the RCX, but eventually I decided that having
the C compiler (GCC) integrate seemlessly with the library was much more
important than compactness, so I ended up choosing to use the IEEE format.
I also started out thinking I would throw out features like denorms and
NaNs, but then realized that they weren't that costly to implement, that
floating point didn't make as much sense without them, and that testing
would be easier the closer I stayed to the standard, so I ended up
implementing denorms and NaNs according to IEEE.  I did end up leaving out
a few things however, namely traps, signalling NaNs, status flags, rounding
modes besides round to even, and (in this version at least) functions not
directly invoked by the compiler: sin, cos, sqrt, etc.  The result is a
floating point library that implements all of the underlying floating point
you'd expect to have on mostly any other machine.

The cost of linking the entire library is 1142 bytes, which is
substantially less than the 6K or so reportedly needed by the floating
point support that comes with the compiler.  In addition, the library comes
in pieces so that by default the linker only includes the parts of it you
truly need.

The new floating point library has been thrown into a new Librcx
distribution, which includes not only the new floating point routines, but
also a fixed version of malloc, a slightly updated rom.h, and a new long
integer compare function used by the compiler when invoking certain
floating point functions.

The latest version of Librcx can be found at:

http://graphics.stanford.edu/~kekoa/rcx/tools.html#Librcx

-Kekoa



Message has 1 Reply:
  RE: Floating point support for 1142 bytes
 
(...) Let's face it Kekoa, you just couldn't stand not REALLY knowing what the group was talking about so you went and did the work we should have done before the discussion even started. :-) (...) (URL) That's a bit easier to deal with. Way to go. (...) (25 years ago, 28-May-99, to lugnet.robotics, lugnet.robotics.rcx)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR