Opened 10 years ago

Closed 8 years ago

#9367 closed defect (fixed)

S_unit return type is incorrect

Reported by: syazdani Owned by: davidloeffler
Priority: minor Milestone: sage-5.0
Component: number fields Keywords: S_units
Cc: mjo Merged in: sage-5.0.beta9
Authors: Michael Orlitzky Reviewers: David Loeffler
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by davidloeffler)

In some old versions of Sage, the S-unit commands returned values with the wrong parent:

sage: _.<x>=QQ[]
sage: L.<alpha>=NumberField(x^3+x+1)
sage: p=L.S_units([ L.ideal(7) ] )
sage: p[0].parent()
Rational Field

The correct output should be

Number Field in alpha with defining polynomial x^3 + x + 1

This is now fixed, so we should doctest to make sure it doesn't get broken again.

Apply sage-trac_9367.patch

Attachments (2)

patch-9367.patch (787 bytes) - added by syazdani 10 years ago.
Fixes the return type.
sage-trac_9367.patch (1.0 KB) - added by mjo 8 years ago.
Add a doctest for the correct behavior.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by syazdani

Fixes the return type.

Changed 8 years ago by mjo

Add a doctest for the correct behavior.

comment:1 Changed 8 years ago by mjo

  • Authors set to Michael Orlitzky
  • Cc mjo added
  • Status changed from new to needs_review

It looks like someone beat you to it! I get the correct answer with 4.8.alpha6, so I've added a doctest for it.

comment:2 Changed 8 years ago by davidloeffler

  • Description modified (diff)
  • Milestone set to sage-5.0
  • Priority changed from major to minor
  • Reviewers set to David Loeffler
  • Status changed from needs_review to positive_review

Apply sage-trac_9367.patch

(for patchbot).

comment:3 Changed 8 years ago by davidloeffler

  • Summary changed from S_unit return type is incorrect, to S_unit return type is incorrect

comment:4 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.0.beta9
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.