<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 11, 2018 at 10:24 AM, Michael Selik <span dir="ltr"><<a href="mailto:mike@selik.org" target="_blank">mike@selik.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Would sind and cosd make Euler's formula work correctly?</blockquote><div><br></div><div>Not trying to pick on you, but this question shows a key misunderstanding:</div><div><br></div><div>There is nothing inherently more accurate in using degrees rather than radians for trigonometry. IT's nice that handy values like "one quarter of a circle" can be exactly represented, but that's really only an asthetic thing.</div><div><br></div><div>And every computer math lib I've even seen uses floating point radians for trig functions, so unless you're really going to implement trig from degrees from scratch, then you are going to go to floating point radians  (and floating point pi) anyway.</div><div><br></div><div>Oh, and radians are the more "natural" units (in fact unitless) for math, and the only way that things like the Euler identity work. Which is why computational math libs use them.</div><div><br></div><div>So there are two orthogonal ideas on the table here:</div><div><br></div><div>1) Have trig functions that take degrees for convenience for when folks are working in degrees already.</div><div><br></div><div>2) Have trig functions that produce exact values (i.e what is "expected") for the special cases.</div><div><br></div><div>It seems the OP is interested in a package that combines both of these -- which is a fine idea as a third party lib.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Perhaps you'd prefer an enhancement to the fractions module that provides real (not float) math?</div>
</blockquote></div><div class="gmail_extra"><br></div>Isn't that exactly what the fractions module does? or are you suggesting that it be extended with trig functions ?<br><br clear="all"><div>-CHB</div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>