I am curious on how complex numbers are programmed like in Python's cmath. Is i treated similarly to a variable?
Asked
Active
Viewed 51 times
-3
-
1What do you think it would mean for i to be "actually" √-1? – user2357112 Apr 15 '17 at 23:47
1 Answers
0
Like most implementations of complex arithmetic, Python represents complex numbers by storing their real and imaginary components. Operations on complex numbers are implemented in terms of their components; for example, addition is performed componentwise, and multiplication is the standard FOIL multiplication you should be familiar with.

user2357112
- 260,549
- 28
- 431
- 505