#8659: another broken square root simplification
-------------------------+--------------------------------------------------
   Reporter:  burcin     |          Owner:  burcin       
       Type:  defect     |         Status:  needs_review 
   Priority:  critical   |      Milestone:  sage-5.0     
  Component:  symbolics  |       Keywords:               
Work_issues:             |       Upstream:  N/A          
   Reviewer:             |         Author:  Burcin Erocal
     Merged:             |   Dependencies:  #12511       
-------------------------+--------------------------------------------------
Changes (by burcin):

  * status:  needs_work => needs_review
  * dependencies:  => #12511


Old description:

> Reported by Alex Raichev on sage-support:
>
> {{{
> On Wed, 7 Apr 2010 16:56:01 -0700 (PDT)
> Alex Raichev <[email protected]> wrote:
>
> > What the?
> >
> > ----------------------------------------------------------------------
> > | Sage Version 4.3.5, Release Date: 2010-03-28                       |
> > | Type notebook() for the GUI, and license() for information.        |
> > ----------------------------------------------------------------------
> > sage: a= matrix([[2,2,I],[2,2,-I],[I,-I,0]]).determinant(); a
> > 8
> > sage: a^(-1/2)
> >
> ---------------------------------------------------------------------------
> > TypeError                                 Traceback (most recent call
> > last)
> >
> > /Users/arai021/Dropbox/sage_work/<ipython console> in <module>()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
> > expression.so in sage.symbolic.expression.Expression.__pow__ (sage/
> > symbolic/expression.cpp:11892)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/rings/
> > number_field/number_field_element.so in
> > sage.rings.number_field.number_field_element.NumberFieldElement.__pow__
> > (sage/rings/number_field/number_field_element.cpp:10038)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
> > power_helper.so in sage.symbolic.power_helper.try_symbolic_power
> > (sage/ symbolic/power_helper.cpp:633)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
> > power_helper.so in sage.symbolic.power_helper.try_symbolic_power
> > (sage/ symbolic/power_helper.cpp:509)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
> > expression.so in sage.symbolic.expression.Expression.__pow__ (sage/
> > symbolic/expression.cpp:11892)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/rings/
> > rational.so in sage.rings.rational.Rational.__pow__ (sage/rings/
> > rational.c:15609)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/structure/
> > element.so in sage.structure.element.RingElement.__mul__ (sage/
> > structure/element.c:11337)()
> >
> > /Applications/sage/local/lib/python2.6/site-packages/sage/structure/
> > coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op
> > (sage/structure/coerce.c:6994)()
> >
> > TypeError: unsupported operand parent(s) for '*': 'Rational Field' and
> > '<type 'NoneType'>'
>
> }}}
>
> Here is the thread:
>
> http://groups.google.com/group/sage-support/t/3e8ae9f6b7c44e7c
>
> This looks similar to #8540, though it is a long standing issue, not
> caused by that ticket:
>
> {{{
> ----------------------------------------------------------------------
> | Sage Version 4.3.3.alpha0, Release Date: 2010-02-11                |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> **********************************************************************
> *                                                                    *
> * Warning: this is a prerelease version, and it may be unstable.     *
> *                                                                    *
> **********************************************************************
> sage: a= matrix([[2,2,I],[2,2,-I],[I,-I,0]]).determinant(); a
> 8
> sage: a^(-1/2)
> <boom>
> }}}
>
> Apply trac_8659-hold_powers.take2.patch

New description:

 Reported by Alex Raichev on sage-support:

 {{{
 On Wed, 7 Apr 2010 16:56:01 -0700 (PDT)
 Alex Raichev <[email protected]> wrote:

 > What the?
 >
 > ----------------------------------------------------------------------
 > | Sage Version 4.3.5, Release Date: 2010-03-28                       |
 > | Type notebook() for the GUI, and license() for information.        |
 > ----------------------------------------------------------------------
 > sage: a= matrix([[2,2,I],[2,2,-I],[I,-I,0]]).determinant(); a
 > 8
 > sage: a^(-1/2)
 >
 ---------------------------------------------------------------------------
 > TypeError                                 Traceback (most recent call
 > last)
 >
 > /Users/arai021/Dropbox/sage_work/<ipython console> in <module>()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
 > expression.so in sage.symbolic.expression.Expression.__pow__ (sage/
 > symbolic/expression.cpp:11892)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/rings/
 > number_field/number_field_element.so in
 > sage.rings.number_field.number_field_element.NumberFieldElement.__pow__
 > (sage/rings/number_field/number_field_element.cpp:10038)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
 > power_helper.so in sage.symbolic.power_helper.try_symbolic_power
 > (sage/ symbolic/power_helper.cpp:633)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
 > power_helper.so in sage.symbolic.power_helper.try_symbolic_power
 > (sage/ symbolic/power_helper.cpp:509)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/
 > expression.so in sage.symbolic.expression.Expression.__pow__ (sage/
 > symbolic/expression.cpp:11892)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/rings/
 > rational.so in sage.rings.rational.Rational.__pow__ (sage/rings/
 > rational.c:15609)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/structure/
 > element.so in sage.structure.element.RingElement.__mul__ (sage/
 > structure/element.c:11337)()
 >
 > /Applications/sage/local/lib/python2.6/site-packages/sage/structure/
 > coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op
 > (sage/structure/coerce.c:6994)()
 >
 > TypeError: unsupported operand parent(s) for '*': 'Rational Field' and
 > '<type 'NoneType'>'

 }}}

 Here is the thread:

 http://groups.google.com/group/sage-support/t/3e8ae9f6b7c44e7c

 This looks similar to #8540, though it is a long standing issue, not
 caused by that ticket:

 {{{
 ----------------------------------------------------------------------
 | Sage Version 4.3.3.alpha0, Release Date: 2010-02-11                |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 sage: a= matrix([[2,2,I],[2,2,-I],[I,-I,0]]).determinant(); a
 8
 sage: a^(-1/2)
 <boom>
 }}}

 Apply attachment:trac_8659-hold_powers.take3.patch

--

Comment:

 I uploaded a new patch which should finally fix this. Please review.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8659#comment:11>
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