#17539 closed enhancement (fixed)
convenience conversion from symbolic to fraction field
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage6.5 
Component:  symbolics  Keywords:  
Cc:  mmarco  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Miguel Marco 
Report Upstream:  N/A  Work issues:  
Branch:  753dacd (Commits)  Commit:  
Dependencies:  Stopgaps: 
Description
Something like
sage: ex=(x+1)/(x1); ex (x + 1)/(x  1) sage: ex.numerator().polynomial(ZZ)/ex.denominator().polynomial(ZZ) (x + 1)/(x  1) sage: type(_) <type 'sage.rings.fraction_field_element.FractionFieldElement'>
made into an Expression
method, perhaps named fraction(...)
with the ring as argument.
Change History (9)
comment:1 Changed 6 years ago by
 Branch set to u/rws/convenience_conversion_from_symbolic_to_fraction_field
comment:2 Changed 6 years ago by
 Commit set to e36f547d47db20169a17488b0ac56e87aac0d988
 Status changed from new to needs_review
comment:3 Changed 6 years ago by
 Reviewers set to Miguel Marco
It looks good, although maybe some more doctest would be better. One with nontrivial numerator, one with several variables, using other rings, etc.
comment:4 Changed 6 years ago by
 Cc mmarco added
comment:5 Changed 6 years ago by
 Commit changed from e36f547d47db20169a17488b0ac56e87aac0d988 to 753dacdc39299243f7e379a3c3f67d63f36a8c04
Branch pushed to git repo; I updated commit sha1. New commits:
753dacd  17539: more doctests

comment:6 Changed 6 years ago by
Done. Though I'm of the opinion that every computation path in the associated code needs only be tested once (so it's actually up to doctests in polynomial_element.__div__
to be exhaustive). But I understand it maybe a demonstration of function behaviour.
comment:7 Changed 6 years ago by
 Status changed from needs_review to positive_review
comment:8 Changed 6 years ago by
 Branch changed from u/rws/convenience_conversion_from_symbolic_to_fraction_field to 753dacdc39299243f7e379a3c3f67d63f36a8c04
 Resolution set to fixed
 Status changed from positive_review to closed
comment:9 Changed 6 years ago by
 Commit 753dacdc39299243f7e379a3c3f67d63f36a8c04 deleted
Thanks for the review.
Note: See
TracTickets for help on using
tickets.
New commits:
17539: fraction method of expression