Ticket #10481 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

errors should be raised not returned in is_integral_domain()

Reported by: mderickx Owned by: mderickx
Priority: minor Milestone: sage-4.6.2
Component: algebra Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers: Robert Bradshaw, Gagan Sekhon
Authors: Maarten Derickx Merged in: sage-4.6.2.alpha1
Dependencies: Stopgaps:

Description (last modified by mderickx) (diff)

Currently we get this behaviour.

sage: R.<a>=ZZ['x'].quo(x^2)
K=R.fraction_field()
sage: 1/K(x)
1/a
sage: (1/K(x))^2
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)

/Users/maarten/<ipython console> in <module>()

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/fraction_field_element.so in sage.rings.fraction_field_element.FractionFieldElement.__pow__ (sage/rings/fraction_field_element.c:8361)()

/Applications/sage/local/lib/python2.6/site-packages/sage/rings/fraction_field_element.so in sage.rings.fraction_field_element.FractionFieldElement.__init__ (sage/rings/fraction_field_element.c:2105)()

ZeroDivisionError: fraction field element division by zero
sage: R.is_integral_domain()
<type 'exceptions.NotImplementedError'>
sage: if R.is_integral_domain(): print "this should not be printed"
....: 
this should not be printed

Attachments

smallfix2-is-integral-domain.patch Download (1.2 KB) - added by mderickx 2 years ago.

Change History

comment:1 Changed 2 years ago by mderickx

  • Description modified (diff)

comment:2 Changed 2 years ago by mderickx

  • Status changed from new to needs_review

should be fixed now, i tested it against: Sage Version 4.6.1.alpha3, Release Date: 2010-12-05 also added test to see if the bug is fixed

comment:3 Changed 2 years ago by robertwb

  • Status changed from needs_review to positive_review

comment:4 Changed 2 years ago by mhansen

  • Reviewers set to Robert Bradshaw
  • Authors changed from mderickx to Maarten Derickx

comment:5 Changed 2 years ago by jdemeyer

  • Milestone changed from sage-4.6.1 to sage-4.6.2

comment:6 Changed 2 years ago by jdemeyer

  • Status changed from positive_review to needs_work

You should write the ticket number on the first line of the commit message (use hg qrefresh -e for that).

comment:7 Changed 2 years ago by jdemeyer

Another small problem: the documentation is not well-formatted. TESTS:: should be TESTS: since it's followed by normal text, not code.

Changed 2 years ago by mderickx

comment:8 Changed 2 years ago by mderickx

  • Status changed from needs_work to needs_review

I changed it accoring to Jeroens two comments

comment:9 Changed 2 years ago by gagansekhon

  • Status changed from needs_review to positive_review

comment:10 Changed 2 years ago by gagansekhon

  • Reviewers changed from Robert Bradshaw to Robert Bradshaw, Gagan Sekhon

comment:11 Changed 2 years ago by jdemeyer

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