From: Don Taylor
Subject: Re: Arctangent computation.
References: <firstname.lastname@example.org> <3DD63A28.74E85A84@scazon.com> <email@example.com>
User-Agent: tin/1.5.9-20010723 ("Chord of Souls") (UNIX) (FreeBSD/4.7-PRERELEASE (i386))
Date: 17 Nov 2002 01:14:46 -0600
X-Comments: This message was posted through Newsfeeds.com
X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Organization: Newsfeeds.com http://www.newsfeeds.com 80,000+ UNCENSORED Newsgroups.
> Thank you all for the feedback, I am leaning towards an ADC/8051
> solution, may be a polynomial approx./look-up table.
> Does anybody have any code that I could use?
If being really really accurate isn't a big concern then
a simple approximation for arctan(x), for positive x, is
That goes through (0,0), matches the slope at (0,0), matches
at x=1 and matches at x=infinity.
It would be nice if it was a little closer match for values of
x modestly bigger than 1. And it would be nice if it could be
adjusted to work for all x, not just positive x.
There are also fairly simple rules for how to use the sign of
y with atan() to recover the original angle. This is the
sort of thing that is done with implementations of atan(y,x)
that take your sin and cos values separately to find the original
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----