-
Notifications
You must be signed in to change notification settings - Fork 74
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
Polynomials.fit fails with InexactError for Rational #553
Comments
Hmm, maybe we can make
Which will make Integer go to Float, but keep Rational as is? The underlying Would you want to make a PR and see if all the tests run? |
I like the idea! Yes I will try doing a PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was trying to use Polynomials for Base.Rational, and encountered an issue when running something like this:
The expected behavior is that a Polynomial with Rational coefficients is returned, and all steps are done with exact arithmetic.
Instead I get this error.
Note that for simpler tasks, a Polynomial is returned, but inexact arithmetic is being done in the process, just there is a smaller floating point error, so it can be converted back.
Doing some investigation, the issue is with the following function in
standard-basis.jl
:Changing the first line to
R = T
makes my example work correctly.Of course that is not the right solution, I'd recommend something like
not sure though if it should be more general than that though.
The text was updated successfully, but these errors were encountered: