The invention called the complex plane lets us dial in any place on the unit circle, by raising $e$ to a power.
Setting $\theta$ equal to $\pi$ in the equation below, leaves us half way around the circle, at (x, y) = (-1, 0).
$$ e^{ \pm i\theta } = \cos \theta \pm i\sin \theta $$$$ e^{ i\pi} = -1 $$from cmath import *
e
2.718281828459045
import cmath
print(dir(cmath))
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'cos', 'cosh', 'e', 'exp', 'inf', 'infj', 'isclose', 'isfinite', 'isinf', 'isnan', 'log', 'log10', 'nan', 'nanj', 'phase', 'pi', 'polar', 'rect', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau']
help(log)
Help on built-in function log in module cmath: log(x, y_obj=None, /) The logarithm of z to the given base. If the base not specified, returns the natural logarithm (base e) of z.
log(0+1j)
1.5707963267948966j
log(-1)
3.141592653589793j
polar(-1+0j)
(1.0, 3.141592653589793)
polar(-1j)
(1.0, -1.5707963267948966)
r, theta = polar(-1j)
cos(theta)# + sin(theta)*j
(6.123233995736766e-17+0j)