[sage-support] Re: SAGE and .NET interoperability.
William, I think I can reproduce one of your Itanium GAP bug; the workspace filename gets mangled by SaveWorkspace. (so the workspace gets saved, but with a horribly wrong name...) Should be next to trivial to fix... Dima PS. Let's move this discussion over to sage-devel, as already suggested here. On Jan 10, 5:39 am, William Stein wrote: [...] > Last time with gap-4.4.12 (I think), the spkg worked on everything but > Itanium, where there were serious issues (mainly involving saving > workspaces, I think, which our test suite caught). [...] -- 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 URL: http://www.sagemath.org
[sage-support] Re: plotting the quotient of two degree 128 polynomials
I could be wrong but that problem might relate to the fact that plotting is often done in floats, which can't handle quantities like 15^1024. Other types in Sage can handle such things, so you might have to work around that limitation by plotting the log of the function or something similar. -M. Hampton On Jan 9, 4:11 pm, zieglerk wrote: > Thanks, indeed this solved the problem in the example. > > Unfortunately, there is still a problem, if the degree of both > polynomials U and V increases to, say d = 1024. Note that the degree > of the rational function P = U/V is still 0 and both poles (0 and 1) > are far enough outside of the range where I want to plot. > > d = 1024 > R = PolynomialRing(ZZ, x) > U = x^d + R.random_element(d-1) > V = x^d - x^(d-1) > U = expand(U) > V = expand(V) > P = U/V > G = P.plot(2, 15) > G.show() > > returns > > verbose 0 (2999: plot.py, generate_plot_points) WARNING: When > plotting, failed to evaluate function at 5 points. > verbose 0 (2999: plot.py, generate_plot_points) Last error message: '' > > as error message. And even the option plot_points=5 does not change > that, although computing several values for P on the interval goes > smoothely. > > Perhaps the problem is, that plot stores the values of P as fractions > with quite large numerator and denominator, although it would suffice > to store a numerical approximation -- which is someplace around 1? > > Any ideas? > Konstantin -- 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 URL: http://www.sagemath.org
[sage-support] Re: plotting the quotient of two degree 128 polynomials
Thanks, indeed this solved the problem in the example. Unfortunately, there is still a problem, if the degree of both polynomials U and V increases to, say d = 1024. Note that the degree of the rational function P = U/V is still 0 and both poles (0 and 1) are far enough outside of the range where I want to plot. d = 1024 R = PolynomialRing(ZZ, x) U = x^d + R.random_element(d-1) V = x^d - x^(d-1) U = expand(U) V = expand(V) P = U/V G = P.plot(2, 15) G.show() returns verbose 0 (2999: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 5 points. verbose 0 (2999: plot.py, generate_plot_points) Last error message: '' as error message. And even the option plot_points=5 does not change that, although computing several values for P on the interval goes smoothely. Perhaps the problem is, that plot stores the values of P as fractions with quite large numerator and denominator, although it would suffice to store a numerical approximation -- which is someplace around 1? Any ideas? Konstantin -- 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 URL: http://www.sagemath.org
Re: [sage-support] Re: SAGE and .NET interoperability.
On Sat, Jan 9, 2010 at 11:36 AM, Dr. David Kirkby wrote: > Dima Pasechnik wrote: > >> William, >> I emailed you few weeks back asking what exactly you mean by Itanium >> environment, as I was unable to reproduce your problems on an Itanium >> cluster I have access to--- at least not with gcc. >> At least not in a stand-alone build of GAP. >> Intel compilers showed to be trickier. >> >> So, once again, what exactly is going wrong with the current GAP on >> Itanium, in your view? >> >> Dmitrii > > It might help if you all clarify *exactly* what you mean by "Itanium > environment". Itanium is a processor, which can run many operating systems. > > * Various versions of Windows run on Itanium. > * HP-UX runs on Itanium > * There have been versions of Solaris for it, though none officially > released from Sun. > * Numerous linux distributions will run on Itanium. (Debian, Redhat, Gentoo > ...) > * Others too. > First -- Dima -- thanks for all your posts to the sage-* lists. It's really awesome to have another GAP expert around! Regarding Itanium and Sage, here's the specific statement from our README.txt about Sage's "official platform support": OFFICIALLY SUPPORTED PLATFORMS -- Building of Sage from source is regularly tested on (minimal installs of) the following platforms: PROCESSOROPERATING SYSTEM x86 32-bit Linux -- Debian, Ubuntu, CentOS (=Red Hat), Fedora, openSUSE, Mandriva x86_64 64-bit Linux -- Debian, Ubuntu, CentOS (=Red Hat), Fedora, openSUSE, Mandriva IA-64 Itanium 2 64-bit Linux -- Red Hat, SUSE x86 Apple Mac OS X 10.5.x PPC Apple Mac OS X 10.5.x In particular, we support running Sage on Itanium 2 with 64-bit RHEL or SUSE. In order to upgrade the GAP spkg in Sage, we just need an spkg that can be dropped into the Sage install (i.e., sage -i gap-.spkg) such that the Sage test suite passes: make test ... All tests pass! Last time with gap-4.4.12 (I think), the spkg worked on everything but Itanium, where there were serious issues (mainly involving saving workspaces, I think, which our test suite caught). We couldn't sort out the issues when making that particular Sage release, so we just reverted to gap-4.4.10, hoping that things would get fixed by the next Sage release. (I did write to Steve Linton about the issues, but I don't think I did a good job following up...) But then we got lazy, and here we are. But you're clearly not lazy, so I really hope this gets sorted out. Note that GAP didn't support Itanium at all 2 years ago. I got access to some Itanium machines, and then convinced Steve Linton to write new assembly code so that the memory manager for GAP would work on Itanium. He graciously did so, for which I'm very thankful. If you need access to the Itaniums I use for build testing, let me know (off list) and that can be arranged. -- William -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
Re: [sage-support] How to convert an element in a polynomial ring to sage expression
On Sat, Jan 9, 2010 at 1:11 PM, Shing Hing Man wrote: > Hi, > First, I define the ring of polynomial over the rationals, S. > Then define a polynomial g in S. > Is there a simple way to convert g to type > 'sage.symbolic.expression.Expression' ? > > sage: S. = PolynomialRing(QQ);S > Univariate Polynomial Ring in x over Rational Field > sage: g = x^3 - 11*x^2 + 40*x -48;type(g) > 'sage.rings.polynomial.polynomial_element_generic.Polynomial_rational_dense'>- > > Thanks in advance for any assistance! > Shing > Yes, type SR(g): sage: sage: S. = PolynomialRing(QQ);S Univariate Polynomial Ring in x over Rational Field sage: g = x^3 - 11*x^2 + 40*x -48;type(g) sage: SR Symbolic Ring sage: SR(g) ((x - 11)*x + 40)*x - 48 sage: type(SR(g)) In general, in Sage to convert an object obj to some structure X, do "X(obj)". William -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
[sage-support] How to convert an element in a polynomial ring to sage expression
Hi, First, I define the ring of polynomial over the rationals, S. Then define a polynomial g in S. Is there a simple way to convert g totype 'sage.symbolic.expression.Expression' ? sage: S. = PolynomialRing(QQ);S Univariate Polynomial Ring in x over Rational Field sage: g = x^3 - 11*x^2 + 40*x -48;type(g) - Thanks in advance for any assistance! Shing -- 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 URL: http://www.sagemath.org
[sage-support] Re: plotting the quotient of two degree 128 polynomials
Somehow the nested form of the polynomials is causing problems. Using expand, rather than full_simplify, seems to solve the problem: d = 128 R = PolynomialRing(ZZ, x) U = x^d + R.random_element(d-1) V = x^d - x^(d-1) U = expand(U) V = expand(V) P = U/V G = P.plot(2, 15) G.show() Hope that helps, M. Hampton On Jan 9, 9:28 am, zieglerk wrote: > Hi, > > I have two monic polynomials U, V of equal degree d with integer > coefficients. Furthermore the second one is of particularly simple > form, namely with roots only at 0 and 1. I want to plot the value of > their quotient in the range from 2 to 15. > > Evaluating the quotient for any specific x in that range is no > problem, but plotting usually fails with the message > > verbose 0 (2999: plot.py, generate_plot_points) WARNING: When > plotting, failed to evaluate function at 200 points. > verbose 0 (2999: plot.py, generate_plot_points) Last error message: '' > > Changing the number of plot_points does not help, so I tried to > generate a minimal example for the mailing list. (My polynomials U > and V are the result of a quite lengthy computation) > > d = 128 > R = PolynomialRing(ZZ, x) > U = x^d + R.random_element(d-1) > V = x^d - x^(d-1) > P = U/V > P = P.simplify_full() > G = P.plot(2, 15) > G.show() > > Now, problems occur already earlier. The simplify_full exits with > > RuntimeError: maximum recursion depth exceeded > > and if I leave it out, the plotting fails with the same error. Is > there something wrong in the way I use simplify_full or is this just > not the way to plot such functions? > > Thanks, > Konstantin > > PS: I run Sage Version 4.1.1 on OpenSUSE 11.1 from Emacs. -- 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 URL: http://www.sagemath.org
Re: [sage-support] Re: SAGE and .NET interoperability.
Dima Pasechnik wrote: William, I emailed you few weeks back asking what exactly you mean by Itanium environment, as I was unable to reproduce your problems on an Itanium cluster I have access to--- at least not with gcc. At least not in a stand-alone build of GAP. Intel compilers showed to be trickier. So, once again, what exactly is going wrong with the current GAP on Itanium, in your view? Dmitrii It might help if you all clarify *exactly* what you mean by "Itanium environment". Itanium is a processor, which can run many operating systems. * Various versions of Windows run on Itanium. * HP-UX runs on Itanium * There have been versions of Solaris for it, though none officially released from Sun. * Numerous linux distributions will run on Itanium. (Debian, Redhat, Gentoo ...) * Others too. BTW, if you want a free trial of Microsoft Server 2008 for Itanium, get one here. (I personally wont be joining you in the queue). http://www.microsoft.com/servers/64bit/itanium/overview.mspx Dave -- 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 URL: http://www.sagemath.org
[sage-support] plotting the quotient of two degree 128 polynomials
Hi, I have two monic polynomials U, V of equal degree d with integer coefficients. Furthermore the second one is of particularly simple form, namely with roots only at 0 and 1. I want to plot the value of their quotient in the range from 2 to 15. Evaluating the quotient for any specific x in that range is no problem, but plotting usually fails with the message verbose 0 (2999: plot.py, generate_plot_points) WARNING: When plotting, failed to evaluate function at 200 points. verbose 0 (2999: plot.py, generate_plot_points) Last error message: '' Changing the number of plot_points does not help, so I tried to generate a minimal example for the mailing list. (My polynomials U and V are the result of a quite lengthy computation) d = 128 R = PolynomialRing(ZZ, x) U = x^d + R.random_element(d-1) V = x^d - x^(d-1) P = U/V P = P.simplify_full() G = P.plot(2, 15) G.show() Now, problems occur already earlier. The simplify_full exits with RuntimeError: maximum recursion depth exceeded and if I leave it out, the plotting fails with the same error. Is there something wrong in the way I use simplify_full or is this just not the way to plot such functions? Thanks, Konstantin PS: I run Sage Version 4.1.1 on OpenSUSE 11.1 from Emacs. -- 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 URL: http://www.sagemath.org