Post Reply 
[WP-34S] DEG and RAD - diffs
06-06-2014, 05:42 PM
Post: #25
RE: [WP-34S] DEG and RAD - diffs
(06-06-2014 04:24 PM)Claudio L. Wrote:  Now what if you are trying to calculate sin(3e-10)?

Compare it to all the angles in the list until one is smaller than 3e-10.
That will be \(\tan^{-1}(10^{-10})\) which is a little bit smaller than 1e-10.
Thus we can subtract \(3\cdot\tan^{-1}(10^{-10})\). And then we can go on with the remainder ...
As you may notice there will be no cancellation due to adding or subtracting big values.

Quote:However, you can avoid that by starting the loop with 1e-9 radians

In fact this is very similar to what you do.

Quote:But starting the loop with smaller angles means the constants K=Product(cos(Alphai)) changes for each case, hence you need a whole lot of constants to handle this case properly.

EDIT: With the method you described, you don't know how many repetitions so you have to compute the constants every time, alongside your other calculations. This is bad for speed and not how you'd normally implement CORDIC.

You can do without using the constant K. Calculate:
\[\tan(\theta)=\frac{K\cdot\sin(\theta)}{K\cdot\cos(\theta)}\]
From this you can calculate:
\[\sin(\theta)=\frac{\tan(\theta)}{\sqrt{1+\tan(\theta)^2}}\]

How normal do you consider the implementation used in most HP-calculators?

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[WP-34S] DEG and RAD - diffs - pito - 06-05-2014, 12:08 AM
RE: DEG and RAD - diffs - Paul Dale - 06-05-2014, 12:53 AM
RE: DEG and RAD - diffs - pito - 06-05-2014, 06:27 AM
RE: [WP-34S] DEG and RAD - diffs - pito - 06-05-2014, 01:38 PM
RE: [WP-34S] DEG and RAD - diffs - Dieter - 06-05-2014, 11:12 AM
RE: [WP-34S] DEG and RAD - diffs - pito - 06-05-2014, 06:04 PM
RE: [WP-34S] DEG and RAD - diffs - pito - 06-05-2014, 07:57 PM
RE: [WP-34S] DEG and RAD - diffs - pito - 06-05-2014, 10:07 PM
RE: [WP-34S] DEG and RAD - diffs - Dieter - 06-06-2014, 05:27 PM
RE: [WP-34S] DEG and RAD - diffs - Thomas Klemm - 06-06-2014 05:42 PM
RE: [WP-34S] DEG and RAD - diffs - pito - 06-07-2014, 12:57 PM



User(s) browsing this thread: 1 Guest(s)