Thread: math.h library
View Single Post
  #10   Spotlight this post!  
Unread 19-12-2003, 14:33
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: math.h library

Quote:
Originally Posted by mightywombat
whoa.. that CORDIC is rather confusing stuff. I'm going to play with it and see if i can figure it out a little more.
Yeah, you gotta be a math geek to like the CORDIC .


Quote:
Originally Posted by mightywombat
so you are saying that I should stay away from dividing two numbers? (the question sounds dumb but i'm very surprised that it would be so tough) I remember reading that it can handle addition VERY well but doesn't do much else as quick. thanks for the quick reply.
Well, I shouldn't have made such a generalization. Integer division by powers of two is very fast (if the compiler is designed for such an optimization) because you only need to do a binary right shift to divide a number by two (multiplication works by shifting left). Division of two eighty-bit IEEE floating-point numbers on an eight-bit microcontroller is very painful.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org