On Mon, Jun 11, 2018 at 10:24 AM, Michael Selik <m...@selik.org> wrote:
> Would sind and cosd make Euler's formula work correctly? Not trying to pick on you, but this question shows a key misunderstanding: 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. 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. 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. So there are two orthogonal ideas on the table here: 1) Have trig functions that take degrees for convenience for when folks are working in degrees already. 2) Have trig functions that produce exact values (i.e what is "expected") for the special cases. It seems the OP is interested in a package that combines both of these -- which is a fine idea as a third party lib. Perhaps you'd prefer an enhancement to the fractions module that provides > real (not float) math? > Isn't that exactly what the fractions module does? or are you suggesting that it be extended with trig functions ? -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/