Opened 21 months ago

Last modified 7 weeks ago

#26339 new enhancement

Better normalization for fraction field elements - follow up

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: commutative algebra Keywords:
Cc: tscrim, cheuberg, etn40ff, jakobkroeker, bhutz, robertwb, rws, emassop, cremona, mmezzarobba, saraedum Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

This is a follow-up on #16268 (and #16993), where the following further improvements were suggested:

  • clearing denominators in the numerator and denominator instead of making the leading coefficient of the denominator monic when that makes sense (i.e., for printing, and perhaps for computations in nested rational function fields, but making it fast enough requires some work),
  • also normalizing the leading coefficients over non-fields where that makes sense (see also discussion at #16993).


  • #15297 Elements from a Field of Fractions that compare equal should have equal hashes

Change History (4)

comment:1 Changed 20 months ago by mkoeppe

  • Description modified (diff)

comment:2 Changed 3 months ago by yzh

Unexpected (-1) factor in the numerator and denominator of a sage.rings.fraction_field_element.FractionFieldElement.

SageMath version 9.1.beta3.

sage: P.<a,b,c>=QQ[]
sage: f = 1/a/(b-a)/(c-a)+1/b/(a-b)/(c-b)+1/c/(a-c)/(b-c); f
sage: f.numerator()
sage: f.denominator()

comment:3 Changed 2 months ago by mkoeppe

  • Milestone changed from sage-8.4 to sage-9.1

comment:4 Changed 7 weeks ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

pushing these forward to 9.2

Note: See TracTickets for help on using tickets.