To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1523
1522  |  1524
Subject: 
Re: Fixed-point Math
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 16 Nov 2000 03:42:28 GMT
Viewed: 
1259 times
  
Mike-
If you want to, I'd be happy (later- busy this week) to mirror those on
the sourceforge site. They look quite useful, and I'll be sure to mention
those in the HOWTO (whenever I next have time for that. :|
Luis

On Tue, 14 Nov 2000, Michael J Ash wrote:

Date: Tue, 14 Nov 2000 00:10:56 GMT
From: Michael J Ash <mikeash@csd.uwm.edu>
To: lugnet.robotics.rcx.legos@lugnet.com
Subject: Fixed-point Math

I'm not sure if this will make it to the list, but we'll see. I sent out a
message twice and it still hasn't shown up.

Anyway, I have uploaded my fixed-point math routines to my web site. This
includes simple stuff like multiplication and division, but also a full
set of trigonometry routines. Even if you'd rather use floating-point, you
may find the technique for the trig functions valuable, since they're
pretty fast and reasonably accurate, and wouldn't be difficult to convert
to floating.

The URLs are:

http://www.mikeash.com/lego/fixedpoint.h
http://www.mikeash.com/lego/fixedpoint.c

The code is fairly well-explained in the comments (I hope!). I don't have
any additional write-up besides them, though. If you have any questions,
please feel free to e-mail me.

I haven't done any speed tests, but I don't expect any significant speed
differences. 32-bit integer math isn't native to the RCX CPU, and there's
extra bitshifting work that has to be done as well, so my guess is that it
won't be much faster than floating-point. However, it does seem to take up
much less code space, which I personally find very valuable.

Comments, suggestions, criticisms, and offers of money are all welcome. :)

--
"Say not, 'I have found the truth,' but rather, 'I have found a truth.'
"Say not, 'I have found the path of the soul.' Say rather, 'I have met the
soul walking upon my path.'" -- Khalil Gibran
Mike Ash - <http://www.mikeash.com/>, <mailto:mail@mikeash.com>



-----------------------------------------------------------------------
      "Nobody ever said that democracy was simple or efficient."
            Florida Election Board Member Bob Crawford.
-----------------------------------------------------------------------



Message has 1 Reply:
  Re: Fixed-point Math
 
(...) By all means go ahead. I can write up some explanation as to what they are and how they work, too, once I find time. Also, nobody seems willing/able to write anything about semaphores, so when I write that up I'll see about a little blurb on (...) (24 years ago, 16-Nov-00, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Fixed-point Math
 
I'm not sure if this will make it to the list, but we'll see. I sent out a message twice and it still hasn't shown up. Anyway, I have uploaded my fixed-point math routines to my web site. This includes simple stuff like multiplication and division, (...) (24 years ago, 14-Nov-00, to lugnet.robotics.rcx.legos)

6 Messages in This Thread:


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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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