Re: [sage-support] Re: Jacobi sn
A quick follow-up: On Nov 19, 2012, at 23:25 , Justin C. Walker wrote: > On Nov 19, 2012, at 22:36 , Jan Groenewald wrote: [snip] > Using Mac OS X, 10.6.8. Sage 4.8 has maxima 5.23 (maxima-5.23.2.p3.spkg); > 5.0-beta2 has maxima 5.26. [snip] > >> sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) > > With sage-5.0-beta2, the above is duplicated, except that the last line has > been going (and going, and ...) for several minutes now, with no signs of > abating. It's adding small increments of memory, second by second... This blew chunks, after a fairly long delay, as follows: Traceback (most recent call last): File "", line 1, in File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/functional.py", line 1275, in numerical_approx return x._numerical_approx(prec) File "expression.pyx", line 4082, in sage.symbolic.expression.Expression._numerical_approx (sage/symbolic/expression.cpp:18084) File "expression.pyx", line 841, in sage.symbolic.expression.Expression._convert (sage/symbolic/expression.cpp:5122) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/functions/special.py", line 510, in _evalf_ return parent(maxima("%s, numer"%self._maxima_init_evaled_(*args))) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py", line 277, in __call__ return Parent.__call__(self, x) File "parent.pyx", line 1058, in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7886) File "coerce_maps.pyx", line 82, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3344) File "coerce_maps.pyx", line 77, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3247) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py", line 305, in _element_constructor_ return x._complex_mpfr_field_( self ) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/maxima_abstract.py", line 1291, in _complex_mpfr_field_ return C(self._sage_()) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py", line 277, in __call__ return Parent.__call__(self, x) File "parent.pyx", line 1058, in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7886) File "coerce_maps.pyx", line 82, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3344) File "coerce_maps.pyx", line 77, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3247) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/rings/complex_field.py", line 305, in _element_constructor_ return x._complex_mpfr_field_( self ) File "expression.pyx", line 933, in sage.symbolic.expression.Expression._complex_mpfr_field_ (sage/symbolic/expression.cpp:5556) File "expression.pyx", line 792, in sage.symbolic.expression.Expression._eval_self (sage/symbolic/expression.cpp:4969) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/functions/special.py", line 510, in _evalf_ return parent(maxima("%s, numer"%self._maxima_init_evaled_(*args))) File "lazy_import.pyx", line 199, in sage.misc.lazy_import.LazyImport.__call__ (sage/misc/lazy_import.c:1509) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 198, in __call__ return cls(self, x, name=name) File "/Users/Sage/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 625, in __init__ raise TypeError, x TypeError: ECL says: Memory limit reached. Please jump to an outer pointer, quit program and enlarge the memory limits before executing the program again. Justin -- Justin C. Walker, Curmudgeon-at-Large () The ASCII Ribbon Campaign /\ Help Cure HTML Email -- 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.
Re: [sage-support] Re: Jacobi sn
On Tue, 20 Nov 2012 09:25:21 +0100 Burcin Erocal wrote: > On Mon, 19 Nov 2012 23:25:34 -0800 > "Justin C. Walker" wrote: > > > > > On Nov 19, 2012, at 22:36 , Jan Groenewald wrote: > > > > > On 16 September 2012 08:08, Robert Dodier > > > wrote: > > > > > >> On 2012-09-16, kcrisman wrote: > > > > > Either that was a regression specifric to maxima 5.26, or this > > > problem is particular > > > to the sage interface to maxima. Original problem: > > > > > > 0 jan@muizenberg:/var/autofs/misc/home/jan$sage > > > -- > > > | Sage Version 5.4, Release Date: > > > 2012-11-09 | | Type "notebook()" for the > > > browser-based notebook interface.| | Type "help()" for > > > help.| > > > -- > > > sage: u=1.2 sage: m=0.5 > > > sage: jacobi('sn',u,m) > > > 0.887715488619 > > > sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m) > > > jacobi_sn(1.2 + 3.7081493546*I, 0.500) > > > sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) > > > > With sage-5.0-beta2, the above is duplicated, except that the last > > line has been going (and going, and ...) for several minutes now, > > with no signs of abating. It's adding small increments of memory, > > second by second... > > Numerical evaluation for this function is done by the _evalf_() > function defined on line 489 of sage/functions/special.py. The last > line of that function is: > > return parent(maxima("%s, numer"%self._maxima_init_evaled_(*args))) > > Here is what happens: > > sage: maxima("jacobi_sn(1.2000 + 3.7081493546027438*I, > 0.5), numer") > jacobi_sn(3.7081493546027438*I+1.2,0.5) > > > Trying to convert this to an element of RR, or whatever the chosen > parent for the numerical evaluation is, calls this function again. > > The problem is with the conversion of the argument to maxima in the > _maxima_init_evaled_ function. I will open a ticket and try to provide > a patch today. Gotta run now. Apparently, this was #7557 all along. I uploaded a patch. Please review. http://trac.sagemath.org/sage_trac/ticket/7557 Cheers, Burcin -- 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.
Re: [sage-support] Re: Jacobi sn
On Mon, 19 Nov 2012 23:25:34 -0800 "Justin C. Walker" wrote: > > On Nov 19, 2012, at 22:36 , Jan Groenewald wrote: > > > On 16 September 2012 08:08, Robert Dodier > > wrote: > > > >> On 2012-09-16, kcrisman wrote: > > > Either that was a regression specifric to maxima 5.26, or this > > problem is particular > > to the sage interface to maxima. Original problem: > > > > 0 jan@muizenberg:/var/autofs/misc/home/jan$sage > > -- > > | Sage Version 5.4, Release Date: > > 2012-11-09 | | Type "notebook()" for the > > browser-based notebook interface.| | Type "help()" for > > help.| > > -- > > sage: u=1.2 sage: m=0.5 > > sage: jacobi('sn',u,m) > > 0.887715488619 > > sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m) > > jacobi_sn(1.2 + 3.7081493546*I, 0.500) > > sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) > > With sage-5.0-beta2, the above is duplicated, except that the last > line has been going (and going, and ...) for several minutes now, > with no signs of abating. It's adding small increments of memory, > second by second... Numerical evaluation for this function is done by the _evalf_() function defined on line 489 of sage/functions/special.py. The last line of that function is: return parent(maxima("%s, numer"%self._maxima_init_evaled_(*args))) Here is what happens: sage: maxima("jacobi_sn(1.2000 + 3.7081493546027438*I, 0.5), numer") jacobi_sn(3.7081493546027438*I+1.2,0.5) Trying to convert this to an element of RR, or whatever the chosen parent for the numerical evaluation is, calls this function again. The problem is with the conversion of the argument to maxima in the _maxima_init_evaled_ function. I will open a ticket and try to provide a patch today. Gotta run now. Cheers, Burcin -- 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.
Re: [sage-support] Re: Jacobi sn
Hi I can also do this (Note the only change I -> %i): sage: maxima("jacobi_sn(1.2 + 3.7081493546*I, 0.500)") jacobi_sn(3.7081493546*I+1.2,0.5) sage: maxima("jacobi_sn(1.2 + 3.7081493546*%i, 0.500)") .8877154886192803-9.851415480779732e-13*%i sage: Regards, Jan On 20 November 2012 09:25, Justin C. Walker wrote: > > On Nov 19, 2012, at 22:36 , Jan Groenewald wrote: > > > On 16 September 2012 08:08, Robert Dodier > wrote: > > > >> On 2012-09-16, kcrisman wrote: > > Using Mac OS X, 10.6.8. Sage 4.8 has maxima 5.23 (maxima-5.23.2.p3.spkg); > 5.0-beta2 has maxima 5.26. > > > Maxima 5.24.0 http://maxima.sourceforge.net > > using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL) > > Distributed under the GNU Public License. See the file COPYING. > > Dedicated to the memory of William Schelter. > > The function bug_report() provides bug reporting information. > > (%i1) u : 1.2 $ > > (%i2) m : 0.5 $ > > (%i3) jacobi_sn (u, m); > > (%o3) 0.88771548861928 > > (%i4) jacobi_sn (u + 2 * %i * elliptic_kc (1 - m), m); > > (%o4)0.88771548861928 - 1.7301614091485549E-15 %i > > I get (maxima 5.26) 0.88771548861928 - 1.7919528880467195e-15 %i > > > > Either that was a regression specifric to maxima 5.26, or this problem is > > particular > > to the sage interface to maxima. Original problem: > > > > 0 jan@muizenberg:/var/autofs/misc/home/jan$sage > > -- > > | Sage Version 5.4, Release Date: 2012-11-09 | > > | Type "notebook()" for the browser-based notebook interface.| > > | Type "help()" for help.| > > -- > > sage: u=1.2 > > sage: m=0.5 > > sage: jacobi('sn',u,m) > > 0.887715488619 > > sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m) > > jacobi_sn(1.2 + 3.7081493546*I, 0.500) > > sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) > > With sage-5.0-beta2, the above is duplicated, except that the last line > has been going (and going, and ...) for several minutes now, with no signs > of abating. It's adding small increments of memory, second by second... > > Justin > > -- > Justin C. Walker, Curmudgeon at Large > Institute for the Absorption of Federal Funds > --- > Like the ski resort full of girls hunting for husbands > and husbands hunting for girls, the situation is not > as symmetrical as it might seem. > - Alan MacKay > -- > > -- > 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. > > > -- .~. /V\ Jan Groenewald /( )\www.aims.ac.za ^^-^^ -- 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.
Re: [sage-support] Re: Jacobi sn
On Nov 19, 2012, at 22:36 , Jan Groenewald wrote: > On 16 September 2012 08:08, Robert Dodier wrote: > >> On 2012-09-16, kcrisman wrote: Using Mac OS X, 10.6.8. Sage 4.8 has maxima 5.23 (maxima-5.23.2.p3.spkg); 5.0-beta2 has maxima 5.26. > Maxima 5.24.0 http://maxima.sourceforge.net > using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL) > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > The function bug_report() provides bug reporting information. > (%i1) u : 1.2 $ > (%i2) m : 0.5 $ > (%i3) jacobi_sn (u, m); > (%o3) 0.88771548861928 > (%i4) jacobi_sn (u + 2 * %i * elliptic_kc (1 - m), m); > (%o4)0.88771548861928 - 1.7301614091485549E-15 %i I get (maxima 5.26) 0.88771548861928 - 1.7919528880467195e-15 %i > Either that was a regression specifric to maxima 5.26, or this problem is > particular > to the sage interface to maxima. Original problem: > > 0 jan@muizenberg:/var/autofs/misc/home/jan$sage > -- > | Sage Version 5.4, Release Date: 2012-11-09 | > | Type "notebook()" for the browser-based notebook interface.| > | Type "help()" for help.| > -- > sage: u=1.2 > sage: m=0.5 > sage: jacobi('sn',u,m) > 0.887715488619 > sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m) > jacobi_sn(1.2 + 3.7081493546*I, 0.500) > sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) With sage-5.0-beta2, the above is duplicated, except that the last line has been going (and going, and ...) for several minutes now, with no signs of abating. It's adding small increments of memory, second by second... Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds --- Like the ski resort full of girls hunting for husbands and husbands hunting for girls, the situation is not as symmetrical as it might seem. - Alan MacKay -- -- 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.
Re: [sage-support] Re: Jacobi sn
Hi (should this thread be on sage-devel?) On 16 September 2012 08:08, Robert Dodier wrote: > On 2012-09-16, kcrisman wrote: > > > I don't have access to a Maxima instance right now - can someone try to > > recreate this there? > > For the record, here's what I get w/ Maxima 5.28.0 (current release). > > (%i1) u : 1.2 $ > (%i2) m : 0.5 $ > (%i3) jacobi_sn (u, m); > (%o3) .8877154886192781 > (%i4) jacobi_sn (u + 2 * %i * elliptic_kc (1 - m), m); > (%o4) 0.88771548861928 - 1.884363664625109E-15 %i > > I get the same result in maxima 5.24, the stock version on Ubuntu 12.04. 0 jan@muizenberg:/var/autofs/misc/home/jan$maxima Maxima 5.24.0 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (a.k.a. GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) u : 1.2 $ (%i2) m : 0.5 $ (%i3) jacobi_sn (u, m); (%o3) 0.88771548861928 (%i4) jacobi_sn (u + 2 * %i * elliptic_kc (1 - m), m); (%o4)0.88771548861928 - 1.7301614091485549E-15 %i (%i5) Either that was a regression specifric to maxima 5.26, or this problem is particular to the sage interface to maxima. Original problem: 0 jan@muizenberg:/var/autofs/misc/home/jan$sage -- | Sage Version 5.4, Release Date: 2012-11-09 | | Type "notebook()" for the browser-based notebook interface.| | Type "help()" for help.| -- sage: u=1.2 sage: m=0.5 sage: jacobi('sn',u,m) 0.887715488619 sage: jacobi('sn',u+2*I*elliptic_kc(1-m),m) jacobi_sn(1.2 + 3.7081493546*I, 0.500) sage: n(jacobi('sn',u+2*I*elliptic_kc(1-m),m)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (8886, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (8886, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (8886, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (8886, 0)) ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (8886, 0)) ^C KeyboardInterrupt sage: Can some one test this code on a sage which includes maxima 5.24? >From http://maxima.sourceforge.net/ looks like that might be sage 4.8. And can someone test this code on a standalone maxima 5.26? Regards, Jan -- .~. /V\ Jan Groenewald /( )\www.aims.ac.za ^^-^^ -- 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.