E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.

Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import.
It is well known that Euler's Identity E**(i*pi)+1=0 so I decided to experiment

Last login: Fri Dec 13 18:27:30 on ttys000
AMIGA:amiga~> python3.8
Python 3.8.0rc1 (v3.8.0rc1:34214de6ab, Oct  1 2019, 12:56:49) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> pi=3.14159265359
>>> e=2.71828182846
>>> 
>>> e**(pi*1j)
(-1-1.31038479358762e-12j)
>>> exit()
 AMIGA:amiga~> _

As you can see within the limitations of the floating point accuracy e**(pi*1j)=-1.
We all live and learn and it also works for Python 1.4.0 for the AMIGA.

2 Likes