Hi all, 

Following RJF's suggestion, I played around with Maxima for a little while 
to see where the problem arises. As far as I can tell, this is again a 
problem with the fact that simplify_radical gets called in simplify_full 
(see #12737). The problem that I'm seeing used to be absent when 
simplify_radical still set the domain to 'real' before invoking radcan, but 
now that it no longer does that, the problem has become apparent, see below.

First of all, I simplified the example in the original post to 

  sage: u, v = var('u, v', domain='real')
  sage: sqrt(-1/(u^2+v^2-1)).simplify_radical()  # This will hang

The problem is with the fact that the domain of the symbolic variables is 
complex:

sage: maxima.interact()
maxima: forget()
[]
maxima: domain
complex
maxima: assume(x > 0)
[x>0]
maxima: assume(y > 0)
[y>0]
maxima: radcan(sqrt(-1/(x^2 + y^2 - 1)))

Setting the domain to 'real' fixes the problem: 

sage: maxima.interact()
maxima: domain: real
real
maxima: radcan(sqrt(-1/(x^2 + y^2 - 1)))
%i/sqrt(y^2+x^2-1)

The upshot seems to be that this is not really a bug, but again an annoying 
consequence of simplify_radical not really being a simplify_ method, and 
this should be fixed once #11912 and #12737 are approved. Therefore I won't 
open a new ticket, but I'll just add to the discussion of those patches.

All the best,
Joris


On Friday, June 28, 2013 1:09:49 PM UTC+1, Joris Vankerschaver wrote:
>
> Hi all, 
>
> I've been out of the Sage loop for a while, but upon upgrading to 5.10, I 
> found that Maxima seems to choke on the following innocuous code which used 
> to run fine. I'm posting this here, because this issue came up while I was 
> working on #10132, and also because it affects usability.
>
>   sage: u, v = var('u,v')
>   sage: assume(u, 'real')
>   sage: assume(v, 'real')
>   sage: assume(u^2 + v^2 < 1)
>   sage: n = vector((u/sqrt(-u^2 - v^2 + 1), v/sqrt(-u^2 - v^2 + 1), 1))
>   sage: norm = n.norm(); norm
>   sqrt(abs(u/sqrt(-u^2 - v^2 + 1))^2 + abs(v/sqrt(-u^2 - v^2 + 1))^2 + 1)
>   sage: norm.simplify_full() 
>
> The last command just sits there on 5.10, and consumes all the resources 
> (more specifically, /Users/Joris/sage/local/bin/sage-cleaner consumes all 
> the available memory). In Sage 5.3, the last command just would return 
> I/sqrt(u^2 + v^2 - 1) which is not very nice but at least it's short and 
> fast.
>
> Is this known? Is there something I can do to avoid this?
>
> All the best,
> Joris
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to