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

Why Complex class use double type to save real component and imaginary component? #1

Open
liudaomanbu opened this issue May 11, 2018 · 1 comment

Comments

@liudaomanbu
Copy link

Are you sure there will be no accuracy problem?

@agdturner
Copy link
Collaborator

agdturner commented Jan 2, 2021

There probably should be implementations for different types of number. I don't know about any usage scenarios for the class based on double, but if double is not precise enough, then maybe a rational, a root or an algebraic number would suffice. If not, then a real number is needed. The more numbers allowed the more accuracy you might generally get, but more computation and data storage will generally be wanted. Often a precision/resolution will need to be computed once all the terms are simplified...

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

2 participants