Skip to content

convert Rational to fmpq - #62

Open
cossio wants to merge 2 commits into
wbhart:masterfrom
cossio:patch-3
Open

convert Rational to fmpq#62
cossio wants to merge 2 commits into
wbhart:masterfrom
cossio:patch-3

Conversation

@cossio

@cossio cossio commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/flint/fmpq.jl Outdated

convert(::Type{fmpq}, a::fmpz) = fmpq(a)

Base.convert(::Type{Nemo.fmpq}, x::Rational) = Nemo.fmpq(x.num, x.den)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I don't believe the qualifiers are needed here.

@cossio

cossio commented Sep 12, 2016

Copy link
Copy Markdown
Contributor Author

Can I fix the qualifiers here, or do I need to make a new pull request?

@wbhart

wbhart commented Sep 12, 2016

Copy link
Copy Markdown
Owner

As I guess you figured out, you only have to push new commits to the branch you made. They show up here automatically.

Comment thread src/flint/fmpq.jl

convert(::Type{fmpq}, a::fmpz) = fmpq(a)

Base.convert(::Type{fmpq}, x::Rational) = fmpq(x.num, x.den)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does convert need the Base qualifier? We don't seem to have it on the previous line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. I did not find any import Base.convert.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our Base imports are in Nemo/src/Nemo.jl

On 13 September 2016 at 01:12, Jorge Fernández de Cossío Díaz <
notifications@github.com> wrote:

In src/flint/fmpq.jl
#62 (comment):

@@ -713,6 +713,8 @@ convert(::Type{fmpq}, a::Integer) = fmpq(a)

convert(::Type{fmpq}, a::fmpz) = fmpq(a)

+Base.convert(::Type{fmpq}, x::Rational) = fmpq(x.num, x.den)

I'm not sure. I did not find any import Base.convert.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/wbhart/Nemo.jl/pull/62/files/25c9cb65f332a4f014fa3a04a8938d85ab7198e7#r78471874,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAOzpnQD48yM5YJdsV1jhffxQYQicgFiks5qpdxagaJpZM4J6u5P
.

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

Successfully merging this pull request may close these issues.

2 participants