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

polynomials should have big methods? #522

Closed
nsajko opened this issue Aug 17, 2023 · 2 comments
Closed

polynomials should have big methods? #522

nsajko opened this issue Aug 17, 2023 · 2 comments

Comments

@nsajko
Copy link
Contributor

nsajko commented Aug 17, 2023

For example:

julia> big(Polynomial(rand(3)))
ERROR: MethodError: no method matching big(::Polynomial{Float64, :x})

I would expect big(::Polynomial{Float64, :x}) to return a value of type Polynomial{BigFloat, :x}.

@jverzani
Copy link
Member

Here I say, we should follow vector as a guide. There we don't have big([1,2,3]) defined. Of course there we have either big.([1,2,3]) or map(big,[1,2,3]). For polynomials, map(big,p) would be the proper way, as the broadcast semantics are different for polynomials than vectors. (Which is maybe a mistake, but one made a long time ago and not really possible to change.)

@nsajko
Copy link
Contributor Author

nsajko commented Aug 17, 2023

Didn't occur to me that map would work. map(big, polynomial) indeed works fine, thank you.

@nsajko nsajko closed this as completed Aug 17, 2023
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