[sage-support] Re: Polynomial division without remainder

2014-03-25 Thread Nils Bruin
On Monday, March 24, 2014 7:56:33 AM UTC-7, martin@gmx.net wrote:
>
> Working in a stack of multivariate polynomial rings, how can I compute the 
> quotient of two polynomials in those cases where I know the remainder to be 
> zero?
>
> Reading the docs I found two likely approaches, but neither seems to work 
> as I'd have hoped. See below for error messages.
>
> Example:
>
> sage: PR1.=QQ[]
> sage: PR2.=PR1[]
> sage: n=(x-y)*(x+3*y)
> sage: d=(x-y)
>
 
You  can do this by manually converting into a singular-compatible ring and 
back:

sage: S=QQ['a,b,x,y']
sage: PR2(S(n)//S(d))
x + 3*y

This is one place where the fact that sage considers variable names as 
significant, comes in  handy: it can figure out how to map PR2 to S and 
back.

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


Re: [sage-support] Re: graphic conversion from maxima to sage

2014-03-25 Thread HG
Final and agreeing with you not enaugh smooth but it's ok for what I 
need. I can't use show() on texmacs because the it's an external windows.

Thanks again for your help :)
Henri

Sage]  def f(x):
if x<0:
return sqrt(-x^2-2*x)
else:
return -sqrt(-x^2+2*x)

Sage] a=plot(f,(x,-2,2),color='black',fill=sqrt(4-x^2),fillcolor="black")

Sage] b=plot(f,(x,-2,2),color='red',fill=-sqrt(4-x^2),fillcolor="red")

Sage]  plot(a+b,figsize=2,axes=False,aspect_ratio=1)




Le 25/03/2014 15:28, kcrisman a écrit :



On Tuesday, March 25, 2014 10:21:29 AM UTC-4, kcrisman wrote:


But I need it in sagemath to get it well embedd in texmacs.
After long trying I didn't not success, my main problem is
conditions.
If a good soul could do it for me all my thanks.
Kind regards,
HG


Does

http://www.sagemath.org/doc/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.region_plot


help?


Okay, or http://sagecell.sagemath.org/?q=pwwdqz should help. 
 Personally, I don't like this parametrization; it doesn't seem to 
look right at the origin, not smooth enough.

--
You received this message because you are subscribed to a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/s0uAGNAVWtw/unsubscribe.
To unsubscribe from this group and all its topics, 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.


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


[sage-support] keyboard

2014-03-25 Thread cyrille piatecki
 A very simple question needing a very simple answer for a beginner --- 
I suppose the question has been asked a lot of time --- : how toset the 
keyboard  --- in my case french --- in Sage under Windows an VMware.


Thanks

Cyrille Piatecki

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


Re: [sage-support] Re: graphic conversion from maxima to sage

2014-03-25 Thread HG
Sorry I answer you too quickly and had not seen the link you send to me, 
which is exactly what I want !

Thanks for your help
Henri
Le 25/03/2014 15:28, kcrisman a écrit :



On Tuesday, March 25, 2014 10:21:29 AM UTC-4, kcrisman wrote:


But I need it in sagemath to get it well embedd in texmacs.
After long trying I didn't not success, my main problem is
conditions.
If a good soul could do it for me all my thanks.
Kind regards,
HG


Does

http://www.sagemath.org/doc/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.region_plot


help?


Okay, or http://sagecell.sagemath.org/?q=pwwdqz should help. 
 Personally, I don't like this parametrization; it doesn't seem to 
look right at the origin, not smooth enough.

--
You received this message because you are subscribed to a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/s0uAGNAVWtw/unsubscribe.
To unsubscribe from this group and all its topics, 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.


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


Re: [sage-support] Re: graphic conversion from maxima to sage

2014-03-25 Thread HG
Yes thanks but I tried I can't set conditions in the equation (I am not 
an expert at all !)

Le 25/03/2014 15:28, kcrisman a écrit :



On Tuesday, March 25, 2014 10:21:29 AM UTC-4, kcrisman wrote:


But I need it in sagemath to get it well embedd in texmacs.
After long trying I didn't not success, my main problem is
conditions.
If a good soul could do it for me all my thanks.
Kind regards,
HG


Does

http://www.sagemath.org/doc/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.region_plot


help?


Okay, or http://sagecell.sagemath.org/?q=pwwdqz should help. 
 Personally, I don't like this parametrization; it doesn't seem to 
look right at the origin, not smooth enough.

--
You received this message because you are subscribed to a topic in the 
Google Groups "sage-support" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/sage-support/s0uAGNAVWtw/unsubscribe.
To unsubscribe from this group and all its topics, 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.


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


[sage-support] Re: graphic conversion from maxima to sage

2014-03-25 Thread kcrisman

>
>
> But I need it in sagemath to get it well embedd in texmacs. 
> After long trying I didn't not success, my main problem is conditions. 
> If a good soul could do it for me all my thanks. 
> Kind regards, 
> HG 
>

Does 
http://www.sagemath.org/doc/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.region_plot
 
help? 

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


[sage-support] Re: graphic conversion from maxima to sage

2014-03-25 Thread kcrisman


On Tuesday, March 25, 2014 10:21:29 AM UTC-4, kcrisman wrote:
>
>
>> But I need it in sagemath to get it well embedd in texmacs. 
>> After long trying I didn't not success, my main problem is conditions. 
>> If a good soul could do it for me all my thanks. 
>> Kind regards, 
>> HG 
>>
>
> Does 
> http://www.sagemath.org/doc/reference/plotting/sage/plot/contour_plot.html#sage.plot.contour_plot.region_plothelp?
>  
>

Okay, or http://sagecell.sagemath.org/?q=pwwdqz should help.  Personally, I 
don't like this parametrization; it doesn't seem to look right at the 
origin, not smooth enough. 

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


[sage-support] Re: int() on real numbers broken?

2014-03-25 Thread Zeda Thomas
Thanks much, that helps and I am pretty sure I understand what is going on! 

On Monday, March 24, 2014 10:49:18 AM UTC-4, Peter Bruin wrote:
>
> Hello, 
>
> > I am working on a Z80 project and I needed 72 bits of precision for 64 
> > elements of the form log2(1+2^-i) (so log2(3/2), log2(5/4),...). I 
> > needed to convert these to hexadecimal, and it worked until I tried 
> > the following for i=56: 
> > int(256*log(1+2^-56,2)) 
> > 
> > This returns 1, when in fact it should be 0. Actually, instead of 
> > multiplying by 256, multiplying by 65536, or 600, or many other 
> > numbers would also return the integer part as 1. 
> > 
> > As a note, I used RealField(80) as my precision. 
>
> Typing log(1 + 2^-56, 2) gives the result as a symbolic expression, not 
> as an element of a real field.  Applying int() to this internally uses a 
> RealIntervalField with 53 bits of precision, which is not enough in this 
> case.  Here is a way to get the desired precision: 
>
> sage: x = RealField(80)(256*log(1+2^-56,2)) 
> sage: x 
> 5.1254824061038682620123e-15 
> sage: int(x) 
> 0 
>
> Peter 
>
>

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


[sage-support] graphic conversion from maxima to sage

2014-03-25 Thread HG


Hi, 
I got this yin-yang from 
http://riotorto.users.sourceforge.net/gnuplot/func2d/index.html (thanks for 
it !) : 

draw2d( 
proportional_axes = xy, 
title = "Ying-Yang", 
ellipse(0,0,2,2,0,360), 
fill_color= black, 
filled_func   = -sqrt(4-x^2), 
explicit(if x < 0 then sqrt(-x^2-2*x) else -sqrt(-x^2+2*x),x,-2,2) ) $ 


But I need it in sagemath to get it well embedd in texmacs. 
After long trying I didn't not success, my main problem is conditions. 
If a good soul could do it for me all my thanks. 
Kind regards, 
HG 

I have done this which is not really good :
y=sqrt(4-x^2);b=y
r=sqrt(-x^2-2*x);q=-sqrt(-x^2+2*x)
e=solve(b==r,y)
c=plot(b,(y,-2,2),fill=True,fillcolor="black",color="black",figsize=3,aspect_ratio=1);
c+=plot(r,(y,-2,2),fill=True,fillcolor="red",color="red",figsize=3,aspect_ratio=1)
d=plot(-b,(y,-2,2),fill=True,fillcolor="red",color="red",figsize=3,aspect_ratio=1);
d+=plot(-r,(y,-2,2),fill=True,fillcolor="red",color="red",figsize=3,aspect_ratio=1);
p=plot(q,(y,-2,2),fill=True,fillcolor="red",color="red",figsize=3);
p+=plot(q,(y,-2,2),fill=True,fillcolor="black",color="red",figsize=3)
plot(c+d+p,figsize=2,aspect_ratio=1,axes=False)

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