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 / 12898
12897  |  12899
Subject: 
RE: NQC with C++ header file
Newsgroups: 
lugnet.robotics
Date: 
Wed, 25 Oct 2000 15:57:52 GMT
Original-From: 
John Barnes <barnes@sensors./NoSpam/com>
Viewed: 
906 times
  
Absolutely! You'd be amazed at what can be done with 16 bit integer
arithmetic if you operate at some suitable scale factor, depending upon
the requirements - x10, x100, x16, x256. It depends on the ease with
which you can shift and/or divide.

As far as transcendental functions are concerned, I am still waiting for
someone far more skilled, or should I say schooled, than I to implement
sin, cos tan etc using CORDIC in nqc. That would be a truely useful
include file!

JB



Bah! We don't need no stinkin floating point. Here are a few approximations
to real and transcendental numbers that you can make by dividing
signed integers - the error is gennerally less that 1 in 1,000,000

pi         355 /113
sqrt(2)  19601 / 13860
e        28667 / 10546
c        24559 / 8192

By the way, there's a discussion on fixed point mathi in my pbForth chapters
in the new Extreme Mindstorms book. And I think Luis has some info on
floats using legOS

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbForth>

Buy "Extreme Mindstorms: an Advanced Guide to Lego Mindstorms"
<http://www.amazon.com/exec/obidos/ASIN/1893115844/hempeldesigngrou>
--------------------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------------------



Message is in Reply To:
  Re: NQC with C++ header file
 
(...) What specifically do you have in mind? The limitation is going to be from the firmware bytecodes...no floating point, no transcendentals, no math larger than 16 bits. Switching over to legOS would give you floating point, but still no (...) (24 years ago, 25-Oct-00, to lugnet.robotics)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
16 hours ago
Custom Search

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