On Apr 30, 2009, at 9:41 PM, mabshoff wrote:

> On Apr 30, 9:28 pm, Minh Nguyen <nguyenmi...@gmail.com> wrote:
>> Hi folks,
>
> Hi,
>
>> I received the following segmentation fault when trying to use the
>> show command with complex_plot():
>>
>> [mv...@sage ~]$ sage
>> --------------------------------------------------------------------- 
>> -
>> | Sage Version 3.4.1, Release Date:  
>> 2009-04-21                       |
>> | Type notebook() for the GUI, and license() for  
>> information.        |
>> --------------------------------------------------------------------- 
>> -
>> sage: q = var("q")
>> sage: f(q) = (q^4 - q^2 + 1) * (q^4 + q^3 + q^2 + q + 1) * (q^4 - q^3
>> + q^2 - q + 1) * (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1) * (q^6 - q^5 +
>> q^4 - q^3 + q^2 - q + 1) * (q^(20) - q^(18) - q^(14) - q^(12) + q^ 
>> (10)
>> - q^8 - q^6 - q^2 + 1)
>> sage: g(q) = q^8 * (q^4 + q^2 + 1)^2 * (q^4 + 1)^5
>> sage: p = complex_plot(f/g, (-2,2), (-2,2))
>> sage: p.show(figsize=[256,256])
>
> please open a ticket. I think you might be using figsize wrong, i.e.
> it isn't supposed to be a list or at least it isn't in MPL. If I pass
> figsize=2 in for example it works. What might happen is that some kwd
> argument gets passed into the wrong place and *boom*. The issue is
> definitely in MPL:

Phew... :)

> While playing around with this I came across this strangeness:
>
> sage: q = var("q")
> sage: f(q) = (q^4 - q^2 + 1) * (q^4 + q^3 + q^2 + q + 1) * (q^4 - q^3
> ....: )
> ---------------------------------------------------------------------- 
> -----
> RuntimeError                              Traceback (most recent call
> last)
>
> RuntimeError: There is a bug in the coercion code in SAGE.
> Both x (=(q^4 - q^2 + 1)*(q^4 + q^3 + q^2 + q + 1)) and y (=q |--> q^4
> - q^3) are supposed to have identical parents but they don't.
> In fact, x has parent 'Symbolic Ring'
> whereas y has parent 'Callable function ring with arguments (q,)'
> Original elements (q^4 - q^2 + 1)*(q^4 + q^3 + q^2 + q + 1) (parent
> Symbolic Ring) and q |--> q^4 - q^3 (parent Callable function ring
> with arguments (q,)) and maps
> <type 'NoneType'> None
> <type 'sage.categories.morphism.CallMorphism'> Call morphism:
>   From: Callable function ring with arguments (q,)
>   To:   Symbolic Ring
>
> It is important here to input all but the last closing parenthesis,
> hit enter and then close the expression and hit enter again. The
> result is the above complaint ;). Should I open a ticket for this one?

Here is the underlying issue:

sage: f(q) = q
sage: SR(f).parent() is SR
False

This should be completely re-written and fixed in the new symbolics.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to