[Python-ideas] Fwd: Trigonometry in degrees

Michael Selik mike at selik.org
Mon Jun 11 13:33:57 EDT 2018

Whoops, it turns out Euler's formula does work! I expected imprecision, but
at least one test matched.

x = 42
cos(x) + 1j * sin(x) == e ** (1j * x)

I suppose that's because it's radians.

On Mon, Jun 11, 2018, 10:24 AM Michael Selik <mike at selik.org> wrote:

> Would sind and cosd make Euler's formula work correctly?
> sind(x) + i * sind(x) == math.e ** (i * x)
> I suspect that adding these functions is kind of like those cartoons where
> the boat is springing leaks and the character tried to plug them with their
> fingers. Floating point is a leaky abstraction.
> Perhaps you'd prefer an enhancement to the fractions module that provides
> real (not float) math?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180611/eef5176c/attachment-0001.html>

More information about the Python-ideas mailing list