This module is always available. It provides access to mathematical functions for complex numbers. The functions are:
e**x
.
The module also defines two mathematical constants:
Note that the selection of functions is similar, but not identical, to
that in module math. The reason for having
two modules is that some users aren't interested in complex numbers,
and perhaps don't even know what they are. They would rather have
math.sqrt(-1)
raise an exception than return a complex number.
Also note that the functions defined in cmath always return a
complex number, even if the answer can be expressed as a real number
(in which case the complex number has an imaginary part of zero).
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant