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

Classlib: Complex: Fix bugs in 'pow' method #1348

Merged
merged 1 commit into from
Mar 20, 2015
Merged

Classlib: Complex: Fix bugs in 'pow' method #1348

merged 1 commit into from
Mar 20, 2015

Conversation

jamshark70
Copy link
Contributor

Please merge into 3.7. Complex:pow returns wrong results as it's currently written.

exp(Complex(0,pi));
-> Complex( -1, 1.2246467991474e-16 )

(1.exp)**(Complex(0,pi));

Without fix:

-> Complex( 6.1232339957368e-17, 1 )

With fix:

-> Complex( -1, 1.2246467991474e-16 )

There is a rather large difference between -1 (correct) and i (incorrect).

@danstowell
Copy link
Member

good catch. i confirmed the problem here (didn't test solution but looks ok)

telephon added a commit that referenced this pull request Mar 20, 2015
Classlib: Complex: Fix bug in 'pow' method
@telephon telephon merged commit 3e2d0ec into supercollider:master Mar 20, 2015
sofakid pushed a commit to sofakid/supercollider that referenced this pull request Apr 6, 2015
…xPow

Classlib: Complex: Fix bug in 'pow' method
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.

3 participants