Skip to content
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

Add complex power (.powc()) for T: float. #106

Closed
wants to merge 1 commit into from

Conversation

ticki
Copy link

@ticki ticki commented Jul 22, 2015

No description provided.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@ticki
Copy link
Author

ticki commented Jul 22, 2015

Highfive, my fellow bot.

@alexcrichton
Copy link
Contributor

Can you also add some tests for this?

@ticki
Copy link
Author

ticki commented Jul 23, 2015

I'll do.

@hauleth
Copy link
Member

hauleth commented Oct 15, 2015

@ticki what about tests?

#[inline]
pub fn powc(&self, exp: &Complex<T>) -> Complex<T> {
// Formula: (r e^(ti))^(a+bi) = (r^a e^(-bt)) e^((ln(r)b+at)i)
let (r, t) = exp.to_polar();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self is the base that should be made polar, not exp.

@cuviper
Copy link
Member

cuviper commented May 12, 2016

Superseded by #137.

@cuviper cuviper closed this May 12, 2016
remexre pushed a commit to remexre/num that referenced this pull request Jun 1, 2017
Remove impossible FromUtf8 error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants