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 / 7076
7075  |  7077
Subject: 
Re: evaluate inverse cosine, sine in IC
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 16 Nov 1999 00:15:18 GMT
Original-From: 
Will <nepenthe@montana.SAYNOTOSPAMcom>
Viewed: 
593 times
  
bedirhan wrote:

Hi, is there a way to evaluate inverse cosine and sine using IC? Thx

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 quite rapidly, and only half a dozen or so terms are needed.  For example, if the sixth term in the series is on the order of 1.0E-6, then you're getting close to the limit of single-precision arithmetic anyway (and certainly close enough for horse shoes, hand grenades, and tactical nuclear weapons).

-- Will

+---------------------------------------------------------+
|                       ^^     <^ ^>                      |
|                     /  òó    ó°° \                      |
|                     /  =Y=    U   \                     |
|       Wendy, Will, Tatoosh & Tenzing                    |
+---------------------------------------------------------+

When people are free to do as they please, they usually
imitate each other                       -- Eric Hoffer



Message has 2 Replies:
  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)

Message is in Reply To:
  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)

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