#10481: errors should be raised not returned in is_integral_domain()
------------------------+---------------------------------------------------
   Reporter:  mderickx  |       Owner:  mderickx  
       Type:  defect    |      Status:  new       
   Priority:  minor     |   Milestone:  sage-4.6.1
  Component:  algebra   |    Keywords:            
     Author:  mderickx  |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------
Description changed by mderickx:

Old description:

> Currently we get this behaviour.
>
> {{{
> sage: R.<a>=ZZ['x'].quo(x^2)
> 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
> }}}

New description:

 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
 }}}

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10481#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to