On Thursday, June 11, 2015 at 11:26:48 AM UTC+5:30, Ralf Stephan wrote:
>
> n = var('n',domain='integer')
>> res = solve([n^2 == 3],n); print "res = ",res
>>
>> returns the weird answer :
>>
>> res =  [
>> n == -sqrt(3),
>> n == sqrt(3)
>> ]
>>
>>
>  But
> sage: assume(n,'integer')
> sage: solve(n^2-3,n)
> []
>
> so it seems variable domains are not interpreted
> as assumptions.
>



    I tried the following code:
    
    var('n','k','l')
f(n)=n
g(k)=k
h(l)=l
l=k+1
sol=solve(f==g,x,k, solution_dict=True)
for s in sol:
    show(s)
soll=solve(g==h,k,l, solution_dict=True)
for s in soll:
    show(s)


but results are strange.

    --  
    Avi kaur
    Blog: https://avikashyap620.wordpress.com
    "There is no lacking of opportunity, The thing is you do not want to 
see It"

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

Reply via email to