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

Returning numerical values #146

Open
AustereTriceratops opened this issue Aug 21, 2021 · 0 comments
Open

Returning numerical values #146

AustereTriceratops opened this issue Aug 21, 2021 · 0 comments

Comments

@AustereTriceratops
Copy link

Hi, I'm trying to use this library to find roots of arbitrary polynomials.

One issue I noticed is that running Algebrite.nroots("x^2 - 1") returns a pretty complicated-looking datatype instead of an array of the roots. So far the only way I've found to get the roots is to use .toString() to get a string representation of the array.

I guess this is useful for displaying the answer, but the program I'm building needs their numerical representation (either as floats, or as an instance of a Complex class). Is there a way to do this? I'd rather not have to write a function to parse the string and build the right array from it.

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