[sage-support] Solving an ODE and simplifying the result
This post was prepared to be upload to ask.sagemath.org, but I got a warning "Spam was detected on your post, sorry for if this is a mistake" that forbids me to post the question. - I'm interested in solving the differential equation $$3 h' + 3 h^2 = c_1,$$ where $c_1$ is a positive real number. var('t') var('c1', latex_name=r'c_1') h = function('h')(t) eq = -3*h^2 + c1 - 3*diff(h, t) eq_sol = desolve(eq, h, ivar=t, contrib_ode=True) The above code works, but it's not solved explicitly for $h$, so h_sol = solve(eq_sol, h) h_sol = h_sol[0] h_sol This gives something like $$h\left(t\right) = \frac{\sqrt{3} \sqrt{c_{1}} {\left(e^{\left(\frac{2}{3} \, \sqrt{3} C \sqrt{c_{1}} + \frac{2}{3} \, \sqrt{3} \sqrt{c_{1}} t\right)} + 1\right)}}{3 \, {\left(e^{\left(\frac{2}{3} \, \sqrt{3} C \sqrt{c_{1}} + \frac{2}{3} \, \sqrt{3} \sqrt{c_{1}} t\right)} - 1\right)}},$$ in sage notation (non-LaTeX) it starts like h(t) == 1/3*sqrt(3)*sqrt(c1)* ... **Question 1:** Is there a way to assing to the solution (i.e. `h_sol`) the RHS of the above? without the `h(t) == ` part. I had to assign by hand (it is ease, but it would be nice to automatize the assignation) var('C')# the integration constant introduced above h_sol = 1/3*sqrt(3)*sqrt(c1)* ... Then, by simply looking at the solution it is clear that it can be simplified. I tried things like h_sol = h_sol.canonicalize_radical() h_sol = h_sol.collect_common_factors() h_sol = h_sol.simplify_rectform(complexity_measure = None) but none of them returns the expected result, which could be obtained from Mathematica's kernel mathematica("DSolve[3*h'[t] + 3*h[t]^2 == C[1], h[t], t]//FullSimplify") $$ \sqrt{\frac{c_1}{3}} \tanh\left( \sqrt{\frac{c_1}{3}} (t - 3 c_2) \right) $$ **Question 2:** How could the expression `h_sol` be manipulated to obtain the hyperbolic tangent? -- 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 https://groups.google.com/group/sage-support. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/f83d589a-c65f-4eb0-9075-b3e3f6dc6a20%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] find_local_maximum of the absolute value of a polynomial with complex coefficients
Oops! a piece of the code is missing. The complete code is below. n=6 # polynomial order listOmega=[] for i in range(n+1): listOmega.append(i/n) listPhases=[0] for i in range(1,n+1): listPhases.append(listOmega[i]^2/2 + 9/2*listOmega[i]) Alpha0=listOmega[1]/tan(listPhases[1]) listAlpha=[Alpha0] for i in range(1,n): firstline=listOmega[i+1]^2-listOmega[i]^2 lastline=Alpha0-listOmega[i+1]/tan(listPhases[i+1]) ic=1 while ic > Sorry for the delay, I took some time to put the code to work. However, > there's something strange. > > Below is a "concise" version of my code. The strange thing that I noticed > is that the *find_local_maximum* function returns a polynomial as the > maximum value, and changing the tolerance (*tol*) argument of the > function do not change the result. You can see in the graph that the > maximum point is slightly away from the calculated point. > > Thank you for the help! > > n=6 # polynomial order > listOmega=[] > for i in range(n+1): > listOmega.append(i/n) > > listPhases=[0] > for i in range(1,n+1): > listPhases.append(listOmega[i]^2/2 + 9/2*listOmega[i]) > > Alpha0=listOmega[1]/tan(listPhases[1]) > listAlpha=[Alpha0] > for i in range(1,n): > firstline=listOmega[i+1]^2-listOmega[i]^2 > lastline=Alpha0-listOmega[i+1]/tan(listPhases[i+1]) > ic=1 > while ic lastline=listAlpha[ic]-((listOmega[i+1]^2 - > listOmega[ic]^2)/lastline) > ic+=1 > listAlpha.append(firstline/lastline) > > var('s,omega') > H=[1,s + listAlpha[0]] > for i in range(2,n+1): > H.append(listAlpha[i-1]*H[i-1] + (s^2 + listOmega[i-1]^2)*H[i-2]) > > f=sqrt(H[6](s=I*omega)*H[6](s=-I*omega)); > g=[] > for i in range(n+1): > g.append(f*chebyshev_T(i,omega)/sqrt(1-omega^2)) > > up=0 > for i in range(n+1): > up=up + c[i]*chebyshev_T(i,omega) > > hmod(omega)=(H[6](s=I*omega)).polynomial(CC) > den=lambda omega: up/abs(hmod(omega)) > norm_factor=find_local_maximum(den,-1,1,tol=1e-18); norm_factor > print("Point where local maximum occurs: " + str(norm_factor[1])) > print("Local maximum: " + str(norm_factor[0](omega=norm_factor[1]).n())) > plot(den(omega),-1,1) > > On Friday, January 12, 2018 at 4:51:32 PM UTC+1, Vegard Lima wrote: >> >> Hi >> >> On Fri, Jan 12, 2018 at 4:10 PM, João Alberto de França Ferreira >> wrote: >> > Is there a way to compute the local maximum of the absolute value of a >> > polynomial with complex coefficients? the below snippet should >> exemplify my >> > problem. >> ... >> >> Maybe a trick like this works: >> f(x) = x^2 + 2*I*x + 2 >> g = lambda x: abs(f(x)) >> find_local_maximum(g,-1,1) >> >> this gives >> (3.6055511727769516, 0.9996297566163) >> >> while >> find_local_maximum(abs(f(x)),-1,1) >> gives >> TypeError: unable to coerce to a real number >> >> The difference is that one is a python function while >> the other one is a SymbolicExpression, not sure >> why one works and the other doesn't. >> >> >> Thanks, >> -- >> Vegard >> > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] find_local_maximum of the absolute value of a polynomial with complex coefficients
Thank you! maybe the code on the other message will serve as an example/test. On Sunday, January 14, 2018 at 8:11:10 AM UTC+1, Ralf Stephan wrote: > > > > On Friday, January 12, 2018 at 4:51:32 PM UTC+1, Vegard Lima wrote: >> >> TypeError: unable to coerce to a real number >> > > Thanks. I opened > https://trac.sagemath.org/ticket/24536 > https://trac.sagemath.org/ticket/24537 > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] find_local_maximum of the absolute value of a polynomial with complex coefficients
Sorry for the delay, I took some time to put the code to work. However, there's something strange. Below is a "concise" version of my code. The strange thing that I noticed is that the *find_local_maximum* function returns a polynomial as the maximum value, and changing the tolerance (*tol*) argument of the function do not change the result. You can see in the graph that the maximum point is slightly away from the calculated point. Thank you for the help! n=6 # polynomial order listOmega=[] for i in range(n+1): listOmega.append(i/n) listPhases=[0] for i in range(1,n+1): listPhases.append(listOmega[i]^2/2 + 9/2*listOmega[i]) Alpha0=listOmega[1]/tan(listPhases[1]) listAlpha=[Alpha0] for i in range(1,n): firstline=listOmega[i+1]^2-listOmega[i]^2 lastline=Alpha0-listOmega[i+1]/tan(listPhases[i+1]) ic=1 while ic > Hi > > On Fri, Jan 12, 2018 at 4:10 PM, João Alberto de França Ferreira > > wrote: > > Is there a way to compute the local maximum of the absolute value of a > > polynomial with complex coefficients? the below snippet should exemplify > my > > problem. > ... > > Maybe a trick like this works: > f(x) = x^2 + 2*I*x + 2 > g = lambda x: abs(f(x)) > find_local_maximum(g,-1,1) > > this gives > (3.6055511727769516, 0.9996297566163) > > while > find_local_maximum(abs(f(x)),-1,1) > gives > TypeError: unable to coerce to a real number > > The difference is that one is a python function while > the other one is a SymbolicExpression, not sure > why one works and the other doesn't. > > > Thanks, > -- > Vegard > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] find_local_maximum of the absolute value of a polynomial with complex coefficients
Hi! Is there a way to compute the local maximum of the absolute value of a polynomial with complex coefficients? the below snippet should exemplify my problem. var('omega') plot(abs(-omega^6 + 2.52349407705763*I*omega^5 + 4.57149144245722*omega^4 - 4.95095921397014*I*omega^3 - 3.70209076479630*omega^2 + 1.64521458323097*I*omega + 0.361999139300718),-1,1) find_local_maximum(abs(-omega^6 + 2.52349407705763*I*omega^5 + 4.57149144245722*omega^4 - 4.95095921397014*I*omega^3 - 3.70209076479630*omega^2 + 1.64521458323097*I*omega + 0.361999139300718),-1,1) Mathematica is able to compute this without problems. Thank you! -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: [sage 7.4] Error building OpenBlas
Yes, thank you! This is what I made. On Friday, February 3, 2017 at 8:52:30 AM UTC+1, Dima Pasechnik wrote: > > You can always create a symbolic link in /usr/local/bin/ to some other > location. > > sudo ln -sf /blah/foo/sage /usr/local/bin/sage > > after building sage in /blah/foo/ > > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: [sage 7.4] Error building OpenBlas
Ok, thank you! I would be glad if you could explain how can we put sage in, for example, /usr/local/ or /opt/, if sage force us to compile without root privileges. On Thursday, February 2, 2017 at 11:50:14 PM UTC+1, John H Palmieri wrote: > > > > On Thursday, February 2, 2017 at 1:53:43 PM UTC-8, João Alberto Ferreira > wrote: >> >> Well, I read somewhere about this procedure of moving the directory >> before starting sage, but the Installation Manual seems to tell the same >> thing. >> >> "The directory where you built Sage is *NOT* hardcoded. You should be >> able to safely move or rename that directory. (It’s a bug if this is not >> the case.)" >> >> > >> Chapter 2 describes this same procedure of moving the directory, but for >> the precompiled binaries, that for me is the same thing. >> > > We should fix the documentation. See > https://trac.sagemath.org/ticket/22294. > > John > > > >> >> But, in fact, what I experienced was what you said. >> >> On Thursday, February 2, 2017 at 9:28:17 PM UTC+1, HG wrote: >>> >>> I think it has been said on the list : Keep sage where you compiled it ! >>> >>> If you want to change it you have to compile source again ! >>> >>> what I do because I work with git : >>> >>> I make a dir git >>> >>> I compile it there and after I link sage in /usr/bin/sage >>> >>> sudo ln -s /path where is sage/sage /usr/bin/sage >>> >>> >>> >>> Le 02/02/2017 à 20:43, João Alberto Ferreira a écrit : >>> >>> Hi! >>> >>> I just removed "/home/mmsim/tools/lib/64bit" from the LD_LIBRARY_PATH >>> environment variable and sage compiled. >>> >>> I compiled it in my home directory and moved it to /usr/local/ before >>> starting it, and created a symbolic link in /usr/local/bin/, but it shows me >>> >>> python: error while loading shared libraries: libpython2.7.so.1.0: >>> cannot open shared object file: No such file or directory >>> >>> It just works in the place where I compiled it. I will leave the things >>> like that, but I'm curious to know why it do not work. Isn't that correct? >>> Do I Have made something wrong? >>> >>> Thank you! >>> >>> On Thursday, February 2, 2017 at 12:14:51 PM UTC+1, Dima Pasechnik >>> wrote: >>>> >>>> >>>> >>>> On Thursday, February 2, 2017 at 10:36:41 AM UTC, João Alberto Ferreira >>>> wrote: >>>>> >>>>> >>>>> >>>>> On Wednesday, February 1, 2017 at 7:24:56 PM UTC+1, Dima Pasechnik >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> On Wednesday, February 1, 2017 at 6:00:25 PM UTC, João Alberto >>>>>> Ferreira wrote: >>>>>>> >>>>>>> Well, not yet. >>>>>>> >>>>>>> openblas has compiled successfully. The problem now is with R. The R >>>>>>> log follows. >>>>>>> >>>>>>> Apparently it needs libgomp-4 and if I understood correctrly, it >>>>>>> found an older version. But the libgomp-4 is installed >>>>>>> >>>>>>> [defrancaferr_joa@javel sage-7.5.1]$ rpm -q libgomp >>>>>>> libgomp-4.4.7-17.el6.x86_64 >>>>>>> >>>>>> >>>>>> your log says: >>>>>> /home/mmsim/tools/lib/64bit/libgomp.so.1 : version `GOMP_4.0' not >>>>>> found >>>>>> >>>>>> you have some rogue stuff in your PATH or something (LD_LIBRARY_PATH >>>>>> ?) >>>>>> >>>>> >>>>> The environment variables are at the beginning of the whole log file >>>>> >>>> >>>> OK, I overlooked this... >>>> >>>> >>>>> >>>>> >>>>> LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib64:/opt/rh/devtoolset-3/root/usr/lib:/usr/local/lib:/home/mmsim/tools/lib/64bit >>>>> >>>>> >>>>> PATH=/home/defrancaferr_joa/sage-7.5.1/build/bin:/home/defrancaferr_joa/sage-7.5.1/src/bin:/home/defrancaferr_joa/sage-7.5.1/local/bin:/opt/rh/devtoolset-3/root/usr/bin:/home/xfab/xkit/x_all/cadence/xenv:/usr/local/ADS2014_01/bin:/usr/local/texl
Re: [sage-support] Re: [sage 7.4] Error building OpenBlas
Well, I read somewhere about this procedure of moving the directory before starting sage, but the Installation Manual seems to tell the same thing. "The directory where you built Sage is *NOT* hardcoded. You should be able to safely move or rename that directory. (It’s a bug if this is not the case.)" Chapter 2 describes this same procedure of moving the directory, but for the precompiled binaries, that for me is the same thing. But, in fact, what I experienced was what you said. On Thursday, February 2, 2017 at 9:28:17 PM UTC+1, HG wrote: > > I think it has been said on the list : Keep sage where you compiled it ! > > If you want to change it you have to compile source again ! > > what I do because I work with git : > > I make a dir git > > I compile it there and after I link sage in /usr/bin/sage > > sudo ln -s /path where is sage/sage /usr/bin/sage > > > > Le 02/02/2017 à 20:43, João Alberto Ferreira a écrit : > > Hi! > > I just removed "/home/mmsim/tools/lib/64bit" from the LD_LIBRARY_PATH > environment variable and sage compiled. > > I compiled it in my home directory and moved it to /usr/local/ before > starting it, and created a symbolic link in /usr/local/bin/, but it shows me > > python: error while loading shared libraries: libpython2.7.so.1.0: cannot > open shared object file: No such file or directory > > It just works in the place where I compiled it. I will leave the things > like that, but I'm curious to know why it do not work. Isn't that correct? > Do I Have made something wrong? > > Thank you! > > On Thursday, February 2, 2017 at 12:14:51 PM UTC+1, Dima Pasechnik wrote: >> >> >> >> On Thursday, February 2, 2017 at 10:36:41 AM UTC, João Alberto Ferreira >> wrote: >>> >>> >>> >>> On Wednesday, February 1, 2017 at 7:24:56 PM UTC+1, Dima Pasechnik >>> wrote: >>>> >>>> >>>> >>>> On Wednesday, February 1, 2017 at 6:00:25 PM UTC, João Alberto Ferreira >>>> wrote: >>>>> >>>>> Well, not yet. >>>>> >>>>> openblas has compiled successfully. The problem now is with R. The R >>>>> log follows. >>>>> >>>>> Apparently it needs libgomp-4 and if I understood correctrly, it found >>>>> an older version. But the libgomp-4 is installed >>>>> >>>>> [defrancaferr_joa@javel sage-7.5.1]$ rpm -q libgomp >>>>> libgomp-4.4.7-17.el6.x86_64 >>>>> >>>> >>>> your log says: >>>> /home/mmsim/tools/lib/64bit/libgomp.so.1 : version `GOMP_4.0' not found >>>> >>>> you have some rogue stuff in your PATH or something (LD_LIBRARY_PATH ?) >>>> >>> >>> The environment variables are at the beginning of the whole log file >>> >> >> OK, I overlooked this... >> >> >>> >>> >>> LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib64:/opt/rh/devtoolset-3/root/usr/lib:/usr/local/lib:/home/mmsim/tools/lib/64bit >>> >>> >>> PATH=/home/defrancaferr_joa/sage-7.5.1/build/bin:/home/defrancaferr_joa/sage-7.5.1/src/bin:/home/defrancaferr_joa/sage-7.5.1/local/bin:/opt/rh/devtoolset-3/root/usr/bin:/home/xfab/xkit/x_all/cadence/xenv:/usr/local/ADS2014_01/bin:/usr/local/texlive/2016/bin/x86_64-linux:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/defrancaferr_joa/bin:/home/eclipse:/home/matlab/bin:/home/altera/15.0/quartus/bin:/home/altera/15.0/quartus/sopc_builder/bin:/home/altera/15.0/quartus/bin:/home/ic6.1/tools/bin:/home/ic6.1/tools/dfII/bin:/home/ic6.1/tools/plot/bin:/home/ic6.1/tools/dracula/bin:/home/assura/tools/bin:/home/assura/tools/assura/bin:/home/AMS_4.10/cds/bin:/home/AMS_4.10/programs/bin:/home/mmsim/tools/bin:/home/incisiv/tools/bin:/home/incisiv/tools/dfII/bin:/home/rc/tools/bin:/home/edi/tools/bin:/home/et/tools/bin:/home/ets/tools/bin:/home/ext/tools/bin:/home/confrml/tools/bin:/home/ctos/tools/bin:/home/pve:/home/pve/tools/bin >>> >>> >> yes, this is definitely the problem. >> You can just unset these for the particular invocation of make, i.e. >> >> export MAKE="make -j8" # or whatever numer of cores you have on the box >> PATH="/bin:/usr/bin:/sbin:/usr/sbin" LD_LIBRARY_PATH="" $MAKE >> >> Note that these wrong libraries could have been already selected by other >> parts that are already built, and this may lead to hard to understand >> crashes etc. >> >> That is, I would rebuild from scratch, i.e. do first of all >> >>
[sage-support] Re: [sage 7.4] Error building OpenBlas
Hi! I just removed "/home/mmsim/tools/lib/64bit" from the LD_LIBRARY_PATH environment variable and sage compiled. I compiled it in my home directory and moved it to /usr/local/ before starting it, and created a symbolic link in /usr/local/bin/, but it shows me python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory It just works in the place where I compiled it. I will leave the things like that, but I'm curious to know why it do not work. Isn't that correct? Do I Have made something wrong? Thank you! On Thursday, February 2, 2017 at 12:14:51 PM UTC+1, Dima Pasechnik wrote: > > > > On Thursday, February 2, 2017 at 10:36:41 AM UTC, João Alberto Ferreira > wrote: >> >> >> >> On Wednesday, February 1, 2017 at 7:24:56 PM UTC+1, Dima Pasechnik wrote: >>> >>> >>> >>> On Wednesday, February 1, 2017 at 6:00:25 PM UTC, João Alberto Ferreira >>> wrote: >>>> >>>> Well, not yet. >>>> >>>> openblas has compiled successfully. The problem now is with R. The R >>>> log follows. >>>> >>>> Apparently it needs libgomp-4 and if I understood correctrly, it found >>>> an older version. But the libgomp-4 is installed >>>> >>>> [defrancaferr_joa@javel sage-7.5.1]$ rpm -q libgomp >>>> libgomp-4.4.7-17.el6.x86_64 >>>> >>> >>> your log says: >>> /home/mmsim/tools/lib/64bit/libgomp.so.1 : version `GOMP_4.0' not found >>> >>> you have some rogue stuff in your PATH or something (LD_LIBRARY_PATH ?) >>> >> >> The environment variables are at the beginning of the whole log file >> > > OK, I overlooked this... > > >> >> >> LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib64:/opt/rh/devtoolset-3/root/usr/lib:/usr/local/lib:/home/mmsim/tools/lib/64bit >> >> >> PATH=/home/defrancaferr_joa/sage-7.5.1/build/bin:/home/defrancaferr_joa/sage-7.5.1/src/bin:/home/defrancaferr_joa/sage-7.5.1/local/bin:/opt/rh/devtoolset-3/root/usr/bin:/home/xfab/xkit/x_all/cadence/xenv:/usr/local/ADS2014_01/bin:/usr/local/texlive/2016/bin/x86_64-linux:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/defrancaferr_joa/bin:/home/eclipse:/home/matlab/bin:/home/altera/15.0/quartus/bin:/home/altera/15.0/quartus/sopc_builder/bin:/home/altera/15.0/quartus/bin:/home/ic6.1/tools/bin:/home/ic6.1/tools/dfII/bin:/home/ic6.1/tools/plot/bin:/home/ic6.1/tools/dracula/bin:/home/assura/tools/bin:/home/assura/tools/assura/bin:/home/AMS_4.10/cds/bin:/home/AMS_4.10/programs/bin:/home/mmsim/tools/bin:/home/incisiv/tools/bin:/home/incisiv/tools/dfII/bin:/home/rc/tools/bin:/home/edi/tools/bin:/home/et/tools/bin:/home/ets/tools/bin:/home/ext/tools/bin:/home/confrml/tools/bin:/home/ctos/tools/bin:/home/pve:/home/pve/tools/bin >> >> > yes, this is definitely the problem. > You can just unset these for the particular invocation of make, i.e. > > export MAKE="make -j8" # or whatever numer of cores you have on the box > PATH="/bin:/usr/bin:/sbin:/usr/sbin" LD_LIBRARY_PATH="" $MAKE > > Note that these wrong libraries could have been already selected by other > parts that are already built, and this may lead to hard to understand > crashes etc. > > That is, I would rebuild from scratch, i.e. do first of all > > make distclean > > HTH > Dima > > >> [defrancaferr_joa@javel sage-7.5.1]$ find >> /opt/rh/devtoolset-3/root/usr/lib64/ -name "libgomp*" -exec ls -ls {} \; >> [defrancaferr_joa@javel sage-7.5.1]$ find >> /opt/rh/devtoolset-3/root/usr/lib/ -name "libgomp*" -exec ls -ls {} \; >> 4 -rw-r--r--. 1 root root 82 3 oct. 2015 >> /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.so >> 4 -rw-r--r--. 1 root root 169 3 oct. 2015 >> /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.spec >> 176 -rw-r--r--. 1 root root 178766 3 oct. 2015 >> /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.a >> 4 -rw-r--r--. 1 root root 78 3 oct. 2015 >> /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/32/libgomp.so >> 140 -rw-r--r--. 1 root root 143328 3 oct. 2015 >> /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/32/libgomp.a >> [defrancaferr_joa@javel sage-7.5.1]$ find /usr/local/lib -name "libgomp*" >> -exec ls -ls {} \; >> [defrancaferr_joa@javel sage-7.5.1]$ find /home/mmsim/tools/lib/64bit >> -name "libgomp*" -exec ls -ls {} \; >> 0 lrwxrwxrwx. 1 cade
[sage-support] Re: [sage 7.4] Error building OpenBlas
On Wednesday, February 1, 2017 at 7:24:56 PM UTC+1, Dima Pasechnik wrote: > > > > On Wednesday, February 1, 2017 at 6:00:25 PM UTC, João Alberto Ferreira > wrote: >> >> Well, not yet. >> >> openblas has compiled successfully. The problem now is with R. The R log >> follows. >> >> Apparently it needs libgomp-4 and if I understood correctrly, it found an >> older version. But the libgomp-4 is installed >> >> [defrancaferr_joa@javel sage-7.5.1]$ rpm -q libgomp >> libgomp-4.4.7-17.el6.x86_64 >> > > your log says: > /home/mmsim/tools/lib/64bit/libgomp.so.1 : version `GOMP_4.0' not found > > you have some rogue stuff in your PATH or something (LD_LIBRARY_PATH ?) > The environment variables are at the beginning of the whole log file LD_LIBRARY_PATH=/opt/rh/devtoolset-3/root/usr/lib64:/opt/rh/devtoolset-3/root/usr/lib:/usr/local/lib:/home/mmsim/tools/lib/64bit PATH=/home/defrancaferr_joa/sage-7.5.1/build/bin:/home/defrancaferr_joa/sage-7.5.1/src/bin:/home/defrancaferr_joa/sage-7.5.1/local/bin:/opt/rh/devtoolset-3/root/usr/bin:/home/xfab/xkit/x_all/cadence/xenv:/usr/local/ADS2014_01/bin:/usr/local/texlive/2016/bin/x86_64-linux:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/defrancaferr_joa/bin:/home/eclipse:/home/matlab/bin:/home/altera/15.0/quartus/bin:/home/altera/15.0/quartus/sopc_builder/bin:/home/altera/15.0/quartus/bin:/home/ic6.1/tools/bin:/home/ic6.1/tools/dfII/bin:/home/ic6.1/tools/plot/bin:/home/ic6.1/tools/dracula/bin:/home/assura/tools/bin:/home/assura/tools/assura/bin:/home/AMS_4.10/cds/bin:/home/AMS_4.10/programs/bin:/home/mmsim/tools/bin:/home/incisiv/tools/bin:/home/incisiv/tools/dfII/bin:/home/rc/tools/bin:/home/edi/tools/bin:/home/et/tools/bin:/home/ets/tools/bin:/home/ext/tools/bin:/home/confrml/tools/bin:/home/ctos/tools/bin:/home/pve:/home/pve/tools/bin [defrancaferr_joa@javel sage-7.5.1]$ find /opt/rh/devtoolset-3/root/usr/lib64/ -name "libgomp*" -exec ls -ls {} \; [defrancaferr_joa@javel sage-7.5.1]$ find /opt/rh/devtoolset-3/root/usr/lib/ -name "libgomp*" -exec ls -ls {} \; 4 -rw-r--r--. 1 root root 82 3 oct. 2015 /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.so 4 -rw-r--r--. 1 root root 169 3 oct. 2015 /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.spec 176 -rw-r--r--. 1 root root 178766 3 oct. 2015 /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgomp.a 4 -rw-r--r--. 1 root root 78 3 oct. 2015 /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/32/libgomp.so 140 -rw-r--r--. 1 root root 143328 3 oct. 2015 /opt/rh/devtoolset-3/root/usr/lib/gcc/x86_64-redhat-linux/4.9.2/32/libgomp.a [defrancaferr_joa@javel sage-7.5.1]$ find /usr/local/lib -name "libgomp*" -exec ls -ls {} \; [defrancaferr_joa@javel sage-7.5.1]$ find /home/mmsim/tools/lib/64bit -name "libgomp*" -exec ls -ls {} \; 0 lrwxrwxrwx. 1 cadence softs 16 15 janv. 2016 /home/mmsim/tools/lib/64bit/libgomp.so.1 -> libgomp.so.1.0.0 276 -rwxr-xr-x. 1 cadence softs 281302 26 sept. 2011 /home/mmsim/tools/lib/64bit/libgomp.so.1.0.0 0 lrwxrwxrwx. 1 cadence softs 16 15 janv. 2016 /home/mmsim/tools/lib/64bit/libgomp.so -> libgomp.so.1.0.0 > > What is this /home/mmsim and what does it have to do with your account > (defrancaferr_joa, I suppose)? > mmsim (multi-mode simulator) is an electronic circuit simulator. I'm intended to use this to design an integrated circuit, but this folder houses an older version of the simulator (version 14). The newer version resides in /home/mmsim15. In fact, this machine is a new one, which the system administrator installed by cloning the disk of another machine. Now, I'm configuring it to my needs through sudo, but things seems to be organized in an odd manner (like this simulator in the \home directory) It seems that the configuration of the integrated circuit design tools are messed up and I need, at least, organize the environment variables before compile sage. I think I need to edit the .bash_profile (appended). What do you think? > (It finds this stuff there first, and tries to use it...) > > > >> On Wednesday, February 1, 2017 at 5:56:44 PM UTC+1, João Alberto Ferreira >> wrote: >>> >>> Thank you! >>> >>> I've done: >>> >>> [defrancaferr_joa@javel ~]$ sudo yum install centos-release-scl >>> [defrancaferr_joa@javel ~]$ sudo yum install devtoolset-3-toolchain >>> [defrancaferr_joa@javel ~]$ scl enable devtoolset-3 bash >>> [defrancaferr_joa@javel ~]$ as --version >>> Assembleur GNU version 2.24 >>> Copyright 2013 Free Software Foundation, Inc. >>> Ce logiciel est libre; vous pouvez le redistribuer selon les termes de
[sage-support] Re: [sage 7.4] Error building OpenBlas
Well, not yet. openblas has compiled successfully. The problem now is with R. The R log follows. Apparently it needs libgomp-4 and if I understood correctrly, it found an older version. But the libgomp-4 is installed [defrancaferr_joa@javel sage-7.5.1]$ rpm -q libgomp libgomp-4.4.7-17.el6.x86_64 On Wednesday, February 1, 2017 at 5:56:44 PM UTC+1, João Alberto Ferreira wrote: > > Thank you! > > I've done: > > [defrancaferr_joa@javel ~]$ sudo yum install centos-release-scl > [defrancaferr_joa@javel ~]$ sudo yum install devtoolset-3-toolchain > [defrancaferr_joa@javel ~]$ scl enable devtoolset-3 bash > [defrancaferr_joa@javel ~]$ as --version > Assembleur GNU version 2.24 > Copyright 2013 Free Software Foundation, Inc. > Ce logiciel est libre; vous pouvez le redistribuer selon les termes de la > version 3 de la licence GNU General Public License ou suivante. > Ce programme n'est couvert par AUCUNE garantie. > Cet assembleur a été configuré pour la cible « x86_64-redhat-linux ». > > Let's see if it will work. > > > > On Wednesday, February 1, 2017 at 5:27:36 PM UTC+1, Dima Pasechnik wrote: >> >> >> >> On Wednesday, February 1, 2017 at 3:52:05 PM UTC, João Alberto Ferreira >> wrote: >>> >>> Hi! >>> >>> Here it is the command output. >>> >>> [defrancaferr_joa@javel ~]$ as --version >>> GNU assembler version 2.20.51.0.2-5.44.el6 20100205 >>> Copyright 2009 Free Software Foundation, Inc. >>> >> >> Thanks, this explains your problem. Your assembler is 7 years old, and >> your CPU >> is only 4 years old, if not newer. You are building with (sage-supplied) >> gcc 4.9, which issues correct assembler commands for your CPU. >> But your assembler does not understand some of them, as it is too old. >> >> Why Centos is so lame in this respect, we've seen many reports like >> this... >> You should upgrade your toolchain so that your assembler fully supports >> you CPU. >> >> HTH, >> Dima >> >> >> >>> This program is free software; you may redistribute it under the terms of >>> the GNU General Public License version 3 or later. >>> This program has absolutely no warranty. >>> This assembler was configured for a target of `x86_64-redhat-linux'. >>> >>> On Wednesday, February 1, 2017 at 12:05:22 PM UTC+1, Dima Pasechnik >>> wrote: >>>> >>>> please post the output of >>>> >>>> as --version >>>> >>>> on the system. I guess it is too old to understand the whole range of >>>> assembler commands for your CPU. >>>> >>>> >>>> On Wednesday, February 1, 2017 at 10:09:27 AM UTC, João Alberto >>>> Ferreira wrote: >>>>> >>>>> Hi! >>>>> >>>>> I have tried to compile sagemath under a CentOS 6.8 machine, as the >>>>> binaries for Fedora do not work. The installation halted with an error >>>>> while building OpenBlas. Made the error is due to the machine CPU, as >>>>> discussed in https://github.com/JuliaLang/julia/issues/7653, but I >>>>> have little experience in this. Part of the installation log is attached. >>>>> I >>>>> updated the operating system and want to try build Sage again. Does >>>>> anyone >>>>> have any sugestion? >>>>> >>>>> It seems that all developing tools are installed, as can be seen below >>>>> >>>>> [defrancaferr_joa@javel ~]$ rpm -q perl-ExtUtils-MakeMaker >>>>> perl-ExtUtils-MakeMaker-6.55-141.el6_7.1.x86_64 >>>>> [defrancaferr_joa@javel ~]$ which perl >>>>> /usr/bin/perl >>>>> [defrancaferr_joa@javel ~]$ rpm -q binutils >>>>> binutils-2.20.51.0.2-5.44.el6.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q gcc >>>>> gcc-4.4.7-17.el6.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q make >>>>> make-3.81-23.el6.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q m4 >>>>> m4-1.4.13-5.el6.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q perl >>>>> perl-5.10.1-141.el6_7.1.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q tar >>>>> tar-1.23-15.el6_8.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q git >>>>> git-1.7.1-4.el6_7.1.x86_64 >>>>> [defrancaferr_joa@javel ~]$ rpm -q gcc-c++ >>>>> gcc-c++-4.4.
[sage-support] Re: [sage 7.4] Error building OpenBlas
Thank you! I've done: [defrancaferr_joa@javel ~]$ sudo yum install centos-release-scl [defrancaferr_joa@javel ~]$ sudo yum install devtoolset-3-toolchain [defrancaferr_joa@javel ~]$ scl enable devtoolset-3 bash [defrancaferr_joa@javel ~]$ as --version Assembleur GNU version 2.24 Copyright 2013 Free Software Foundation, Inc. Ce logiciel est libre; vous pouvez le redistribuer selon les termes de la version 3 de la licence GNU General Public License ou suivante. Ce programme n'est couvert par AUCUNE garantie. Cet assembleur a été configuré pour la cible « x86_64-redhat-linux ». Let's see if it will work. On Wednesday, February 1, 2017 at 5:27:36 PM UTC+1, Dima Pasechnik wrote: > > > > On Wednesday, February 1, 2017 at 3:52:05 PM UTC, João Alberto Ferreira > wrote: >> >> Hi! >> >> Here it is the command output. >> >> [defrancaferr_joa@javel ~]$ as --version >> GNU assembler version 2.20.51.0.2-5.44.el6 20100205 >> Copyright 2009 Free Software Foundation, Inc. >> > > Thanks, this explains your problem. Your assembler is 7 years old, and > your CPU > is only 4 years old, if not newer. You are building with (sage-supplied) > gcc 4.9, which issues correct assembler commands for your CPU. > But your assembler does not understand some of them, as it is too old. > > Why Centos is so lame in this respect, we've seen many reports like this... > You should upgrade your toolchain so that your assembler fully supports > you CPU. > > HTH, > Dima > > > >> This program is free software; you may redistribute it under the terms of >> the GNU General Public License version 3 or later. >> This program has absolutely no warranty. >> This assembler was configured for a target of `x86_64-redhat-linux'. >> >> On Wednesday, February 1, 2017 at 12:05:22 PM UTC+1, Dima Pasechnik wrote: >>> >>> please post the output of >>> >>> as --version >>> >>> on the system. I guess it is too old to understand the whole range of >>> assembler commands for your CPU. >>> >>> >>> On Wednesday, February 1, 2017 at 10:09:27 AM UTC, João Alberto Ferreira >>> wrote: >>>> >>>> Hi! >>>> >>>> I have tried to compile sagemath under a CentOS 6.8 machine, as the >>>> binaries for Fedora do not work. The installation halted with an error >>>> while building OpenBlas. Made the error is due to the machine CPU, as >>>> discussed in https://github.com/JuliaLang/julia/issues/7653, but I >>>> have little experience in this. Part of the installation log is attached. >>>> I >>>> updated the operating system and want to try build Sage again. Does anyone >>>> have any sugestion? >>>> >>>> It seems that all developing tools are installed, as can be seen below >>>> >>>> [defrancaferr_joa@javel ~]$ rpm -q perl-ExtUtils-MakeMaker >>>> perl-ExtUtils-MakeMaker-6.55-141.el6_7.1.x86_64 >>>> [defrancaferr_joa@javel ~]$ which perl >>>> /usr/bin/perl >>>> [defrancaferr_joa@javel ~]$ rpm -q binutils >>>> binutils-2.20.51.0.2-5.44.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q gcc >>>> gcc-4.4.7-17.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q make >>>> make-3.81-23.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q m4 >>>> m4-1.4.13-5.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q perl >>>> perl-5.10.1-141.el6_7.1.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q tar >>>> tar-1.23-15.el6_8.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q git >>>> git-1.7.1-4.el6_7.1.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q gcc-c++ >>>> gcc-c++-4.4.7-17.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q gcc-gfortran >>>> gcc-gfortran-4.4.7-17.el6.x86_64 >>>> [defrancaferr_joa@javel ~]$ rpm -q python >>>> python-2.6.6-66.el6_8.x86_64 >>>> [defrancaferr_joa@javel ~]$ lscpu >>>> Architecture: x86_64 >>>> CPU op-mode(s):32-bit, 64-bit >>>> Byte Order:Little Endian >>>> CPU(s):32 >>>> On-line CPU(s) list: 0-31 >>>> Thread(s) par coeur : 2 >>>> Coeur(s) par support CPU :8 >>>> Socket(s): 2 >>>> Noeud(s) NUMA :2 >>>> ID du vendeur :GenuineIntel >>>> Famille CPU : 6 >>>> Modèle : 79 >>>> Model name:Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz >>>> Version : 1 >>>> CPU MHz : 1200.000 >>>> BogoMIPS: 4190.00 >>>> Virtualisation : VT-x >>>> L1d cache :32K >>>> L1i cache :32K >>>> L2 cache : 256K >>>> L3 cache : 20480K >>>> NUMA node0 CPU(s): 0-7,16-23 >>>> NUMA node1 CPU(s): 8-15,24-31 >>>> >>> -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: [sage 7.4] Error building OpenBlas
Hi! Here it is the command output. [defrancaferr_joa@javel ~]$ as --version GNU assembler version 2.20.51.0.2-5.44.el6 20100205 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `x86_64-redhat-linux'. On Wednesday, February 1, 2017 at 12:05:22 PM UTC+1, Dima Pasechnik wrote: > > please post the output of > > as --version > > on the system. I guess it is too old to understand the whole range of > assembler commands for your CPU. > > > On Wednesday, February 1, 2017 at 10:09:27 AM UTC, João Alberto Ferreira > wrote: >> >> Hi! >> >> I have tried to compile sagemath under a CentOS 6.8 machine, as the >> binaries for Fedora do not work. The installation halted with an error >> while building OpenBlas. Made the error is due to the machine CPU, as >> discussed in https://github.com/JuliaLang/julia/issues/7653, but I have >> little experience in this. Part of the installation log is attached. I >> updated the operating system and want to try build Sage again. Does anyone >> have any sugestion? >> >> It seems that all developing tools are installed, as can be seen below >> >> [defrancaferr_joa@javel ~]$ rpm -q perl-ExtUtils-MakeMaker >> perl-ExtUtils-MakeMaker-6.55-141.el6_7.1.x86_64 >> [defrancaferr_joa@javel ~]$ which perl >> /usr/bin/perl >> [defrancaferr_joa@javel ~]$ rpm -q binutils >> binutils-2.20.51.0.2-5.44.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q gcc >> gcc-4.4.7-17.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q make >> make-3.81-23.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q m4 >> m4-1.4.13-5.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q perl >> perl-5.10.1-141.el6_7.1.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q tar >> tar-1.23-15.el6_8.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q git >> git-1.7.1-4.el6_7.1.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q gcc-c++ >> gcc-c++-4.4.7-17.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q gcc-gfortran >> gcc-gfortran-4.4.7-17.el6.x86_64 >> [defrancaferr_joa@javel ~]$ rpm -q python >> python-2.6.6-66.el6_8.x86_64 >> [defrancaferr_joa@javel ~]$ lscpu >> Architecture: x86_64 >> CPU op-mode(s):32-bit, 64-bit >> Byte Order:Little Endian >> CPU(s):32 >> On-line CPU(s) list: 0-31 >> Thread(s) par coeur : 2 >> Coeur(s) par support CPU :8 >> Socket(s): 2 >> Noeud(s) NUMA :2 >> ID du vendeur :GenuineIntel >> Famille CPU : 6 >> Modèle : 79 >> Model name:Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz >> Version : 1 >> CPU MHz : 1200.000 >> BogoMIPS: 4190.00 >> Virtualisation : VT-x >> L1d cache :32K >> L1i cache :32K >> L2 cache : 256K >> L3 cache : 20480K >> NUMA node0 CPU(s): 0-7,16-23 >> NUMA node1 CPU(s): 8-15,24-31 >> > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] [symbolic] return the argument of a sinusoidal function
Hi! Does any one knows a function or a way to return the argument of a sinusoidal function? I have the following code and wanted to operate on the argument of the cosinus function. # upchirp carrier var('t, phi_0, omega_0, omega_1, T') k = (omega_1 - omega_0)/T; k # linear chirp signal (waveform) s1 = cos(phi_0 + k*t^2/2 + omega_0*t); s1 arg(s1) omega = derivative(arg(s1), t); omega Sagemath returns: (t, phi_0, omega_0, omega_1, T)-(omega_0 - omega_1)/Tcos(omega_0*t - 1/2*(omega_0 - omega_1)*t^2/T + phi_0) arg(cos(omega_0*t - 1/2*(omega_0 - omega_1)*t^2/T + phi_0)) -(omega_0 - (omega_0 - omega_1)*t/T)*sin(omega_0*t - 1/2*(omega_0 - omega_1)*t^2/T + phi_0)*D[0](arg)(cos(omega_0*t - 1/2*(omega_0 - omega_1)*t^2/T + phi_0)) Cordially, Joao -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: install sage on Windows 10 using new ubuntu bash shell?
http://ciencias.uis.edu.co/grupobioquimicateorica/clases/sagemath/ quinta-feira, 29 de Setembro de 2016 às 21:00:19 UTC+1, Drew Johnson escreveu: > A feature of the Windows 10 Anniversary Edition is that you can now use a > Ubuntu bash that can access your Windows file system. > > > http://www.omgubuntu.co.uk/2016/08/enable-bash-windows-10-anniversary-update > > Can I use this to install sage on windows without using a virtual machine > or anything? That would be sweet... > > I though I'd ask before trying 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: matrix function
This seems to work r = matrix(CallableSymbolicExpressionRing((theta,)), cos(theta/2)*s0 - I*sin(theta/2)*sy) Are there other possibilities? Le jeudi 19 mai 2016 10:36:22 UTC+2, Alberto Verga a écrit : > > I want to define a matrix valued function: what is wrong with this code? > > s0 = matrix([[1,0],[0,1]]) > sy = matrix([[0,-I],[I,0]]) > r(theta) = cos(theta/2)*s0 - I*sin(theta/2)*sy > > r(1) does not evaluate to r(theta=1) > > Thanks! > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] matrix function
I want to define a matrix valued function: what is wrong with this code? s0 = matrix([[1,0],[0,1]]) sy = matrix([[0,-I],[I,0]]) r(theta) = cos(theta/2)*s0 - I*sin(theta/2)*sy r(1) does not evaluate to r(theta=1) Thanks! -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Sagetex plots
I am trying sagetex in cloud.sagemath.com. Sagetex manual says at the top of page 7, that if nothing is specified for the , "width=.75\textwidth" will be used. It's a good thing, so the plots do not extrapolate page margins. However, it's not working, and we should pass explicit the above command. Can anyone update the manual or correct the sagetex package? Thank you! João. An example from the internet follows below. \documentclass{article} % -The preamble - \usepackage{xcolor} \usepackage{sagetex} % use Sage for it's math ability \usepackage{graphicx} % for including pictures \pagestyle{empty}% remove the page numbers % --End of preamble - \begin{document} \begin{sagesilent} var('x') f = x*sin(x) pltf = plot(f,(x,-10,10)) \end{sagesilent} \begin{center} \sageplot{pltf} % plot extrapolate margins. To keep plot within margins \sageplot[width=.75\textwidth]{pltf} should be used \end{center} \end{document} -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] How to take out a matrix as common factors
Dear community, I'd like to show to my students how to obtain the structure functions of a Lie group, say SU(3). Therefore, I create a basis for the Lie algebra, normalized via the trace of the squares. Then, I defined a commutator function, and start calculating the algebra... However, I'd like to separate the matrix generator from the coefficient (structure constant element). How (if possible) can I take out a matrix factor from the result of the commutator? Cheers! -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Format of partial derivatives within sagemanifolds
Dear community, I'm using SAGE with SageManifolds to calculate Lie derivatives. First, I would like to congratulate all the team of developers, because day to day sagemanifolds get more useful. Next, the "problem". I'm trying to find the most general rank two tensor compatible with O(3) symmetry. Here some code: # The manifold M = Manifold(4, 'M') # The patch X. = M.chart(r't r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):\phi') # Killing vectors Lx = M.vector_field('Lx') Lx[:] = ( 0, 0, -cos(ph), cot(th)*sin(ph) ) Ly = M.vector_field('Ly') Ly[:] = ( 0, 0, sin(ph), cot(th)*cos(ph) ) Lz = M.vector_field('Lz') Lz[:] = ( 0, 0, 0, 1) # The general tensor T = M.tensor_field( 0, 2, 'T' ) for i in xrange(4): for j in xrange(4): T[i,j] = function("T%s%s" % (i,j))(t, r, th, ph) # One of the Lie derivatives LxT = T.lie_der(Lx) LxT.display_comp() Then, the "problem" is that the PDE displayed show partial derivatives with respect to `th` or `ph` instead of using the LaTeX symbols as defined on the patch. Is there a way to correct this behaviour? Cheers. -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
Re: [sage-support] Re: Sage Crash Report
Thank you HG, Your suggestion worked like a charm. I create a new branch in my sage installation and tried your suggestion, and it works smoothly. Best wishes! Oscar. On Thursday, 31 March 2016 14:56:08 UTC-3, HG wrote: > > sagemanifolds compiles well usually... Just follow the install doc and > sm-install.sh : > > http://sagemanifolds.obspm.fr/download.html#script_install/sm-install.sh > > I prefer than git. > > Le 31/03/2016 19:00, Oscar Alberto Castillo Felisola a écrit : > > Hi Eric, > > I finally compiled the source of sage from github, but I got a merge > conflict when I added the sagemanifolds branch. I'll post further when I > get to the office. Hope you could help me. > > Cheers. > > On Tuesday, 29 March 2016 15:51:53 UTC-3, Eric Gourgoulhon wrote: >> >> Hi Oscar, >> >> I'm afraid I cannot help much with your specific problem. The only thing >> I can tell is that Sage 7.1 + SageManifolds 0.9 works well on Ubuntu, which >> is based on Debian, but of course differs from it. >> >> Best regards, >> >> Eric. >> >> Le mardi 29 mars 2016 16:04:20 UTC+2, Oscar Alberto Castillo Felisola a >> écrit : >>> >>> Dear community, >>> >>> lately, I'm having problems with the installation of SAGE. I downloaded >>> the version Sage v.7.1 for Debian_8, and it seems to work... but I >>> installed sagemanifold v.0.9, and I got the report file attached to this >>> post. >>> >>> I'm having problems too when compiling the scr code, because the file >>> `flint*` has a problem. >>> >>> Any suggestions? >>> >> -- > 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...@googlegroups.com . > To post to this group, send email to sage-s...@googlegroups.com > . > Visit this group at https://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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Sage Crash Report
Hi Eric, I finally compiled the source of sage from github, but I got a merge conflict when I added the sagemanifolds branch. I'll post further when I get to the office. Hope you could help me. Cheers. On Tuesday, 29 March 2016 15:51:53 UTC-3, Eric Gourgoulhon wrote: > > Hi Oscar, > > I'm afraid I cannot help much with your specific problem. The only thing I > can tell is that Sage 7.1 + SageManifolds 0.9 works well on Ubuntu, which > is based on Debian, but of course differs from it. > > Best regards, > > Eric. > > Le mardi 29 mars 2016 16:04:20 UTC+2, Oscar Alberto Castillo Felisola a > écrit : >> >> Dear community, >> >> lately, I'm having problems with the installation of SAGE. I downloaded >> the version Sage v.7.1 for Debian_8, and it seems to work... but I >> installed sagemanifold v.0.9, and I got the report file attached to this >> post. >> >> I'm having problems too when compiling the scr code, because the file >> `flint*` has a problem. >> >> Any suggestions? >> > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Sage Crash Report
Hi Volker, I discover that a git repository hosted at github. I was able to compile the source from that repository, which is by the way more updated that the repository advertised at the documentation. Nonetheless, I'm still having problems when trying to compile the sagemanifolds branch... It gave me some conflict issues, and didn't work after the resolution. Thank you! On Tuesday, 29 March 2016 19:39:07 UTC-3, Volker Braun wrote: > > Should be fixed in the next version. In the meantime, you can download the > source tarball and compile that. > > > > On Tuesday, March 29, 2016 at 4:04:20 PM UTC+2, Oscar Alberto Castillo > Felisola wrote: >> >> Dear community, >> >> lately, I'm having problems with the installation of SAGE. I downloaded >> the version Sage v.7.1 for Debian_8, and it seems to work... but I >> installed sagemanifold v.0.9, and I got the report file attached to this >> post. >> >> I'm having problems too when compiling the scr code, because the file >> `flint*` has a problem. >> >> Any suggestions? >> > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Sage Crash Report
Dear community, lately, I'm having problems with the installation of SAGE. I downloaded the version Sage v.7.1 for Debian_8, and it seems to work... but I installed sagemanifold v.0.9, and I got the report file attached to this post. I'm having problems too when compiling the scr code, because the file `flint*` has a problem. Any suggestions? -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout. *** IPython post-mortem report {'commit_hash': u'7f50c6b', 'commit_source': 'installation', 'default_encoding': 'UTF-8', 'ipython_path': '/home/oscar/Software/SageMath/local/lib/python2.7/site-packages/IPython', 'ipython_version': '4.1.2', 'os_name': 'posix', 'platform': 'Linux-3.16.0-4-amd64-x86_64-with-debian-8.3', 'sys_executable': '/home/oscar/Software/SageMath/local/bin/python', 'sys_platform': 'linux2', 'sys_version': '2.7.10 (default, Mar 22 2016, 15:57:51) \n[GCC 4.9.3]'} *** *** Crash traceback: --- --- ImportError Python 2.7.10: /home/oscar/Software/SageMath/local/bin/python Tue Mar 29 10:58:32 2016 A problem occurred executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. /home/oscar/Software/SageMath/src/bin/sage-ipython in () 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 """ 4 Sage IPython startup script. 5 """ 6 7 # Install extra readline commands before IPython initialization 8 from sage.repl.readline_extra_commands import * 9 10 from sage.repl.interpreter import SageTerminalApp 11 12 app = SageTerminalApp.instance() ---> 13 app.initialize() global app.initialize = > 14 app.start() in initialize(self=, argv=None) /home/oscar/Software/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.py in catch_config_error(method=, app=, *args=(None,), **kwargs={}) 59 60 #- 61 # Application class 62 #- 63 64 @decorator 65 def catch_config_error(method, app, *args, **kwargs): 66 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 67 68 On a TraitError (generally caused by bad config), this will print the trait's 69 message, and exit the app. 70 71 For use on init methods, to prevent invoking excepthook on invalid input. 72 """ 73 try: ---> 74 return method(app, *args, **kwargs) method = app = args = (None,) kwargs = {} 75 except (TraitError, ArgumentError) as e: 76 app.print_help() 77 app.log.fatal("Bad config encountered during initialization:") 78 app.log.fatal(str(e)) 79 app.log.debug("Config at the time: %s", app.config) 80 app.exit(1) 81 82 83 class ApplicationError(Exception): 84 pass 85 86 87 class LevelFormatter(logging.Formatter): 88 """Formatter with additional `highlevel` record 89 /home/oscar/Software/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.py in initialize(self=, argv=None) 291 292 return super(TerminalIPythonApp, self).parse_command_line(argv) 293 294 @catch_config_error 295 def initialize(self, argv=None): 296 """Do actions after construct, but before starting the app.""" 297 super(TerminalIPythonApp, self).initialize(argv) 298 if self.subapp is not None: 299 # don't bother initializing further, starting subapp 300 return 301 # print self.extra_args 302 if self.extra_args and not self.something_to_run: 303 self.file_to_run = self.extra_args[0] 304 self.init_path() 305 # create the shell --> 306 self.init_shell() self.init_shell = > 307 # and draw the banner 308 self.init_banner() 309 # Now a variety of thin
[sage-support] Problem installing Sage on Kali 2
i have this error after several hours of compiling sage on my netbook, any ideas? make[3]: Entering directory '/opt/sage-7.1/src' python -c "from sage_setup.autogen.pari import rebuild; rebuild()" sys:1: RuntimeWarning: not adding directory '' to sys.path since everybody can write to it. Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory Traceback (most recent call last): File "", line 1, in ImportError: No module named sage_setup.autogen.pari Makefile:19: recipe for target 'sage/libs/pari/auto_gen.pxi' failed make[3]: *** [sage/libs/pari/auto_gen.pxi] Error 1 make[3]: Leaving directory '/opt/sage-7.1/src' Makefile:767: recipe for target 'sagelib' failed make[2]: *** [sagelib] Error 2 make[2]: Leaving directory '/opt/sage-7.1/build/make' Makefile:640: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/opt/sage-7.1/build/make' -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Piecewise function
On Thursday, February 11, 2016 at 9:04:16 PM UTC-2, Nils Bruin wrote: > > On Thursday, February 11, 2016 at 11:32:45 AM UTC-8, João Alberto Ferreira > wrote: >> >> 1) Isn't there a way to pass to the Piecewise function if the intervals >> are open or closed at its borders, so as, in the example above, g(x) could >> be evaluated to 25 instead of 35/2? >> > > It doesn't seem to be possible at the moment. The averaging behaviour is > hard-coded. > > It's a pity. > 2) Cant't I plot a Piecewise function with intervals extending to >> infinity, as the example above, by just indicating (maybe in the plot >> method) the definite interval that I wish to be used to evaluate and plot >> the function? For the graph of a Piecewise function, I would expect >> something like the examples in >> http://www.sagemath.org/calctut/continuity.html, with the hollow and >> filled circles indicating if the intervals are open or closed at its >> borders. >> > > You can use > plot(lambda x: g(x), 0, 10) > or > plot(g.__call__, 0, 10) > > Thank you for the sugestions but, unfortunatelly, the options above plot the function as it was a continuous function. The only way I could find to plot the function correctly is as in http://www.sagemath.org/calctut/continuity.html. But it ignores the created piecewise function. g1(x) = x**2 g2(x) = 2*x g = Piecewise([[(-Infinity,5),g2],[(5,Infinity),g1]]) P1 = plot(g2, 0, 5) pt1 = point((5, g2(5)), rgbcolor='white', faceted=True, pointsize=30) pt2 = point((5, g1(5)), rgbcolor='black', pointsize=30) P2 = plot(g1, 5, 10) P1 + pt1 + pt2 + P2 -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Piecewise function
I have a function g(x) equal to x^2 if x >= 5, and equal to 2*x if x < 5. I constructed the piecewise function as follows: g1(x) = x**2 g2(x) = 2*x g = Piecewise([[(-Infinity,5),g2],[(5,Infinity),g1]]) When I evaluate f(5), it returns 35/2 because it evaluates g1(5), g2(5) and returns the average of the two values, as I'm not indicating that at x=5, g1(x) should be used to evaluate the piecewise function. Questions: 1) Isn't there a way to pass to the Piecewise function if the intervals are open or closed at its borders, so as, in the example above, g(x) could be evaluated to 25 instead of 35/2? 2) Cant't I plot a Piecewise function with intervals extending to infinity, as the example above, by just indicating (maybe in the plot method) the definite interval that I wish to be used to evaluate and plot the function? For the graph of a Piecewise function, I would expect something like the examples in http://www.sagemath.org/calctut/continuity.html, with the hollow and filled circles indicating if the intervals are open or closed at its borders. I hope I was clear enough. But, as english is not my mother tongue and neither I am a mathematician, maybe something is confusing. So, fell free to ask for clarifications. -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
[sage-support] Re: Filling a matrix with functions
Thank you very much Harald! -- 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: Filling a matrix with functions
I'd like to obtain something like f11 = function('f11', t,r) f12 = function('f12', t,r) f21 = function('f21', t,r) f22 = function('f22', t,r) M = matrix(2,2, [[f11, f12], [f21, f22]]) Note that in principle all the functions depend on the same variables. If the assignation of functions could be used as components of a metric of sagemanifold, would be even better. -- 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] Filling a matrix with functions
Hi. I know that one can define a function by declaring sage: f = function('f', t,r) However, I'm interested in declaring a matrix filled with different functions. Of course, for a small matrix I can do it by hand, but for "huge" matrices it is boring and make no sense. Is it possible to do what I need? -- 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] Plots and their fontsizes
Is it possible to choose different fontsize(s) for the axis labels and the numbers in the axis? I'm particularly interested in the `implicit_plot` function, but if it works in a usual `plot` is good enough!!! Thank you. -- 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] sage 6.2 to 6.4 upgrade
Ok, thank you! On Tuesday, November 25, 2014 8:23:20 PM UTC-2, Vincent Knight wrote: > > This sometimes happens and it's an error in the building of the docs. > > If you want to build the documentation you can run: > > $ make doc-clean > > and run > > $ sage --docbuild reference html > > for the html version (more info here: > http://www.sagemath.org/doc/developer/sage_manuals.html). > > If you don't care about the documentation you can just leave it as it is. > > Vince > > On Tue Nov 25 2014 at 10:19:00 PM João Alberto Ferreira > wrote: > >> After upgrading Sage on an old laptop, the upgrade process ended with the >> following error message. What am I supposed to do? I execute make doc-clean >> and then what? >> >> Apparently, Sage is working normally. >> >> Thanks! >> >> João. >> >> >> ... >> [graphs ] reading sources... [ 91%] sage/graphs/schnyder >> [graphs ] reading sources... [ 93%] sage/graphs/spanning_tree >> [graphs ] reading sources... [ 95%] sage/graphs/trees >> [graphs ] reading sources... [ 97%] sage/graphs/tutte_polynomial >> [graphs ] reading sources... [100%] sage/graphs/weakly_chordal >> [graphs ] >> /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:11: >> >> WARNING: autodoc can't import/find module 'sage.graphs.hypergraph', it >> reported error: "No module named hypergraph", please check your spelling >> and sys.path >> [graphs ] >> /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:: >> >> WARNING: document isn't included in any toctree >> Error building the documentation. >> >> Note: incremental documentation builds sometimes cause spurious >> error messages. To be certain that these are real errors, run >> "make doc-clean" first and try again. >> Traceback (most recent call last): >> File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line >> 1618, in >> getattr(get_builder(name), type)() >> File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line >> 292, in _wrapper >> getattr(get_builder(document), 'inventory')(*args, **kwds) >> File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line >> 503, in _wrapper >> x.get(9) >> File >> "/home/sergio/sage-6.2-i686-Linux/local/lib/python/multiprocessing/pool.py", >> line 558, in get >> raise self._value >> OSError: [graphs ] >> /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:11: >> >> WARNING: autodoc can't import/find module 'sage.graphs.hypergraph', it >> reported error: "No module named hypergraph", please check your spelling >> and sys.path >> >> make: ** [doc-html] Erro 1 >> >> -- >> 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...@googlegroups.com . >> To post to this group, send email to sage-s...@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] sage 6.2 to 6.4 upgrade
After upgrading Sage on an old laptop, the upgrade process ended with the following error message. What am I supposed to do? I execute make doc-clean and then what? Apparently, Sage is working normally. Thanks! João. ... [graphs ] reading sources... [ 91%] sage/graphs/schnyder [graphs ] reading sources... [ 93%] sage/graphs/spanning_tree [graphs ] reading sources... [ 95%] sage/graphs/trees [graphs ] reading sources... [ 97%] sage/graphs/tutte_polynomial [graphs ] reading sources... [100%] sage/graphs/weakly_chordal [graphs ] /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:11: WARNING: autodoc can't import/find module 'sage.graphs.hypergraph', it reported error: "No module named hypergraph", please check your spelling and sys.path [graphs ] /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:: WARNING: document isn't included in any toctree Error building the documentation. Note: incremental documentation builds sometimes cause spurious error messages. To be certain that these are real errors, run "make doc-clean" first and try again. Traceback (most recent call last): File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line 1618, in getattr(get_builder(name), type)() File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line 292, in _wrapper getattr(get_builder(document), 'inventory')(*args, **kwds) File "/home/sergio/sage-6.2-i686-Linux/src/doc/common/builder.py", line 503, in _wrapper x.get(9) File "/home/sergio/sage-6.2-i686-Linux/local/lib/python/multiprocessing/pool.py", line 558, in get raise self._value OSError: [graphs ] /home/sergio/sage-6.2-i686-Linux/src/doc/en/reference/graphs/sage/graphs/hypergraph.rst:11: WARNING: autodoc can't import/find module 'sage.graphs.hypergraph', it reported error: "No module named hypergraph", please check your spelling and sys.path make: ** [doc-html] Erro 1 -- 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: re (regular expressions) Python module
Ok, thank you! On Saturday, November 1, 2014 12:03:33 AM UTC-2, Nils Bruin wrote: > > On Friday, October 31, 2014 6:17:44 PM UTC-7, João Alberto Ferreira wrote: >> >> joao@Hades:~$ sage >> ┌┐ >> │ Sage Version 6.3, Release Date: 2014-08-10 │ >> │ Type "notebook()" for the browser-based notebook interface.│ >> │ Type "help()" for help.│ >> └┘ >> sage: import re >> sage: m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist") >> sage: m.group(0) >> IndexError: no such group >> > > That's a case of the preparser getting in the way. > > sage: m.group(int(0)) > > does work. > > the problem on the side of "group" is that its input signature is > overloaded: it can also accept group names. So it doesn't try very hard to > make an integer out of input that isn't. > -- 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 (regular expressions) Python module
I was trying to use Python's re (regular expressions) module to parse a log file, but when I ran the following example from the Python documentation, I realized he was not working as expected. Is there something here that I do not know? joao@Hades:~$ sage --python Python 2.7.8 (default, Aug 10 2014, 17:23:10) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist") >>> m.group(0) 'Isaac Newton' >>> joao@Hades:~$ sage ┌┐ │ Sage Version 6.3, Release Date: 2014-08-10 │ │ Type "notebook()" for the browser-based notebook interface.│ │ Type "help()" for help.│ └┘ sage: import re sage: m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist") sage: m.group(0) --- IndexErrorTraceback (most recent call last) in () > 1 m.group(Integer(0)) IndexError: no such group -- 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: How to install wxPython in Sage?
Hi, Nils! thank you for the suggestion! I tried to install the experimental package: (sage-sh) joao@Hades:~$ sage -i wxPython but it stopped at: ... checking for GTK+ - version >= 2.0.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. Error configure wx widgets. real0m17.868s user0m5.780s sys0m2.412s Error installing package wxPython-2.8.7.1 Please email sage-devel (http://groups.google.com/group/sage-devel) explaining the problem and including the relevant part of the log file /opt/sage-6.3-i686-Linux/logs/pkgs/wxPython-2.8.7.1.log Describe your computer, operating system, etc. If you want to try to fix the problem yourself, *don't* just cd to /opt/sage-6.3-i686-Linux/local/var/tmp/sage/build/wxPython-2.8.7.1 and type 'make' or whatever is appropriate. Instead, the following commands setup all environment variables correctly and load a subshell for you to debug the error: (cd '/opt/sage-6.3-i686-Linux/local/var/tmp/sage/build/wxPython-2.8.7.1' && '/opt/sage-6.3-i686-Linux/sage' --sh) When you are done debugging, you can type "exit" to leave the subshell. I also tried to install from source: (sage-sh) joao@Hades:wxPython$ sage --python build-wxpython.py --install --build_dir=../bld but it stopped at the same point: ... checking for GTK+ - version >= 2.6.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occurred. This usually means GTK+ is incorrectly installed. checking for pkg-config... (cached) /opt/sage-6.3-i686-Linux/local/bin/pkg-config checking for GTK+ - version >= 3.0.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. checking for gtk-config... no checking for GTK - version >= 1.2.7... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. checking for gtk-config... (cached) no checking for GTK - version >= 1.2.3... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. Error running configure ERROR: failed building wxWidgets Traceback (most recent call last): File "build-wxpython.py", line 378, in wxbuild.main(wxscript, build_options) File "/home/joao/Downloads/wxPython-src-3.0.1.1/build/tools/build-wxwidgets.py", line 364, in main "Error running configure") File "/home/joao/Downloads/wxPython-src-3.0.1.1/build/tools/build-wxwidgets.py", line 80, in exitIfError raise builder.BuildError(msg) BuildError I also tried without the "sage -sh" (outside subshell), but I obtained the same results. It seems that something is missing and needs to be installed, although I've already installed a lot of packages (in Ubuntu 14.04), like libgtk2.0-0, libgtk2.0-dev, libgtk-3-0, libgtk-3-dev. I will try to ask the wxPython people. Thanks for the help! On Thursday, October 30, 2014 12:05:21 AM UTC-2, Nils Bruin wrote: > > On Wednesday, October 29, 2014 5:09:55 PM UTC-7, João Alberto Ferreira > wrote: >> >> How can I install wxPython (wx module) in Sage? >> > Have you tried executing "sage -sh" and then following the build > instruct
[sage-support] How to install wxPython in Sage?
How can I install wxPython (wx module) in Sage? I tried: joao@Hades:~$ sage --python -m easy_install wxPython Searching for wxPython Reading https://pypi.python.org/simple/wxPython/ Reading http://wxPython.org/ Reading http://wxPython.org/download.php Best match: wxPython src-3.0.1.1 Downloading http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.1.1.tar.bz2 Processing wxPython-src-3.0.1.1.tar.bz2 error: Couldn't find a setup script in /tmp/easy_install-fatFNS/wxPython-src-3.0.1.1.tar.bz2 Thanks! -- 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: Strange error
Understood. Thank you! On Friday, October 24, 2014 2:45:46 PM UTC-2, Nils Bruin wrote: > > On Thursday, October 23, 2014 11:46:02 AM UTC-7, João Alberto Ferreira > wrote: >> >> I am running the following Python example from the book "Learning >> Python", from Mark Lutz and David Ascher, but Sage is returning a >> TypeError after presenting the correct response. Can anyone explain me >> why? I've found this very strange. >> >> sage: class Commuter: >> : def __init__(self, val): >> : self.val = val >> : def __add__(self, other): >> : print "add", self.val, other >> : def __radd__(self, other): >> : print "radd", self.val, other >> : >> sage: x = Commuter(88) >> sage: y = Commuter(99) >> sage: x + 1 >> add 88 1 >> sage: 1 + y >> radd 99 1 >> > > The problem is caused by the fact that your __radd__ implementation > returns "None". If you insert a return command for a non-None value, the > example works as expected. > > Indeed Sage binary operations internally do not dispatch via __add__ and > __radd__, but __radd__ is tried as a fall-back at some point. If you call > 1+y then you're running Integer(1).__add__(y). This does not figure out a > way to do the addition. Apparently, sage chooses to not return > NotImplemented (allowing python to call __radd__), but calls __radd__ > itself and still raises an error when the return value is None. > > There may be a good reason why Sage chooses to call __radd__ manually > rather than let python do the work by returning NotImplemented, but if > there's not perhaps it would be better to stay closer to python's standard? > -- 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: Strange error
Ok, thank you all! I was curious just because, due to the error, I did not expect a result. On Thursday, October 23, 2014 5:28:46 PM UTC-2, kcrisman wrote: > > Or, in the notebook/cell server/cloud, choose "python" from the drop-down > menu for system and just do this example in Python! Lots of options. > > >> Or type >> >> Integer = int >> >> to make Sage integers the usual Python integers in that session. >> >> On Thu, Oct 23, 2014 at 11:54 AM, Volker Braun > > wrote: >> > The short answer is that mathematical objects in Sage don't define >> addition >> > by implementing __add__ and __radd__ by hand. If you want to learn >> about >> > them make sure to not add Sage objects (like Sage integers). E.g. >> int(1) + y >> > would work. >> > >> > >> > >> > On Thursday, October 23, 2014 7:46:02 PM UTC+1, João Alberto Ferreira >> wrote: >> >> >> >> I am running the following Python example from the book "Learning >> >> Python", from Mark Lutz and David Ascher, but Sage is returning a >> >> TypeError after presenting the correct response. Can anyone explain me >> >> why? I've found this very strange. >> >> >> >> sage: class Commuter: >> >> : def __init__(self, val): >> >> : self.val = val >> >> : def __add__(self, other): >> >> : print "add", self.val, other >> >> : def __radd__(self, other): >> >> : print "radd", self.val, other >> >> : >> >> sage: x = Commuter(88) >> >> sage: y = Commuter(99) >> >> sage: x + 1 >> >> add 88 1 >> >> sage: 1 + y >> >> radd 99 1 >> >> >> >> >> --- >> >> TypeError Traceback (most recent call >> >> last) >> >> in () >> >> > 1 Integer(1) + y >> >> >> >> >> >> >> /usr/local/Sagemath/sage-6.3/local/lib/python2.7/site-packages/sage/structure/element.so >> >> >> >> in sage.structure.element.RingElement.__add__ >> >> (build/cythonized/sage/structure/element.c:14696)() >> >> >> >> >> >> >> /usr/local/Sagemath/sage-6.3/local/lib/python2.7/site-packages/sage/structure/coerce.so >> >> >> >> in sage.structure.coerce.CoercionModel_cache_maps.bin_op >> >> (build/cythonized/sage/structure/coerce.c:8323)() >> >> >> >> TypeError: unsupported operand parent(s) for '+': 'Integer Ring' and >> >> '' >> > >> > -- >> > 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...@googlegroups.com . >> > To post to this group, send email to sage-s...@googlegroups.com >> . >> > Visit this group at http://groups.google.com/group/sage-support. >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> William Stein >> Professor of Mathematics >> University of Washington >> http://wstein.org >> > -- 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] Strange error
I am running the following Python example from the book "Learning Python", from Mark Lutz and David Ascher, but Sage is returning a TypeError after presenting the correct response. Can anyone explain me why? I've found this very strange. sage: class Commuter: : def __init__(self, val): : self.val = val : def __add__(self, other): : print "add", self.val, other : def __radd__(self, other): : print "radd", self.val, other : sage: x = Commuter(88) sage: y = Commuter(99) sage: x + 1 add 88 1 sage: 1 + y radd 99 1 --- TypeError Traceback (most recent call last) in () > 1 Integer(1) + y /usr/local/Sagemath/sage-6.3/local/lib/python2.7/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__add__ (build/cythonized/sage/structure/element.c:14696)() /usr/local/Sagemath/sage-6.3/local/lib/python2.7/site-packages/sage/structure/coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:8323)() TypeError: unsupported operand parent(s) for '+': 'Integer Ring' and '' -- 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] Inconsistency between Sage and Python
Ok, I had to make a huge effort to accept this, but it's more clear now. One last question: Why RDF does not incorporate this feature? because it comes from the GSL library, that is an independent project? or because its precision is known a priori, like the float type in Python? On Monday, October 6, 2014 3:39:32 PM UTC-3, Jeroen Demeyer wrote: > > On 2014-10-06 18:03, João Alberto wrote: > > Is this a correct behavior of Sage? > It's a feature, not a bug. The reason is that the number of digits gives > an idea about the precision of the number. Compare > > sage: RealField(20)(1) > 1. > sage: RealField(100)(1) > 1. > > If both these would be printed as "1.0", you would lose this information > about the precision. > > Python has a fixed precision of 53 bits and prints a minimal number of > digits. > -- 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] Inconsistency between Sage and Python
Yes, I know Vincent, thank you, but this would complicate my code unnecessarily. I used Samuel idea. But I still think that the extra trailing zeros have no reason to exist. On Monday, October 6, 2014 1:08:23 PM UTC-3, vdelecroix wrote: > > Hi João, > > If you want precise control on the output, you might use the python > formatting (see > https://docs.python.org/2/library/string.html#formatstrings) > > sage: x = RR(pi) > sage: print x > 3.14159265358979 > sage: print "{:.3}".format(x) > 3.1 > sage: print "{:.5}".format(x) > 3.141 > > But perhaps it is not an answer to your question, is it? > > Vincent > > 2014-10-06 18:03 UTC+02:00, João Alberto >: > > > I am plotting some graphs, but the plot becomes cluttered because of > > the long labels. The labels are result of a conversion from a Real > > number to a string. The problem here is that Sage is not consistent > > with Python, as shown in the example below. > > > > Python: > >>>> multiplier = [1.0e0, 1.0e1, 1.0e2] > >>>> multiplier > > [1.0, 10.0, 100.0] > >>>> str(multiplier[-1]) > > '100.0' > > > > > > Sage: > > sage: multiplier = [1.0e0, 1.0e1, 1.0e2] > > sage: multiplier > > [1.00, 10.0, 100.] > > sage: str(multiplier[-1]) > > '100.' > > > > Is this a correct behavior of Sage? at least for me, the excess of > > trailing zeros is causing some trouble. > > > > -- > > 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...@googlegroups.com . > > To post to this group, send email to sage-s...@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: Inconsistency between Sage and Python
Thank you, Samuel. The conversion to RDF worked because it coerces the other types to RDF (I think). If I convert the multiplier values to RR, RLF or float, the conversion does not help anymore. On Monday, October 6, 2014 1:30:03 PM UTC-3, slelievre wrote: > > > João Alberto Ferreira wrote: >> >> I am plotting some graphs, but the plot becomes cluttered because of >> the long labels. The labels are result of a conversion from a Real >> number to a string. The problem here is that Sage is not consistent >> with Python, as shown in the example below. >> >> Python: >> >>> multiplier = [1.0e0, 1.0e1, 1.0e2] >> >>> multiplier >> [1.0, 10.0, 100.0] >> >>> str(multiplier[-1]) >> '100.0' >> >> >> Sage: >> sage: multiplier = [1.0e0, 1.0e1, 1.0e2] >> sage: multiplier >> [1.00, 10.0, 100.] >> sage: str(multiplier[-1]) >> '100.' >> >> Is this a correct behavior of Sage? at least for me, the excess of >> trailing zeros is causing some trouble. >> > > One option is to work with RDF: > > sage: multiplier = [1.0e0, 1.0e1, 1.0e2] > sage: multiplier = [RDF(x) for x in multiplier] > sage: multiplier > [1.0, 10.0, 100.0] > sage: str(multiplier[-1]) > '100.0' > > -- 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] Inconsistency between Sage and Python
I am plotting some graphs, but the plot becomes cluttered because of the long labels. The labels are result of a conversion from a Real number to a string. The problem here is that Sage is not consistent with Python, as shown in the example below. Python: >>> multiplier = [1.0e0, 1.0e1, 1.0e2] >>> multiplier [1.0, 10.0, 100.0] >>> str(multiplier[-1]) '100.0' Sage: sage: multiplier = [1.0e0, 1.0e1, 1.0e2] sage: multiplier [1.00, 10.0, 100.] sage: str(multiplier[-1]) '100.' Is this a correct behavior of Sage? at least for me, the excess of trailing zeros is causing some trouble. -- 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: Real floor division
OK! thank you! On Saturday, October 4, 2014 3:50:07 AM UTC-3, Jeroen Demeyer wrote: > > On 2014-10-04 00:16, Volker Braun wrote: > > The operands will coerce to RR > No, that's http://trac.sagemath.org/ticket/2034 > > > I'd say its an oversight. > Yes, but it's fixed in http://trac.sagemath.org/ticket/15260 > -- 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] Real floor division
Hi! I was experimenting with floor division in Sage using the int and float types of Python and Integeger and RealNumber types of Sage to understand the differences. I've found that the floor division operator (//) in Sage does not support real numbers. Is there a reason for this? (I ask just for curiosity) int(5)//float(2.0), int(5)//float(-2.0) (2.0, -3.0) ZZ(5)//RR(2.0), ZZ(5)//RR(-2.0) Error in lines 1-1 Traceback (most recent call last): File "/projects/cb65bb5e-3452-4325-988a-501d0b395e0b/.sagemathcloud/sage_server.py", line 828, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in File "integer.pyx", line 1868, in sage.rings.integer.Integer.__floordiv__ (build/cythonized/sage/rings/integer.c:14174) File "element.pyx", line 3013, in sage.structure.element.bin_op (build/cythonized/sage/structure/element.c:23330) File "element.pyx", line 3015, in sage.structure.element.bin_op (build/cythonized/sage/structure/element.c:23225) File "coerce.pyx", line 799, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:7575) File "coerce.pyx", line 795, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:7520) TypeError: unsupported operand type(s) for //: 'sage.rings.real_mpfr.RealNumber' and 'sage.rings.real_mpfr.RealLiteral' -- 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] GIT repository and installation
Checking it out! Thank you John. -- 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] GIT repository and installation
I'm a regular user of Sage. First I used the Ubuntu version, and now that I run a Debian flavour of Linux, I compile the source each time a new version is release. However, I'm intriguing whether or not is possible to build Sage from the git repository. *Is it possible? How could I do that?* Thank you. -- 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: weil_pairing never returns
More info: I've just realised that the problem is not the function weil_pairing() but p1.order(). SAGE gets stuck calculating the order of the point. Regards. El domingo, 15 de junio de 2014 01:17:06 UTC+2, Alberto Garcia escribió: > > Hello, > > > I'm trying to calculate a pairing with the SAGE weil_pairing() function > while using a distortion map, but the weil_pairing() function never returns > and it seems like is eating all the computer memory. > Here is the code I'm using: > > > sage: p = 293779600266612700060489507 > > sage: F = GF(p) > > sage: E = EllipticCurve(F, [-1,0]) > > sage: F2.=GF(p^2, name='alpha',modulus=ZZ['x']('x^2+1')); > > sage: E2 = E.change_ring(F2) > > sage: def custom_weil_pairing(p1, p2, n): > > : wp = p1.weil_pairing(E2(-p2[0], alpha*p2[1]), n) > > : return wp > > : > > sage: p1=E2.random_element() > > sage: p2=E2.random_element() > > sage: custom_weil_pairing(p1, p2, p1.order()) > > > Actually, p1 and p2 are point with the same order in my real code. > > I've been googling but I haven't found any known bug explaining this > behavior. > > Am I doing something wrong? > > > Regards. > -- 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: weil_pairing never returns
SAGE version: 'Sage Version 6.1.1, Release Date: 2014-02-04' in MacOS X. El domingo, 15 de junio de 2014 01:17:06 UTC+2, Alberto Garcia escribió: > > Hello, > > > I'm trying to calculate a pairing with the SAGE weil_pairing() function > while using a distortion map, but the weil_pairing() function never returns > and it seems like is eating all the computer memory. > Here is the code I'm using: > > > sage: p = 293779600266612700060489507 > > sage: F = GF(p) > > sage: E = EllipticCurve(F, [-1,0]) > > sage: F2.=GF(p^2, name='alpha',modulus=ZZ['x']('x^2+1')); > > sage: E2 = E.change_ring(F2) > > sage: def custom_weil_pairing(p1, p2, n): > > : wp = p1.weil_pairing(E2(-p2[0], alpha*p2[1]), n) > > : return wp > > : > > sage: p1=E2.random_element() > > sage: p2=E2.random_element() > > sage: custom_weil_pairing(p1, p2, p1.order()) > > > Actually, p1 and p2 are point with the same order in my real code. > > I've been googling but I haven't found any known bug explaining this > behavior. > > Am I doing something wrong? > > > Regards. > -- 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] weil_pairing never returns
Hello, I'm trying to calculate a pairing with the SAGE weil_pairing() function while using a distortion map, but the weil_pairing() function never returns and it seems like is eating all the computer memory. Here is the code I'm using: sage: p = 293779600266612700060489507 sage: F = GF(p) sage: E = EllipticCurve(F, [-1,0]) sage: F2.=GF(p^2, name='alpha',modulus=ZZ['x']('x^2+1')); sage: E2 = E.change_ring(F2) sage: def custom_weil_pairing(p1, p2, n): : wp = p1.weil_pairing(E2(-p2[0], alpha*p2[1]), n) : return wp : sage: p1=E2.random_element() sage: p2=E2.random_element() sage: custom_weil_pairing(p1, p2, p1.order()) Actually, p1 and p2 are point with the same order in my real code. I've been googling but I haven't found any known bug explaining this behavior. Am I doing something wrong? Regards. -- 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] sage ppa
I have tried to install Sage in an old laptop with Lubuntu with the following three commands: -- $ sudo -E apt-add-repository -y ppa:aims/sagemath $ sudo -E apt-get update $ sudo -E apt-get install sagemath-upstream-binary -- but the last command returned -- Package sagemath-upstream-binary is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'sagemath-upstream-binary' has no installation candidate -- the first two commands ran without problems, so that the ppa repository was hit by the apt-get update command. -- ... Ign http://ppa.launchpad.net saucy InRelease Hit http://ppa.launchpad.net saucy Release.gpg Hit http://ppa.launchpad.net saucy Release Hit http://ppa.launchpad.net saucy/main i386 Packages ... -- The problem is the same as the one described here: http://askubuntu.com/questions/409372/how-one-can-install-sagemath-on-ubuntu After downloading Sage and decompressing it, I was able to run it but, I searched a lot and, until now, could not figure out what is wrong. How can I fix this? any suggestions? -- 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: Plot the modulus of a complex function.
Yes, I think these issues are related, but note however that plot(abs(exp(i*x)),x,-pi,pi) is OK; whereas the corresponding contour_plot is not. Le lundi 21 avril 2014 15:39:25 UTC+2, kcrisman a écrit : > > Hi: is http://trac.sagemath.org/ticket/13355 possibly related? > > Also, see the discussion at > https://groups.google.com/forum/#!topic/sage-support/3mekDq5Stvk - if you > use a Python function instead of a symbolic one, it might work even now. > Good luck! > > - kcrisman > > On Sunday, April 20, 2014 9:05:12 AM UTC-4, Alberto Verga wrote: >> >> Same question: >> >> kx, ky = var('kx', 'ky', domain='real') >> k = vector( [kx, ky] ) >> >> d1 = vector( [0,1/sqrt(3)] ) >> d2 = vector( [-1/2,-1/(2*sqrt(3))] ) >> d3 = vector( [1/2,-1/(2*sqrt(3))] ) >> >> hk(kx,ky) = -exp(I*k.dot_product(d1)) - exp(I*k.dot_product(d2)) - >> exp(I*k.dot_product(d3)) >> ek(kx,ky) = sqrt((hk(kx,ky).real_part())**2 + (hk(kx,ky).imag_part())**2) >> contour_plot(ek(kx,ky),(kx,-2*pi,2*pi),(ky,-2*pi,2*pi)) >> >> works >> >> However, the "simpler" >> >> ek(kx,ky) = abs(hk(kx,ky)) >> contour_plot(ek(kx,ky),(kx,-2*pi,2*pi),(ky,-2*pi,2*pi)) >> >> does not work. >> >> A simple example would be: >> x, y = var('x', 'y', domain = 'real') >> contour_plot( abs( exp(I*x) ), (x, -pi, pi), (y, -pi, pi) ) >> >> giving the same error: "TypeError: unable to coerce to a real number" >> >> Alberto. >> >> >> >> >> Le mardi 28 janvier 2014 19:26:35 UTC+1, Albert Schueller a écrit : >>> >>> This morning I figured out how to plot the modulus of a complex function >>> in sage. In my travails I wondered why the first snippet works, but the >>> second does not? Is there any easy way to make the second snippet work? >>> >>> #Plot the modulus of the function, works >>> var('z',domain=CC) >>> var('x y', domain=RR) >>> var('rp ip') >>> z=x+i*y >>> rp = (2+z.conjugate()+z^3).real() >>> ip = (2+z.conjugate()+z^3).imag() >>> m(x,y) = sqrt(rp^2+ip^2) >>> plot3d(m(x,y).simplify(),(x,-1.5,1.5),(y,-1.5,1.5)) >>> >>> >>> >>> >>> My question is, why doesn't this work? >>> >>> #Plot the modulus of the function, fails >>> var('z',domain=CC) >>> var('x y', domain=RR) >>> z=x+i*y >>> m(x,y) = abs(2+z.conjugate()+z^3) >>> plot3d(m(x,y),(x,-1.5,1.5),(y,-1.5,1.5)) >>> >>> -- 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: Plot the modulus of a complex function.
Same question: kx, ky = var('kx', 'ky', domain='real') k = vector( [kx, ky] ) d1 = vector( [0,1/sqrt(3)] ) d2 = vector( [-1/2,-1/(2*sqrt(3))] ) d3 = vector( [1/2,-1/(2*sqrt(3))] ) hk(kx,ky) = -exp(I*k.dot_product(d1)) - exp(I*k.dot_product(d2)) - exp(I*k.dot_product(d3)) ek(kx,ky) = sqrt((hk(kx,ky).real_part())**2 + (hk(kx,ky).imag_part())**2) contour_plot(ek(kx,ky),(kx,-2*pi,2*pi),(ky,-2*pi,2*pi)) works However, the "simpler" ek(kx,ky) = abs(hk(kx,ky)) contour_plot(ek(kx,ky),(kx,-2*pi,2*pi),(ky,-2*pi,2*pi)) does not work. A simple example would be: x, y = var('x', 'y', domain = 'real') contour_plot( abs( exp(I*x) ), (x, -pi, pi), (y, -pi, pi) ) giving the same error: "TypeError: unable to coerce to a real number" Alberto. Le mardi 28 janvier 2014 19:26:35 UTC+1, Albert Schueller a écrit : > > This morning I figured out how to plot the modulus of a complex function > in sage. In my travails I wondered why the first snippet works, but the > second does not? Is there any easy way to make the second snippet work? > > #Plot the modulus of the function, works > var('z',domain=CC) > var('x y', domain=RR) > var('rp ip') > z=x+i*y > rp = (2+z.conjugate()+z^3).real() > ip = (2+z.conjugate()+z^3).imag() > m(x,y) = sqrt(rp^2+ip^2) > plot3d(m(x,y).simplify(),(x,-1.5,1.5),(y,-1.5,1.5)) > > > > > My question is, why doesn't this work? > > #Plot the modulus of the function, fails > var('z',domain=CC) > var('x y', domain=RR) > z=x+i*y > m(x,y) = abs(2+z.conjugate()+z^3) > plot3d(m(x,y),(x,-1.5,1.5),(y,-1.5,1.5)) > > -- 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: Norm of real valued vector
add assume r>0 r,p = var('r', 'p', domain='real') assume(r>0) norm(vector([r*cos(p),r*sin(p)])).simplify_full() to obtain r Le samedi 19 avril 2014 20:53:53 UTC+2, Hadi Lq a écrit : > > Hi everyone > > sage: R.=RR[] > sage: rvec=vector([r*cos(p),r*sin(p)]) > sage: rr=rvec.norm() > sage: rr.simplify_full() > sqrt((abs(cos(p))^2 + abs(sin(p))^2)*abs(r)^2) > > which must gives me: r > How can I define real valued vector? > or How can I withdraw abs() function from norm? > > Ubuntu 13.10 > Sage Version 6.1.1, Release Date: 2014-02-04 > -- 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: Norm of real valued vector
You may try: r, p = var('r', 'p', domain = 'real') norm( vector([r*cos(p), r*sin(p)]) ).simplify_full() Le samedi 19 avril 2014 20:53:53 UTC+2, Hadi Lq a écrit : > > Hi everyone > > sage: R.=RR[] > sage: rvec=vector([r*cos(p),r*sin(p)]) > sage: rr=rvec.norm() > sage: rr.simplify_full() > sqrt((abs(cos(p))^2 + abs(sin(p))^2)*abs(r)^2) > > which must gives me: r > How can I define real valued vector? > or How can I withdraw abs() function from norm? > > Ubuntu 13.10 > Sage Version 6.1.1, Release Date: 2014-02-04 > -- 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] How to compute sum(log(1-1/n^2),n,2,oo)?
OK, but why we need to use "limit" to compute a convergent sum...? For instance sum(1/n^2,n,2,oo) gives pi^2/6-1 but limit(sum(1/n^2,n,2,x), x=oo) do not give a result... Le mercredi 16 avril 2014 12:29:08 UTC+2, jori.ma...@uta.fi a écrit : > > On Wed, 16 Apr 2014, Alberto Verga wrote: > > > n = var('n') > > sum(log(1-1/n^2),n,2,oo) > > > > do not give the answer -log(2), but a 0*infinity error. > > limit(sum(log(1-1/n^2),n,2,x), x=oo) > > -- > Jori Mäntysalo > -- 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] How to compute sum(log(1-1/n^2),n,2,oo)?
n = var('n') sum(log(1-1/n^2),n,2,oo) do not give the answer -log(2), but a 0*infinity error. -- 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: Strange behavior when trying to get help from command line
Complementing, in the notebook interface, help(sqrt) and help(diff) shows the help for the functions in a new tab, but help(exp), help(cos) and help(sin) opens a new tab, but shows only the name of the function, not the help. On Sunday, April 28, 2013 5:57:54 PM UTC-3, João Alberto Ferreira wrote: > > I perceived a strange behaviour when trying to get help from the command > line. When I hit > > sage: exp? > > for example, the help screen is shown as in the Fist_attempt.png appended > file. But, when I roll down and up again (using the arrow keys, or the > "space" or "b" keys), the help screen changes to the shown in the > Second_attempt.png appended file. For all commands tested, the first lines > of the help screen changed when I rolled down and up again. > > Still, the text of the help is duplicated. Is this correct? Some functions > do not show this duplicated text, like "sqrt", "diff", but others do, like > "cos", "sin". > > Cordially, > > João Alberto Ferreira. > > - > ~$ uname -a > Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 > i686 athlon i386 GNU/Linux > > sage: version() > 'Sage Version 5.8, Release Date: 2013-03-15' > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Re: "who" command - Sage Beginner's Guide example
Thank you for the reply! I took note and I will use the show_identifiers() function whenever necessary, as the it seems more useful than the "who" command. João Alberto Ferreira. On Wednesday, April 24, 2013 10:36:45 PM UTC-3, William wrote: > > Hi, > > I've never heard of this "who" function, but evidently it is in Ipython so > the sage command line automatically has it. Having never heard of "who", I > had implemented something similar for Sage back in 2004 (!) called > "show_identifiers()", which is like the same function in Magma (which is > called ShowIdentifiers() there). It is evidently different than "who" in > Ipython, since: > > sage: > show_identifiers() > > > ['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'quit'] > > sage: > R = 250e3 > > sage: > show_identifiers() > > ['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'R', 'quit'] > > > > With show_identifiers I made it record the actual objects at startup, and > check to see if they change. > > The code is here if you want to look at it: > > https://github.com/sagemath/sage/blob/master/src/sage/misc/session.pyx > > As show_identifiers() is a normal function call it should also work in the > notebook, scripts etc., rather than only on the interactive command line. > > William > > > On Wed, Apr 24, 2013 at 2:27 PM, João Alberto Ferreira > > > wrote: > >> Ok! thank you! >> >> >> On Wednesday, April 24, 2013 6:15:06 AM UTC-3, Volker Braun wrote: >>> >>> "who" prints the newly-defined variables, but R is already defined as >>> the r-system.org interface. You can redefine it as you want, but as far >>> as Python is concerned that just changes a variable but doesn't add a new >>> one. >>> >>> >>> >>> On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira >>> wrote: >>>> >>>> Hi! >>>> >>>> I was executing the examples of the Sage Beginner's Guide book when I >>>> found a curious behavior in Sage. >>>> >>>> Whenever I launch Sage and define the variable >>>> >>>> sage: R = 250e3 >>>> >>>> and issue the command >>>> >>>> sage: who >>>> >>>> the output is >>>> >>>> Interactive namespace is empty. >>>> >>>> If I define other variables and issue again the command "who", the >>>> other variables name are returned, but not the "R" variable name. >>>> >>>> Whenever I launch Sage and define a different variable name, like >>>> >>>> sage: j = 250e3 >>>> >>>> and issue the command "who", the output is presented correctly as "j". >>>> >>>> Is this a bug or I missed something? >>>> >>>> Cordially, >>>> >>>> João Alberto Ferreira. >>>> >>>> - >>>> ~$ uname -a >>>> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC >>>> 2013 i686 athlon i386 GNU/Linux >>>> >>>> sage: version() >>>> 'Sage Version 5.8, Release Date: 2013-03-15' >>> >>> -- >> 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...@googlegroups.com . >> To post to this group, send email to sage-s...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/sage-support?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > William Stein > Professor of Mathematics > University of Washington > http://wstein.org > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: "who" command - Sage Beginner's Guide example
Ok! thank you! On Wednesday, April 24, 2013 6:15:06 AM UTC-3, Volker Braun wrote: > > "who" prints the newly-defined variables, but R is already defined as the > r-system.org interface. You can redefine it as you want, but as far as > Python is concerned that just changes a variable but doesn't add a new one. > > > > On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira wrote: >> >> Hi! >> >> I was executing the examples of the Sage Beginner's Guide book when I >> found a curious behavior in Sage. >> >> Whenever I launch Sage and define the variable >> >> sage: R = 250e3 >> >> and issue the command >> >> sage: who >> >> the output is >> >> Interactive namespace is empty. >> >> If I define other variables and issue again the command "who", the other >> variables name are returned, but not the "R" variable name. >> >> Whenever I launch Sage and define a different variable name, like >> >> sage: j = 250e3 >> >> and issue the command "who", the output is presented correctly as "j". >> >> Is this a bug or I missed something? >> >> Cordially, >> >> João Alberto Ferreira. >> >> - >> ~$ uname -a >> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 >> i686 athlon i386 GNU/Linux >> >> sage: version() >> 'Sage Version 5.8, Release Date: 2013-03-15' > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] "who" command - Sage Beginner's Guide example
Hi! I was executing the examples of the Sage Beginner's Guide book when I found a curious behavior in Sage. Whenever I launch Sage and define the variable sage: R = 250e3 and issue the command sage: who the output is Interactive namespace is empty. If I define other variables and issue again the command "who", the other variables name are returned, but not the "R" variable name. Whenever I launch Sage and define a different variable name, like sage: j = 250e3 and issue the command "who", the output is presented correctly as "j". Is this a bug or I missed something? Cordially, João Alberto Ferreira. - ~$ uname -a Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 2013 i686 athlon i386 GNU/Linux sage: version() 'Sage Version 5.8, Release Date: 2013-03-15' -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Are there problems with the www.sagenb.org server? is down?
Now, that´s our problem, too El martes, 16 de octubre de 2012 14:43:43 UTC+2, projetmbc escribió: > > For my part, evaluation always "freezes". > > > 2012/10/16 kcrisman > > >> >> >> On Tuesday, October 16, 2012 8:07:38 AM UTC-4, projetmbc wrote: >>> >>> Hello. >>> >>> I've met the same problem today. >>> >>> Christophe. >>> >>> 2012/10/16 Alberto Fernandez >>> >>>> Hi >>>> >>>> Since yesterday we are trying to work with sage on the www.sagenb.org >>>> server and don´t performs calculations. Is this server down? Are our >>>> PC´s wrong? >>>> >>> >>> >> To be more precise, I just see a blank window when I actually load up a >> worksheet. Logging in works fine. Creating a new worksheet brings the >> same blank screen. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To post to this group, send email to sage-s...@googlegroups.com >> . >> To unsubscribe from this group, send email to >> sage-support...@googlegroups.com . >> Visit this group at http://groups.google.com/group/sage-support?hl=en. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Are there problems with the www.sagenb.org server? is down?
Hi Since yesterday we are trying to work with sage on the www.sagenb.org server and don´t performs calculations. Is this server down? Are our PC´s wrong? Thanks -- You received this message because you are subscribed to the Google Groups "sage-support" group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: VMWare Player versions for Sage 3.4.1
2.5.1 for sure that work. I has using 2.5.2 (that works fine with sage 3.2.2) but it seems to keep sage 3.4.1 in a continuous loop when entering "notebook" option. Have you check if during instalation the authorizations to wmware networks adapters in the windows firewall? On May 13, 9:18 pm, kilucas wrote: > I've had two attempts at installing the VMWare Player v2.5.2 on a > Windows XP Pro PC. Both times the Player will not start correctly - it > crashes Windows almost immediately the player has started. So I'm not > even getting as far as starting Sage. > > So I'm tempted to try earlier versions of the VMWare Player but wasn't > sure which I'd need for Sage 3.4.1. Options seem to include VMWare > Player 2.5.1, 2.5.0 and then 2.0.5 and earlier. > > Can anyone say which versions of the Player should be compatible with > Sage 3.4.1 please? > > Many thanks for your help. > > Kevin --~--~-~--~~~---~--~~ 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 an operation Sage is calling Maxima for
Thanks, Chris. Here's the code that generates k0: k=PolynomialRing(RationalField(),'k').gen() m3,m2,m1,m0=var('m3,m2,m1,m0') alpha,newbeta,delta,phi,psi,gamma=var('alpha,newbeta,delta,phi,psi,gamma') a,b,d=var('a,b,d') tl,tr,beta=var('tl,tr,beta') assume(tl>0,tr>.5,tl<.5,tr<1,beta>0,beta<1) f=(m3*k^3+m2*k^2+m1*k+m0) yy=f.roots() g0=yy[0][0].subs(m3=4,m2=2*alpha-2*delta-psi-gamma,m1=2*newbeta+2*phi +delta*gamma-alpha*psi,m0=-newbeta*psi-phi*gamma) h0=g0.subs(alpha=d-1-2*a,newbeta=2*(a*(1-d)),gamma=1+2*a-d,delta=1+d +2*b,phi=2*b*(1+d),psi=2*b+1+d) k0=h0.subs(a=tl,b=tr,d=2*beta) So basically k0 is one of the three symbolic roots of polynomial f, where the coefficients of f have been substituted by functions of the three ultimate parameters of the problem, tl,tr and beta. It is a function of these parameters. On Aug 29, 9:46 pm, Chris Chiasson <[EMAIL PROTECTED]> wrote: > This sounds like one of the questions that comes up on the Mathematica > user list. > > Is there any way you could give the setup for the problem at an > earlier stage in your computations? I think it might be easier for a > human to understand if he/she could see how you arrived at k0. > > On Aug 29, 6:33 pm, Alberto <[EMAIL PROTECTED]> wrote: > > > Think of k0 as one of the symbolic solutions to a cubic > > equation. It comes from using "roots()" on some cubic polynomial. k0 > > turns out to be a function of three parameters: "tl,tr and beta" (you > > can see what k0 looks like at the end of this message). > > > my problem is that i write > > > assume(tl>0,tr>.5,tl<.5,tr<1,beta>0,beta<1) > > > and then write > > > bool(k0.real()>0) > > > Sage then gives me the following error: > > > Computation failed since Maxima requested additional constraints (use > > assume): > > Is 4*(4*(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)^3 > > -18*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2) > > *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr) > > *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)) > > -(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^2 > > *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)^2 > > +432*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr)^2 > > +4*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^3 > >*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr) positive, negative, or zero? > > > So SUPPOSE I know that such term is indeed negative. So I write > > > assume(4*(4*(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)^3 > > -18*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2) > > *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr) > > *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)) > > -(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^2 > > *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr > > +4*(1-2*beta)*tl)^2 > > +432*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr)^2 > > +4*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^3 > >*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta > > +1)*tr)<0) > > > and then I write again > > > bool(k0.real()>0) > > > Here's the problem: Sage gives me exactly the same error, about the > > same expression, as if I had not assumed it negative. And I checked > > with assumptions() and verified that the assumption about the > > expression being negative was there. > > > Any insights as to what may be going on? > > > (to begin with I'm not even sure if writing k0.real() is legal, given > > what k0 is) > > > Should I be doing > > > bool(k0>0) > > > instead? > > > (case in which my problem is that I have tried bool(k0>0), bool(k0<0) > > and bool(k0==0) and I always get "False" even though I ran > > simulations for 1000 values of the parameters that go in k0 and in all > > cases k0>0. Is my problem then that I am expecting too much of > > "bool"?) > > > Thanks! > > > Alberto > > > ps-- here's the root i'm evaluating, k0: > > > (-sqrt(3)*I/2 - 1/2)*(sqrt(4*(4*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta > > + > > 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)^3 - 18*(-2*(2*tr + 2*beta > > + > > 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) -
[sage-support] problem with an operation Sage is calling Maxima for
Think of k0 as one of the symbolic solutions to a cubic equation. It comes from using "roots()" on some cubic polynomial. k0 turns out to be a function of three parameters: "tl,tr and beta" (you can see what k0 looks like at the end of this message). my problem is that i write assume(tl>0,tr>.5,tl<.5,tr<1,beta>0,beta<1) and then write bool(k0.real()>0) Sage then gives me the following error: Computation failed since Maxima requested additional constraints (use assume): Is 4*(4*(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)^3 -18*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2) *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr) *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)) -(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^2 *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)^2 +432*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr)^2 +4*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^3 *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr) positive, negative, or zero? So SUPPOSE I know that such term is indeed negative. So I write assume(4*(4*(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)^3 -18*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2) *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr) *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)) -(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^2 *(2*(2*tl-2*beta+1)*(2*tr+2*beta+1)+4*(2*beta+1)*tr +4*(1-2*beta)*tl)^2 +432*(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr)^2 +4*(-2*(2*tr+2*beta+1)-2*tr-2*tl+2*(-2*tl+2*beta-1)-2)^3 *(-2*(1-2*beta)*tl*(2*tr+2*beta+1)-2*(2*beta+1)*(2*tl-2*beta +1)*tr)<0) and then I write again bool(k0.real()>0) Here's the problem: Sage gives me exactly the same error, about the same expression, as if I had not assumed it negative. And I checked with assumptions() and verified that the assumption about the expression being negative was there. Any insights as to what may be going on? (to begin with I'm not even sure if writing k0.real() is legal, given what k0 is) Should I be doing bool(k0>0) instead? (case in which my problem is that I have tried bool(k0>0), bool(k0<0) and bool(k0==0) and I always get "False" even though I ran simulations for 1000 values of the parameters that go in k0 and in all cases k0>0. Is my problem then that I am expecting too much of "bool"?) Thanks! Alberto ps-- here's the root i'm evaluating, k0: (-sqrt(3)*I/2 - 1/2)*(sqrt(4*(4*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)^3 - 18*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr)*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)) - (-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^2*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)^2 + 432*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr)^2 + 4*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^3*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr))/(96*sqrt(3)) - ((-36*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl) + 432*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr) + 2*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^3)/3456))^(1/3) - ((sqrt(3)*I/2 - 1/2)*(12*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl) - (-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^2)/(144*(sqrt(4*(4*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)^3 - 18*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr)*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)) - (-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^2*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl)^2 + 432*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr)^2 + 4*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)^3*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*beta + 1)*tr))/(96*sqrt(3)) - ((-36*(-2*(2*tr + 2*beta + 1) - 2*tr - 2*tl + 2*(-2*tl + 2*beta - 1) - 2)*(2*(2*tl - 2*beta + 1)*(2*tr + 2*beta + 1) + 4*(2*beta + 1)*tr + 4*(1 - 2*beta)*tl) + 432*(-2*(1 - 2*beta)*tl*(2*tr + 2*beta + 1) - 2*(2*beta + 1)*(2*tl - 2*b