Skip to content

Commit 06a7242

Browse files
committed
Updating description for complex-number to fix formatting errors
1 parent ddf83b9 commit 06a7242

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

exercises/complex-numbers/description.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The square of the absolute value is computed as the product of `z` and its conju
3737
The sum of two complex numbers `z1 = a + b * i` and `z2 = c + d * i` is computed by adding their real and imaginary parts separately:
3838

3939
```text
40-
z1 + z2 = (a + b * i) + (c + d * i)
40+
z1 + z2 = (a + b * i) + (c + d * i)
4141
= (a + c) + (b + d) * i
4242
```
4343

@@ -46,7 +46,7 @@ z1 + z2 = (a + b * i) + (c + d * i)
4646
The difference of two complex numbers is obtained by subtracting their respective parts:
4747

4848
```text
49-
z1 - z2 = (a + b * i) - (c + d * i)
49+
z1 - z2 = (a + b * i) - (c + d * i)
5050
= (a - c) + (b - d) * i
5151
```
5252

@@ -55,7 +55,7 @@ z1 - z2 = (a + b * i) - (c + d * i)
5555
The product of two complex numbers is defined as:
5656

5757
```text
58-
z1 * z2 = (a + b * i) * (c + d * i)
58+
z1 * z2 = (a + b * i) * (c + d * i)
5959
= (a * c - b * d) + (b * c + a * d) * i
6060
```
6161

@@ -64,7 +64,7 @@ z1 * z2 = (a + b * i) * (c + d * i)
6464
The reciprocal of a non-zero complex number is given by:
6565

6666
```text
67-
1 / z = 1 / (a + b * i)
67+
1 / z = 1 / (a + b * i)
6868
= a / (a^2 + b^2) - b / (a^2 + b^2) * i
6969
```
7070

@@ -73,8 +73,8 @@ The reciprocal of a non-zero complex number is given by:
7373
The division of one complex number by another is given by:
7474

7575
```text
76-
z1 / z2 = z1 * (1 / z2)
77-
= (a + b * i) / (c + d * i)
76+
z1 / z2 = z1 * (1 / z2)
77+
= (a + b * i) / (c + d * i)
7878
= (a * c + b * d) / (c^2 + d^2) + (b * c - a * d) / (c^2 + d^2) * i
7979
```
8080

@@ -83,7 +83,7 @@ z1 / z2 = z1 * (1 / z2)
8383
Raising _e_ (the base of the natural logarithm) to a complex exponent can be expressed using Euler's formula:
8484

8585
```text
86-
e^(a + b * i) = e^a * e^(b * i)
86+
e^(a + b * i) = e^a * e^(b * i)
8787
= e^a * (cos(b) + i * sin(b))
8888
```
8989

0 commit comments

Comments
 (0)