-3

I am curious on how complex numbers are programmed like in Python's cmath. Is i treated similarly to a variable?

1 Answers1

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