print ((1j**2).real) --> - 1. 0 how does it work? Where can i find the answer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

print ((1j**2).real) --> - 1. 0 how does it work? Where can i find the answer?

duel related question

6th Apr 2018, 10:26 AM
Greenman
2 Answers
+ 3
j is, according to the definition of complex numbers in mathematics, the square root of -1, or √(-1). Now, if you square it, you are bound to get -1 as the result.
6th Apr 2018, 10:46 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
thank you. Never knew sub zero square roots exist
10th Apr 2018, 5:23 AM
Greenman