To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7075
  evaluate inverse cosine, sine in IC
 
Hi, is there a way to evaluate inverse cosine and sine using IC? Thx (25 years ago, 15-Nov-99, to lugnet.robotics.handyboard)
 
  Re: evaluate inverse cosine, sine in IC
 
(...) The most efficient way to do it is to use Taylor Series approximations of the functions. Decide how much precision you need, and then write functions that evaluate the first few terms in the appropriate series. Usually, a series will converge (...) (25 years ago, 16-Nov-99, to lugnet.robotics.handyboard)
 
  Re: evaluate inverse cosine, sine in IC
 
(...) to get a better approximation use: arcsin(x) = pi/2 - sqrt(1 - x)(a0 + a1*x + a2*x^2 + a3*x^3), where a0 = 1.5707288 a1 = -0.2121144 a2 = 0.0742610 a3 = -0.0187293 (25 years ago, 17-Nov-99, to lugnet.robotics.handyboard)
 
  Re: evaluate inverse cosine, sine in IC
 
I've been trying to do this as well. The problem I have found is that the Taylor series expansion needs to be developed near the solution to get accurate results. Some may wonder why finding the arcsine of a number might be of interest. If one has a (...) (25 years ago, 29-Nov-99, to lugnet.robotics.handyboard)
 
  Re: evaluate inverse cosine, sine in IC
 
Taylor series should converge quite rapidly. After 2 or 3 terms, the error is usually neglectable (depending or your demands, of course: this should be fine for up to a few decimals) For those not familiar with the Taylor expansion, I've added a (...) (25 years ago, 29-Nov-99, to lugnet.robotics.handyboard)
 
  Re: evaluate inverse cosine, sine in IC
 
Another technique for finding trig functions and their inverses used by both HP and TI in their calculators is the CORDIC algrorithm. A description of the technique with lots of references can be found at: (...) (25 years ago, 29-Nov-99, to lugnet.robotics.handyboard)

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