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

Wrong result on complex power. #17

Closed
GoogleCodeExporter opened this issue Mar 22, 2015 · 3 comments
Closed

Wrong result on complex power. #17

GoogleCodeExporter opened this issue Mar 22, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
Evaluating something like (-0.27 + 0.66*i)^2 gives wrong output.


What version of the product are you using? On what operating system?
muParserX 2.1.6

Please provide any additional information below.
The problem lies on OprtPowCmplx::Eval which tries to remove the bogus results 
comparing the imaginary and real parts with the smallest numeric limits. If 
some part of the number is negative it'll consider it a bogus result and 
eliminates it. The solution is to take the absolute value.

Original issue reported on code.google.com by chatran2...@gmail.com on 7 Jan 2013 at 7:57

Attachments:

@GoogleCodeExporter
Copy link
Author

Thank you for reporting this. I will fix it soon. The bug has exposed a minor 
flaw in the unit test which i need to address first in order to eliminate it 
once and for all. 

Original comment by ib...@gmx.info on 8 Jan 2013 at 10:47

  • Changed state: Accepted
  • Added labels: OpSys-All

@GoogleCodeExporter
Copy link
Author

Original comment by ib...@gmx.info on 8 Jan 2013 at 10:48

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

fixed in V2.1.7

Original comment by ib...@gmx.info on 10 Jan 2013 at 9:12

  • Changed state: Fixed

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

No branches or pull requests

1 participant