<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Lowell Tackett wrote:
<blockquote cite="mid:909331.97678.qm@web110112.mail.gq1.yahoo.com"
 type="cite">
  <pre wrap="">&gt;From the virtual desk of Lowell Tackett  



--- On Wed, 4/21/10, Dave Angel <a class="moz-txt-link-rfc2396E" href="mailto:davea@ieee.org">&lt;davea@ieee.org&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">From: Dave Angel <a class="moz-txt-link-rfc2396E" href="mailto:davea@ieee.org">&lt;davea@ieee.org&gt;</a>
Subject: Re: [Tutor] the binary math "wall"
To: "Lowell Tackett" <a class="moz-txt-link-rfc2396E" href="mailto:lowelltackett@yahoo.com">&lt;lowelltackett@yahoo.com&gt;</a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:tutor@python.org">tutor@python.org</a>, "Steven D'Aprano" <a class="moz-txt-link-rfc2396E" href="mailto:steve@pearwood.info">&lt;steve@pearwood.info&gt;</a>
Date: Wednesday, April 21, 2010, 12:31 PM
Lowell Tackett wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">From the virtual desk of Lowell Tackett  


      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->*Whole buncha stuff snipped*
  </pre>
  <blockquote type="cite">
    <pre wrap="">Anyway, in your case binary floating point is
irrelevant.  You've got to do your own error analysis
of every step in the calculation to understand how much you
can trust the result.  And it's unlikely the "errors"
in the math package will be the limiting factor.

DaveA


    </pre>
  </blockquote>
  <pre wrap=""><!---->
The sense of all this is beginning to emerge (perhaps).  Emile has just made a good point, simply convert all to whole values (using a subset algorithm that keeps track of the number of decimal "slips" that have accumulated-for later reconversion), crunch merrily away, and get good results.

Maybe that's valid, maybe not.  But I do know that this much is happening; I'm now beginning to quantify very novel and wide ranging ideas way outside "the box" I'd originally approached the challenge with.  That's the bigger value of this entire exercise, I think.  Naively thinking that the computer was benign and forgiving, I'd first opted for the most transparent and 'at hand' solutions...there was much to be learned.

I know a coupla things now...I'm gonna solve this dilemma, and largely with the help of all who've weighed in.   The solution may ultimately not be close to what has been suggested, but isn't that the fun of it all?

Secondly, there has accumulated [here] quite an array of novel (to me) thinking that I'm going to return to more and more as I tackle other, different projects, for the pedagogical value that will linger.
  </pre>
</blockquote>
<br>
Check python help docs for module decimal, there you have an example on
how to code a sin() and cos() functions with arbitrary precision
(depends on your context precision) using decimal values. Might be what
you are looking for (of course you would have to express your angles in
radians throughout all of your calculations and if needed convert at
the end.<br>
<br>
HTH<br>
<br>
</body>
</html>