Skip to content

Commit 628ccb0

Browse files
committed
2 parents 71546a4 + b039c61 commit 628ccb0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ print(number)
3737
number = Complex(re=3, im=-2.4, restore=False) # restore argument is by default True, whenever an error occurs on operation, the last result will be restored to the object, else if it is False then the object will be simply None.
3838
# Instanciation 6
3939
number = Complex.fromComplex(4 - 3j - 2) # Real = 2, Imaginary = -3
40+
# Keep in mind that the imaginary part 'j' must be always multiplied with a coefficient as follows
41+
number = Complex.fromComplex(1 - 1j)
4042
```
4143
### Basic operations
4244
```python
@@ -77,6 +79,9 @@ print(num1)
7779
print('con({}) = {}'.format(num2, num2.con()))
7880
# Module of a complex number
7981
print('mod({}) = {}'.format(num2, num2.mod()))
82+
# You can also make basic operations with non instanciated complex numbers like this
83+
num1 *= (1 - 1j)
84+
print(num1)
8085
```
8186
### Comparisons of Complex numbers
8287
```python
@@ -94,6 +99,8 @@ if(num1 <= num2): print('({}) <= ({})'.format(num1, num2))
9499
if(num1 == num2): print('({}) == ({})'.format(num1, num2))
95100
# Not equal
96101
if(num1 != num2): print('({}) != ({})'.format(num1, num2))
102+
# You can also make comparisons with non instanciated complex numbers like this
103+
if(num1 > (1 - 3j)): print('({}) != ({})'.format(num1, (1 - 3j)))
97104
```
98105
### Solving linear equation and second degree equation
99106
#### Importing solve function

0 commit comments

Comments
 (0)