[sage-support] Jocobi Symbol
How Jacobi Symbol (a/N) can be calculate in Sage 4.1 --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Jocobi Symbol
Try sage: kronecker_symbol(a, N) with a and N your favourite integers. Best, Alex On Sun, Jul 19, 2009 at 4:28 PM, Santanu Sarkarsarkar.santanu@gmail.com wrote: How Jacobi Symbol (a/N) can be calculate in Sage 4.1 -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Jocobi Symbol
Thank you. 2009/7/19 Alex Ghitza aghi...@gmail.com Try sage: kronecker_symbol(a, N) with a and N your favourite integers. Best, Alex On Sun, Jul 19, 2009 at 4:28 PM, Santanu Sarkarsarkar.santanu@gmail.com wrote: How Jacobi Symbol (a/N) can be calculate in Sage 4.1 -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/http://www.ms.unimelb.edu.au/%7Eaghitza/ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
Thank you all for your responses. Doing soime googling around, I discovered that that openSuSE 11.1 has the same problem with evince I encountered. I followed William's advice above and, before firing up sage (as a normal user), I exported the SAGE-BROWSER environment variable as /opt/kde3/kdvi (I have not upgraded to KDE4 yet). My example above worked fine now, but plots did not work. So, I shut down sage, exported SAGE-BROWSER as '/usr/ bin/firefox', and now Firefox either plots the SAGE plots directly or, in the case of the example above with the Laplace transform, prompts me what program to use, I respond with '/opt/kde3/ kdvi', and kdvi displays the formula correctly. HOWEVER, matplotlib plots show as Line2D(_line1). For example, sage: import pylab sage: import scipy sage: import scipy.special as special sage: x=scipy.linspace(0.0r,5.0r) sage: show(pylab.plot(special.airy(x)[0],color='red')) This brings up firefox (as per the SAGE-BROWSER environment variable above), firefox asks me if it should use kdvi, I reply in the affirmative, and kdvi pops up a window saying SAGE and Line2D (_line1) (without the quotes! In prior versions of sage, I had no problems displaying matplotlib plots. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
linuxgus wrote: Thank you all for your responses. Doing soime googling around, I discovered that that openSuSE 11.1 has the same problem with evince I encountered. I followed William's advice above and, before firing up sage (as a normal user), I exported the SAGE-BROWSER environment variable as /opt/kde3/kdvi (I have not What if you set SAGE_BROWSER to kde-open? That will open different programs, based on the format. I think it's similar to the apple open command. Thanks, Jason upgraded to KDE4 yet). My example above worked fine now, but plots did not work. So, I shut down sage, exported SAGE-BROWSER as '/usr/ bin/firefox', and now Firefox either plots the SAGE plots directly or, in the case of the example above with the Laplace transform, prompts me what program to use, I respond with '/opt/kde3/ kdvi', and kdvi displays the formula correctly. HOWEVER, matplotlib plots show as Line2D(_line1). For example, sage: import pylab sage: import scipy sage: import scipy.special as special sage: x=scipy.linspace(0.0r,5.0r) sage: show(pylab.plot(special.airy(x)[0],color='red')) This brings up firefox (as per the SAGE-BROWSER environment variable above), firefox asks me if it should use kdvi, I reply in the affirmative, and kdvi pops up a window saying SAGE and Line2D (_line1) (without the quotes! In prior versions of sage, I had no problems displaying matplotlib plots. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Gnuplot installation problem
Hello, I'm trying to install the optional package gnuplotpy-1.7.p3, but when I try to install it by typing ./sage -i gnuplotpy-1.7.p3, I get an error. The extraction finished successfully but the installation failed. Here is the traceback : Traceback (most recent call last): File setup.py, line 17, in module from __init__ import __version__ File /home/mourad/Telechargements/sage-3.4.2/spkg/build/ gnuplotpy-1.7.p3/src/__init__.py, line 167, in module from PlotItems import PlotItem, Func, File, Data, GridData File /home/mourad/Telechargements/sage-3.4.2/spkg/build/ gnuplotpy-1.7.p3/src/PlotItems.py, line 88 'with' : lambda self, with: self.set_string_option( ^ SyntaxError: invalid syntax Error installing gnuplotpy. I'm using sage 3.4.2 upgraded to 4.1. Thank you. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: how to get sage for ubuntu hardy
Bruce Cohenwrote: I am running sage-4.1-linux-Debian_GNU_Linux_5.0_lenny-i686-Linux on Ubuntu 8.04.1, kernel 2.6.24-19-generic. Thanks for th tip! I tried it and it failed, but it's probably because I ran it from the chroot jail that I use to build the custom live dvd. The kernel in the chroot is the same as the kernel outside, so I guess I'll have to repeat the process with a hardy machine. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: how to get sage for ubuntu hardy
Bruce Cohenwrote: I am running sage-4.1-linux-Debian_GNU_Linux_5.0_lenny-i686-Linux on Ubuntu 8.04.1, kernel 2.6.24-19-generic. Thanks for th tip! I tried it and it failed, but it's probably because I ran it from the chroot jail that I use to build the custom live dvd. The kernel in the chroot is the same as the kernel outside, so I guess I'll have to repeat the process with a hardy machine. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
On Jul 19, 3:42 am, Jason Grout jason-s...@creativetrax.com wrote: What if you set SAGE_BROWSER to kde-open? That will open different programs, based on the format. I think it's similar to the apple open command. I did. kdvi was ultimately invoked with exactly the same result as above (displaying text describing the properties of the graphics object rather than displaying the graphics object itself). Here is what diagnostics are output: unknown program name(27186)/ ClientApp::doIt: Creating ClientApp kdeinit4: preparing to launch /opt/kde3/bin/kdvi sage: kbuildsycoca running... QApplication::notify: Unexpected null receiver I wonder whether David Joyner (see his response above in this thread) was running sage 4.1 when he tried my example. Or maybe or kdvi is different versions? Thanks again for everybody's responses. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Gnuplot installation problem
On Jul 19, 11:31 am, mourad gouicem gouicem.mou...@gmail.com wrote: Hello, I'm trying to install the optional package gnuplotpy-1.7.p3, but when I try to install it by typing ./sage -i gnuplotpy-1.7.p3, I get an error. The extraction finished successfully but the installation failed. Here is the traceback : Traceback (most recent call last): File setup.py, line 17, in module from __init__ import __version__ File /home/mourad/Telechargements/sage-3.4.2/spkg/build/ gnuplotpy-1.7.p3/src/__init__.py, line 167, in module from PlotItems import PlotItem, Func, File, Data, GridData File /home/mourad/Telechargements/sage-3.4.2/spkg/build/ gnuplotpy-1.7.p3/src/PlotItems.py, line 88 'with' : lambda self, with: self.set_string_option( ^ SyntaxError: invalid syntax Error installing gnuplotpy. I'm using sage 3.4.2 upgraded to 4.1. Thank you. It appears that the python upgrade to 2.6 broke the package. I think the new version of gnuplot.py (1.8) might work. You can try to install the new one directly using the python with Sage. You can get it directly from http://gnuplot-py.sourceforge.net/. Adam --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: primitive k-th root of unity
On a similar note, anybody know why I can't get sage to equate e^ (theta*I) == cos(theta) + I*sin(theta) ? I don't know. Sage uses Maxima. Does maxima know Euler's formula? I suppose that Sage knows Euler's formula because sage: var('x') x sage: real_part(e^(I*x)) e^(-imag_part(x))*cos(real_part(x)) but : sage: var('x') x sage: assume(imag_part(x)==0) sage: real_part(e^(I*x)) e^(-imag_part(x))*cos(real_part(x)) seems strange to me. Does someone know how to make Sage understand that x is real and that e^(i*x) = cos(x)+I*sin(x) ?? Good afternoon Laurent --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Gnuplot installation problem
Just to add a quick note. I installed gnuplot.py 1.8 and was able to run the included test.py. You will have to try it on your own code though. Adam --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Gnuplot installation problem
Thank you for your answer, Can you tell me more precisely how do I install it and what do you mean by You can try to install the new one directly using the python with Sage? I've downloaded gnuplot.py (1.8) and installed it by running python setup.py install, but this command installs the package in the python2.6 directory of my distribution, and (tell me if i'm wrong) sage uses a local installation of python. Can you tell me in which directory must I put the Gnuplot.py? Thank you On 19 juil, 18:40, MaxTheMouse maxthemo...@googlemail.com wrote: Just to add a quick note. I installed gnuplot.py 1.8 and was able to run the included test.py. You will have to try it on your own code though. Adam --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Gnuplot installation problem
On 7/19/09, mourad gouicem gouicem.mou...@gmail.com wrote: Thank you for your answer, Can you tell me more precisely how do I install it and what do you mean by You can try to install the new one directly using the python with Sage? I've downloaded gnuplot.py (1.8) and installed it by running python setup.py install, but this command installs the package in the python2.6 directory of my distribution, and (tell me if i'm wrong) Just do sage -python setup.py install sage uses a local installation of python. Can you tell me in which directory must I put the Gnuplot.py? Thank you On 19 juil, 18:40, MaxTheMouse maxthemo...@googlemail.com wrote: Just to add a quick note. I installed gnuplot.py 1.8 and was able to run the included test.py. You will have to try it on your own code though. Adam -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Gnuplot installation problem
Thank you very much, It works On 19 juil, 19:37, William Stein wst...@gmail.com wrote: On 7/19/09, mourad gouicem gouicem.mou...@gmail.com wrote: Thank you for your answer, Can you tell me more precisely how do I install it and what do you mean by You can try to install the new one directly using the python with Sage? I've downloaded gnuplot.py (1.8) and installed it by running python setup.py install, but this command installs the package in the python2.6 directory of my distribution, and (tell me if i'm wrong) Just do sage -python setup.py install sage uses a local installation of python. Can you tell me in which directory must I put the Gnuplot.py? Thank you On 19 juil, 18:40, MaxTheMouse maxthemo...@googlemail.com wrote: Just to add a quick note. I installed gnuplot.py 1.8 and was able to run the included test.py. You will have to try it on your own code though. Adam -- William Stein Associate Professor of Mathematics University of Washingtonhttp://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem building Sage 4.1 from source on CENTOS 4.7
2009/7/16 Dr. David Kirkby david.kir...@onetel.net: William Stein wrote: Install GCC =4.1.x. -- William Is that a requirement? Someone said yesterday 3.4 was ok. 3.4 used to be OK. The new ratpoints packages that Robert Miller introduced in Sage-4.x does not build with gcc-3.x, so as of right now, GCC = 4.x is a requirement. The right fix is to either change our prereq script, or fix ratpoints so that it builds with gcc-3.x again. If possible, the second option would be much better. Somebody tried yesterday to build on OpenSolaris with gcc 3.4.3 (compiler in /usr/sfw/bin) and it failed due to what I believe is an MPIR failure to detect the Sun linker. (The configure script thinks its the GNU liner). But if Sage needs = 4.1, it should bomb out at an early stage if that requirement is not met. dave -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
On Jul 16, 11:02 pm, linuxgus ka8...@amsat.org wrote: Hi all, If I DON'T use notebook and type a simple program like, sage: t,s=var('t,s') sage: show(laplace(exp(-3*t),t)) an evince window pops up with the error message Unable to open document File type TeX DVI document (application/x-dvi) is not supported prominently displayed. I guess it is an environment variable issue? Should the evince program be invoked? I am running 64-bit openSuSE 11.1, with kernel upgraded to 2.6.28.2. If I only use sage: laplace(exp(-3*t),t,s) then it works fine; I get the response 1/(s + 3) as I should, but it is in Matlabesque form and I would much prefer the textbook type of display. Of course, I can use notebook, but for small stuff, it is hardly worth the trouble. How about if you try sage: latex.pdflatex(True) first? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
On Sun, Jul 19, 2009 at 11:29 AM, linuxguska8...@amsat.org wrote: On Jul 19, 3:42 am, Jason Grout jason-s...@creativetrax.com wrote: What if you set SAGE_BROWSER to kde-open? That will open different programs, based on the format. I think it's similar to the apple open command. I did. kdvi was ultimately invoked with exactly the same result as above (displaying text describing the properties of the graphics object rather than displaying the graphics object itself). Here is what diagnostics are output: unknown program name(27186)/ ClientApp::doIt: Creating ClientApp kdeinit4: preparing to launch /opt/kde3/bin/kdvi sage: kbuildsycoca running... QApplication::notify: Unexpected null receiver I wonder whether David Joyner (see his response above in this thread) was running sage 4.1 when he tried my example. Or maybe or kdvi is different versions? Yes, I think it was 4.1.rc1. KDE has my desktop but it works fine for me under gnome as well (I rebooted into gnome and checked). Thanks again for everybody's responses. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] parallel in sage singular
Hi, I tried the @parallel decorator with Singular's reduce routine: basically, I passed a bunch of polynomials in a list. The result took *much* longer, unlike (say) the examples with factor(). sage: R.x,y = GF(32003) sage: p = 0 sage: for i in range(100): : p = p + x^(2*i)*y^i sage: @parallel() def reduceme(p, B): return p.reduce(B) : sage: %time _ = list( reduceme([(p, F) for each in range(30)])) CPU times: user 0.22 s, sys: 0.05 s, total: 0.26 s Wall time: 0.33 s sage: %time _ = [ reduceme(p, F) for each in range(30)] CPU times: user 0.10 s, sys: 0.00 s, total: 0.10 s Wall time: 0.10 s The machine I tried this on has 4 cores, so it isn't for a lack of processors. I've had similar results on other machines. Is there a technical reason for this (Singular related), or am I doing something wrong (Sage and/or John Perry related)? regards john perry --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: numerical eigenforms
2009/7/15 rje rev...@ucsd.edu: What is going on here? Does this only work for even weights? rje sage: n=numerical_eigenforms(15,3);n.ap(2) [] Type sage: numerical_eigenforms? and read it. In particular, the first input is the group and if a number N is given that it just defaults to Gamma0(N). So the above is correctly giving you the eigenvalues for Gamma0(15) and odd weight. sage: n=numerical_eigenforms(Gamma1(15),3);n.ap(2) [-5.0 - 1.99021290795e-14*I, -3.0 + 2.40206990184e-13*I, 5.0 + 3.72521051072e-12*I, 1.001 - 4.0*I, 0.9998 + 4.0*I, -3.0 - 3.86606026001e-12*I, 0.224744871392 - 0.224744871392*I, 0.224744871392 + 0.224744871392*I, -2.22474487139 - 2.22474487139*I, 1.0 - 4.0*I, -3.48610029732e-14 - 2.2360679775*I, -1.0 + 1.43583146453e-14*I, -4.27435864481e-14 + 2.2360679775*I, 1.0 + 4.0*I, -2.22474487139 + 2.22474487139*I, 1.0 - 1.21528935033e-14*I] William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Square root problem
isqrt returns the integer part (floor) of a square root. On Jul 17, 7:33 am, Santanu Sarkar sarkar.santanu@gmail.com wrote: Thank you. 2009/7/16 Marshall Hampton hampto...@gmail.com I'm not quite sure what you want, but for example sage: B = sqrt(1000) sage: floor(B) 31 would give you the integer part (rounded down since its floor). The round() function might be what you want instead (round(B) is 32.0). -Marshall Hampton On Jul 16, 10:05 am, Santanu Sarkar sarkar.santanu@gmail.com wrote: Suppose we want to find just integer part of square root 1000. Say B=sqrt(1000). Then how can I use digits function i,e. B.digits() to find the bits of B. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Problem with show
On Jul 19, 2:54 pm, John H Palmieri jhpalmier...@gmail.com wrote: How about if you try sage: latex.pdflatex(True) first? --I did set latex.pdflatex(True) and set the SAGE_BROWSER environment variable to kde-open. This time a PDF reader popped up (as it should) but the content was still the same! No actual graph, but rather the word SAGE and below Line2D(_line1) (without the quotes) as before! It seems to me that Sage passes the an ASCII description of the PROPERTIES of the object to the PDF or whatever reader instead of the object itself. Gus --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---