Skip to content

Commit

Permalink
Updating description for complex-number to fix formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdish-15 committed Nov 19, 2024
1 parent ddf83b9 commit 06a7242
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exercises/complex-numbers/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The square of the absolute value is computed as the product of `z` and its conju
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:

```text
z1 + z2 = (a + b * i) + (c + d * i)
z1 + z2 = (a + b * i) + (c + d * i)
= (a + c) + (b + d) * i
```

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

```text
z1 - z2 = (a + b * i) - (c + d * i)
z1 - z2 = (a + b * i) - (c + d * i)
= (a - c) + (b - d) * i
```

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

```text
z1 * z2 = (a + b * i) * (c + d * i)
z1 * z2 = (a + b * i) * (c + d * i)
= (a * c - b * d) + (b * c + a * d) * i
```

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

```text
1 / z = 1 / (a + b * i)
1 / z = 1 / (a + b * i)
= a / (a^2 + b^2) - b / (a^2 + b^2) * i
```

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

```text
z1 / z2 = z1 * (1 / z2)
= (a + b * i) / (c + d * i)
z1 / z2 = z1 * (1 / z2)
= (a + b * i) / (c + d * i)
= (a * c + b * d) / (c^2 + d^2) + (b * c - a * d) / (c^2 + d^2) * i
```

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

```text
e^(a + b * i) = e^a * e^(b * i)
e^(a + b * i) = e^a * e^(b * i)
= e^a * (cos(b) + i * sin(b))
```

Expand Down

0 comments on commit 06a7242

Please sign in to comment.