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

not all fractions get converted with ex.fraction() #17736

Closed
rwst opened this issue Feb 5, 2015 · 11 comments
Closed

not all fractions get converted with ex.fraction() #17736

rwst opened this issue Feb 5, 2015 · 11 comments

Comments

@rwst
Copy link

rwst commented Feb 5, 2015

sage: a = var('a')
sage: b = (1/a).fraction(QQ)
...
TypeError: unsupported operand parent(s) for '/': 'Univariate Polynomial Ring in x over Rational Field' and 'Univariate Polynomial Ring in a over Rational Field'

The 1 apparently gets coerced into the x-ring, so we need to ensure equal rings somehow.

Component: symbolics

Author: Ralf Stephan

Branch/Commit: b46d1df

Reviewer: Martin Albrecht

Issue created by migration from https://trac.sagemath.org/ticket/17736

@rwst rwst added this to the sage-6.5 milestone Feb 5, 2015
@rwst
Copy link
Author

rwst commented Feb 21, 2015

@rwst
Copy link
Author

rwst commented Feb 21, 2015

Commit: b46d1df

@rwst
Copy link
Author

rwst commented Feb 21, 2015

New commits:

b46d1df17736: not all fractions get converted with ex.fraction()

@rwst
Copy link
Author

rwst commented Feb 21, 2015

Author: Ralf Stephan

@rwst rwst modified the milestones: sage-6.5, sage-6.6 Feb 21, 2015
@rwst
Copy link
Author

rwst commented Apr 20, 2015

comment:3

Passes all patchbot tests.

@malb
Copy link
Member

malb commented May 26, 2015

Reviewer: Martin Albrecht

@malb
Copy link
Member

malb commented May 26, 2015

comment:4

Looks good to me. A potential feature request could be to allow the user to specify the ordering of variables, but perhaps that's overkill?

@rwst
Copy link
Author

rwst commented May 26, 2015

comment:5

I'm not so familiar with algebra. Would you suggest specific orderings or is there a convention?

@malb
Copy link
Member

malb commented May 26, 2015

comment:6

Hi, sorry for not being clear:

I merely meant the ordering of variable (names), where you currently call sort(). But as I said: it's an optional feature request which could go into a separate ticket.

Of course, arbitrary term ordering ("lex" and "deglex" etc.) could also be considered. But I'd say a user should do the conversion by hand perhaps in this case.

@rwst
Copy link
Author

rwst commented May 26, 2015

comment:7

Replying to @malb:

I merely meant the ordering of variable (names), where you currently call sort(). But as I said: it's an optional feature request which could go into a separate ticket.

Ah but yes, I agree. Thanks for the review.

@vbraun
Copy link
Member

vbraun commented May 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants