The description.md of the complex-numbers exercise is rather unclear on exactly what mathematical operation is meant to implemented by the algorithm mentioned as "exponent of a complex number". The full text of that item reading:
Exponent of a complex number can be expressed as exp(a + i * b) = exp(a) * exp(i * b), and the last term is given by Euler's formula exp(i * b) = cos(b) + i * sin(b).
Is this supposed to be ln(complex-number) or e^(complex-number) or even something else?
The C track has recently seen an issue for this exact question, where I (a maintainer) had no real idea from reading the description, how to answer the OP without more mathematical knowledge than would strictly be required for a programming exercise.
Luckily in this case for the C track, the exercise was implemented very recently and the implementer was still around and able to help out, other cases might not be so lucky.
Essentially the description.md could do with rewriting in a somewhat less terse manner.
Is this supposed to be ln(complex-number) or e^(complex-number) or even something else?
It is e^(a + bi) (Euler's formula is e^bi). The exponential (thus exp) of term x is e^x.
To further confuse things, the current canonical data does not actually contain a test for exp(a + bi) where a != 0 and b != 0 (see #1095), so an incorrect solution of e^(a + bi) = e^a*cos(b) + isin(b) would pass existing tests.
To rewrite the description:
Exponent of a complex number can be expressed as e^(a + i * b) = e^a * e^(i * b), and the last term is given by Euler's formula e^(i * b) = cos(b) + i * sin(b).
Does this make things more clear?
I'm the recent implementer of this exercise. I might rewrite the description thus, using the word "exponentiation":
Exponentiation of _e_ to a complex number can be expressed as e^(a + i * b) = e^a * e^(i * b), and the last term is given by Euler's formula e^(i * b) = cos(b) + i * sin(b).
Better might be:
The exponentiation of _e_ to a complex number can be expressed as
e^(a + i * b) = e^a * e^(i * b), the last term of which is given by Euler's formulae^(i * b) = cos(b) + i * sin(b).
A possibly simpler alternative:
Raising _e_ to a complex exponent can be expressed as
e^(a + i * b) = e^a * e^(i * b), the last term of which is given by Euler's formulae^(i * b) = cos(b) + i * sin(b).
This may be a good candidate for good-first-patch labeling as it's basically a markdown rewording change.
Most helpful comment
description.md