-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Add cis(z) function, exp(iz) #142
Comments
Should we make the interface polymorphic or have two separate implementations:
where the latter is aliased |
Yeah, it's unambiguous but I wasn't sure whether it was desirable. Perhaps (Though really, |
Then, for now, maybe we just focus on the complex use case and put in |
That seems valid. If |
Awesome! Sounds good! |
Checklist
RFC:
.Description
Add cis function. Usage would be:
cis(x)
: returns[cos(x), sin(x)]
cis([0, 0], x)
: returns[cos(x), sin(x)]
in-placecis(x, y)
: returns[exp(-y) cos(x), exp(-y) sin(x)]
cis([0, 0], x, y)
: returns[exp(-y) cos(x), exp(-y) sin(x)]
in-placeNote for the last two cases:
exp(ix)
is generalized to complex z,exp(iz)
. Ifz = x + iy
, then this isexp(i (x + iy))
=exp(ix - y)
=exp(-y) * (cos(x) + i sin(x))
, hence the-y
in the above formulas.Other
The text was updated successfully, but these errors were encountered: