Open yiheinchai opened 5 months ago
def exp(self, x : float) -> "Eulers Formula": return math.cos(x) + complex(math.sin(x))
the complex class takes in two parameters, the real part and the imaginary part.
it should be instead,
def exp(self, x : float) -> "Eulers Formula": return complex(math.cos(x), math.sin(x))
given this error, i am wondering why the code still works
You are correct, it should be complex(math.cos(x), math.sin(x)). The updated code should produce the correct frequency domain.
complex(math.cos(x), math.sin(x))
the complex class takes in two parameters, the real part and the imaginary part.
it should be instead,
given this error, i am wondering why the code still works