Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-24 Thread Sergey B Kirpichev
On Tue, Nov 24, 2015 at 04:12:52AM -0800, Dima Pasechnik wrote:
>If you first set domain to complex (and this is the setting Sage uses to
>call maxima), you get the same error as from Sage.

I have seen this post.  My messages arrive too late due to moderation, so
they a little dated.  Sorry for that.

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-24 Thread Dima Pasechnik


On Tuesday, 24 November 2015 11:12:13 UTC, Sergey Kirpichev wrote:
>
> On Monday, November 23, 2015 at 10:38:39 PM UTC+3, Ondrej Certik wrote:
>>
>> Note that William's result has one more zero in the answer... Which 
>> one is correct? 
>>
>
> Maxima's, of course.  btw, sympy's answer is same:
>  In [3]: limit(S(2)/5*((S(3)/4)**m - 1)*(a0 - 100) + 
> S(1)/5*(3*(S(3)/4)**m + 2)*a0, m, oo)
> Out[3]: 40
>
> I suspect just a typo in the William's reply.
>
yes, it was a typo - as confirmed by William: 
https://groups.google.com/d/msg/sage-support/rAkql0-A6cM/u4QxjVsXCAAJ

It seems that for some reason you haven't got the latest messages on this, 
or they were not
cross-posted as widely as some others.

 


 

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-24 Thread Dima Pasechnik


On Tuesday, 24 November 2015 11:12:13 UTC, Sergey Kirpichev wrote:
>
>
> On Monday, November 23, 2015 at 3:43:02 AM UTC+3, William wrote:
>>
>> This definitely looks like a bug.  In the meantime, a workaround is to 
>> use sympy: 
>>
>
>
> This is not a maxima bug:
>
>  Maxima 5.34.1 http://maxima.sourceforge.net
> using Lisp GNU Common Lisp (GCL) GCL 2.6.12 (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) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0, m, 
> inf);
> (%o1)   40
>

If you first set domain to complex (and this is the setting Sage uses to 
call maxima), you get the same
error as from Sage. See 
https://groups.google.com/d/msg/sage-support/rAkql0-A6cM/8zPsNUsYCAAJ

 

>
> or git version:
> Maxima branch_5_37_base_186_gfa7cd4a http://maxima.sourceforge.net
> using Lisp CLISP 2.49 (2010-07-07)
> 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) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0, m, 
> inf);
> (%o1)   40
>
> In fact, limit algorithm implementation in sympy is known to be
> broken.  (Hopefuly, this is fixed there:
> https://github.com/skirpichev/omg/, but this is not sympy.)
>
> At some point, presumably sympy will be uniformly better than maxima? 
>>
>
> I think that as ex-dev of sympy I have good reasons to believe that
> it's not the case..  Maxima community has less 1st year college students 
> but
> much more knowlegeable people. 
>

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-24 Thread Sergey Kirpichev
On Monday, November 23, 2015 at 10:38:39 PM UTC+3, Ondrej Certik wrote:
>
> Note that William's result has one more zero in the answer... Which 
> one is correct? 
>

Maxima's, of course.  btw, sympy's answer is same:
 In [3]: limit(S(2)/5*((S(3)/4)**m - 1)*(a0 - 100) + 
S(1)/5*(3*(S(3)/4)**m + 2)*a0, m, oo)
Out[3]: 40

I suspect just a typo in the William's reply.

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-24 Thread Sergey Kirpichev

On Monday, November 23, 2015 at 3:43:02 AM UTC+3, William wrote:
>
> This definitely looks like a bug.  In the meantime, a workaround is to 
> use sympy: 
>


This is not a maxima bug:

 Maxima 5.34.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12 (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) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0, m, 
inf);
(%o1)   40

or git version:
Maxima branch_5_37_base_186_gfa7cd4a http://maxima.sourceforge.net
using Lisp CLISP 2.49 (2010-07-07)
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) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0, m, 
inf);
(%o1)   40

In fact, limit algorithm implementation in sympy is known to be
broken.  (Hopefuly, this is fixed there:
https://github.com/skirpichev/omg/, but this is not sympy.)

At some point, presumably sympy will be uniformly better than maxima? 
>

I think that as ex-dev of sympy I have good reasons to believe that
it's not the case..  Maxima community has less 1st year college students but
much more knowlegeable people. 

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread Nils Bruin
On Monday, November 23, 2015 at 11:20:23 AM UTC-8, Dima Pasechnik wrote:
>
> the bug is not really in maxima, it's in Sage's interface to maxima:
>
> (%i7) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 
> 2)*a0,m,inf);
> (%o7)   40
>
> The stack overflow does happen in maxima, as you can see from the error 
messages that are printed upon failure in sage (the leading ";" gives a 
very lispy taste)

Indeed, if you execute

domain: complex;
limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0,m,inf);

things go haywire. Indeed, it's not hard to see how this limit might be 
problematic when viewed in terms of multi-valued complex functions.

Maxima/SBCL fails a little less harshly, but still fails on a lisp error.

I'm not sure if with "domain: complex" (which sage uses in maxima) this 
limit makes sense, but the way maxima fails is definitely a reportable bug 
in maxima.



 

> (this is with 'sage --maxima')
> probably extra maxima packages loaded along with maxima cause this OOM in 
> Sage.
>
>  
>
>>
>> Public worksheet: 
>>
>>
>> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>>  
>>
>> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  wrote: 
>> > Forwarded to the correct list 
>> > 
>> > -- Forwarded message -- 
>> > From: G. M.-S.  
>> > Date: Sun, Nov 22, 2015 at 4:34 PM 
>> > Subject: [sage-release] Bug in limit? 
>> > To: sage-r...@googlegroups.com 
>> > 
>> > 
>> > 
>> > Hello. 
>> > 
>> > This is my first post, please be indulgent. 
>> > 
>> > Is the following a bug? 
>> > 
>> > Thanks in advance. 
>> > 
>> > Guillermo Moreno-Socías 
>> > 
>> > ┌┐ 
>> > │ SageMath Version 6.9, Release Date: 2015-10-10 │ 
>> > │ Type "notebook()" for the browser-based notebook interface.│ 
>> > │ Type "help()" for help.│ 
>> > └┘ 
>> > sage: var('m a0') 
>> > (m, a0) 
>> > sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x 
>> > 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 
>> > sage: limit(x,m=oo) 
>> > 
>> > ;;; 
>> > ;;; Detected access to protected memory, also kwown as 'bus or 
>> > segmentation fault'. 
>> > ;;; Jumping to the outermost toplevel prompt 
>> > ;;; 
>> > 
>> > (Note that if x is expanded then the limit is correctly calculated.) 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "sage-release" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> > an email to sage-release...@googlegroups.com. 
>> > To post to this group, send email to sage-r...@googlegroups.com. 
>> > Visit this group at http://groups.google.com/group/sage-release. 
>> > 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...@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 (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.


Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread William Stein
On Mon, Nov 23, 2015 at 12:17 PM, Dima Pasechnik  wrote:
>
>
> On Monday, 23 November 2015 19:38:39 UTC, Ondrej Certik wrote:
>>
>> On Mon, Nov 23, 2015 at 12:20 PM, Dima Pasechnik  wrote:
>> >
>> >
>> > On Monday, 23 November 2015 00:43:02 UTC, William wrote:
>> >>
>> >> This definitely looks like a bug.  In the meantime, a workaround is to
>> >> use sympy:
>> >>
>> >> sage: var('m a0')
>> >> (m, a0)
>> >> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
>> >> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
>> >> sage: limit(x, m=oo)
>> >> [BAD]
>> >> sage: limit(x, m=oo, algorithm='sympy')
>> >> 400
>> >>
>> >> I wonder -- to what extent should we be using maxima by default still
>> >> for limits, instead of sympy...?  At some point, presumably sympy will
>> >> be uniformly better than maxima?
>> >
>> >
>> > the bug is not really in maxima, it's in Sage's interface to maxima:
>> >
>> > (%i7) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m +
>> > 2)*a0,m,inf);
>> > (%o7)   40
>>
>> Note that William's result has one more zero in the answer... Which
>> one is correct?
>
>
> one doesn't need a computer  here :)
> lim_{m->oo} 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 =
> 2/5*(0 - 1)*(a0 - 10^6) + 1/5*(0 + 2)*a0=2*10^6/5 = 40
>
> I don't know where extra 0 came from, I get the same answer as maxima or my
> pen:

Copy/paste error.  I gave a link to the actual session where everything is fine.

William

>
> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
> sage: limit(x, m=oo, algorithm="sympy")
> 40
>
> Dima
>>
>>
>> Ondrej
>>
>> >
>> > (this is with 'sage --maxima')
>> > probably extra maxima packages loaded along with maxima cause this OOM
>> > in
>> > Sage.
>> >
>> >
>> >>
>> >>
>> >> Public worksheet:
>> >>
>> >>
>> >>
>> >> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>> >>
>> >> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner 
>> >> wrote:
>> >> > Forwarded to the correct list
>> >> >
>> >> > -- Forwarded message --
>> >> > From: G. M.-S. 
>> >> > Date: Sun, Nov 22, 2015 at 4:34 PM
>> >> > Subject: [sage-release] Bug in limit?
>> >> > To: sage-r...@googlegroups.com
>> >> >
>> >> >
>> >> >
>> >> > Hello.
>> >> >
>> >> > This is my first post, please be indulgent.
>> >> >
>> >> > Is the following a bug?
>> >> >
>> >> > Thanks in advance.
>> >> >
>> >> > Guillermo Moreno-Socías
>> >> >
>> >> >
>> >> > ┌┐
>> >> > │ SageMath Version 6.9, Release Date: 2015-10-10
>> >> > │
>> >> > │ Type "notebook()" for the browser-based notebook interface.
>> >> > │
>> >> > │ Type "help()" for help.
>> >> > │
>> >> >
>> >> > └┘
>> >> > sage: var('m a0')
>> >> > (m, a0)
>> >> > sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
>> >> > 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
>> >> > sage: limit(x,m=oo)
>> >> >
>> >> > ;;;
>> >> > ;;; Detected access to protected memory, also kwown as 'bus or
>> >> > segmentation fault'.
>> >> > ;;; Jumping to the outermost toplevel prompt
>> >> > ;;;
>> >> >
>> >> > (Note that if x is expanded then the limit is correctly calculated.)
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "sage-release" group.
>> >> > To unsubscribe from this group and stop receiving emails from it,
>> >> > send
>> >> > an email to sage-release...@googlegroups.com.
>> >> > To post to this group, send email to sage-r...@googlegroups.com.
>> >> > Visit this group at http://groups.google.com/group/sage-release.
>> >> > 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...@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 (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...@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

Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread Dima Pasechnik


On Monday, 23 November 2015 19:38:39 UTC, Ondrej Certik wrote:
>
> On Mon, Nov 23, 2015 at 12:20 PM, Dima Pasechnik  > wrote: 
> > 
> > 
> > On Monday, 23 November 2015 00:43:02 UTC, William wrote: 
> >> 
> >> This definitely looks like a bug.  In the meantime, a workaround is to 
> >> use sympy: 
> >> 
> >> sage: var('m a0') 
> >> (m, a0) 
> >> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x 
> >> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 
> >> sage: limit(x, m=oo) 
> >> [BAD] 
> >> sage: limit(x, m=oo, algorithm='sympy') 
> >> 400 
> >> 
> >> I wonder -- to what extent should we be using maxima by default still 
> >> for limits, instead of sympy...?  At some point, presumably sympy will 
> >> be uniformly better than maxima? 
> > 
> > 
> > the bug is not really in maxima, it's in Sage's interface to maxima: 
> > 
> > (%i7) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 
> > 2)*a0,m,inf); 
> > (%o7)   40 
>
> Note that William's result has one more zero in the answer... Which 
> one is correct? 
>

one doesn't need a computer  here :)
lim_{m->oo} 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 = 
2/5*(0 - 1)*(a0 - 10^6) + 1/5*(0 + 2)*a0=2*10^6/5 = 40

I don't know where extra 0 came from, I get the same answer as maxima or my 
pen:

sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
sage: limit(x, m=oo, algorithm="sympy")
40

Dima

>
> Ondrej 
>
> > 
> > (this is with 'sage --maxima') 
> > probably extra maxima packages loaded along with maxima cause this OOM 
> in 
> > Sage. 
> > 
> > 
> >> 
> >> 
> >> Public worksheet: 
> >> 
> >> 
> >> 
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>  
> >> 
> >> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  
> wrote: 
> >> > Forwarded to the correct list 
> >> > 
> >> > -- Forwarded message -- 
> >> > From: G. M.-S.  
> >> > Date: Sun, Nov 22, 2015 at 4:34 PM 
> >> > Subject: [sage-release] Bug in limit? 
> >> > To: sage-r...@googlegroups.com 
> >> > 
> >> > 
> >> > 
> >> > Hello. 
> >> > 
> >> > This is my first post, please be indulgent. 
> >> > 
> >> > Is the following a bug? 
> >> > 
> >> > Thanks in advance. 
> >> > 
> >> > Guillermo Moreno-Socías 
> >> > 
> >> > 
> ┌┐ 
> >> > │ SageMath Version 6.9, Release Date: 2015-10-10 
> │ 
> >> > │ Type "notebook()" for the browser-based notebook interface.   
>  │ 
> >> > │ Type "help()" for help.   
>  │ 
> >> > 
> └┘ 
> >> > sage: var('m a0') 
> >> > (m, a0) 
> >> > sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x 
> >> > 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 
> >> > sage: limit(x,m=oo) 
> >> > 
> >> > ;;; 
> >> > ;;; Detected access to protected memory, also kwown as 'bus or 
> >> > segmentation fault'. 
> >> > ;;; Jumping to the outermost toplevel prompt 
> >> > ;;; 
> >> > 
> >> > (Note that if x is expanded then the limit is correctly calculated.) 
> >> > 
> >> > -- 
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "sage-release" group. 
> >> > To unsubscribe from this group and stop receiving emails from it, 
> send 
> >> > an email to sage-release...@googlegroups.com. 
> >> > To post to this group, send email to sage-r...@googlegroups.com. 
> >> > Visit this group at http://groups.google.com/group/sage-release. 
> >> > 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...@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 (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...@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...@goo

Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread Ondřej Čertík
On Mon, Nov 23, 2015 at 12:20 PM, Dima Pasechnik  wrote:
>
>
> On Monday, 23 November 2015 00:43:02 UTC, William wrote:
>>
>> This definitely looks like a bug.  In the meantime, a workaround is to
>> use sympy:
>>
>> sage: var('m a0')
>> (m, a0)
>> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
>> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
>> sage: limit(x, m=oo)
>> [BAD]
>> sage: limit(x, m=oo, algorithm='sympy')
>> 400
>>
>> I wonder -- to what extent should we be using maxima by default still
>> for limits, instead of sympy...?  At some point, presumably sympy will
>> be uniformly better than maxima?
>
>
> the bug is not really in maxima, it's in Sage's interface to maxima:
>
> (%i7) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m +
> 2)*a0,m,inf);
> (%o7)   40

Note that William's result has one more zero in the answer... Which
one is correct?

Ondrej

>
> (this is with 'sage --maxima')
> probably extra maxima packages loaded along with maxima cause this OOM in
> Sage.
>
>
>>
>>
>> Public worksheet:
>>
>>
>> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>>
>> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  wrote:
>> > Forwarded to the correct list
>> >
>> > -- Forwarded message --
>> > From: G. M.-S. 
>> > Date: Sun, Nov 22, 2015 at 4:34 PM
>> > Subject: [sage-release] Bug in limit?
>> > To: sage-r...@googlegroups.com
>> >
>> >
>> >
>> > Hello.
>> >
>> > This is my first post, please be indulgent.
>> >
>> > Is the following a bug?
>> >
>> > Thanks in advance.
>> >
>> > Guillermo Moreno-Socías
>> >
>> > ┌┐
>> > │ SageMath Version 6.9, Release Date: 2015-10-10 │
>> > │ Type "notebook()" for the browser-based notebook interface.│
>> > │ Type "help()" for help.│
>> > └┘
>> > sage: var('m a0')
>> > (m, a0)
>> > sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
>> > 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
>> > sage: limit(x,m=oo)
>> >
>> > ;;;
>> > ;;; Detected access to protected memory, also kwown as 'bus or
>> > segmentation fault'.
>> > ;;; Jumping to the outermost toplevel prompt
>> > ;;;
>> >
>> > (Note that if x is expanded then the limit is correctly calculated.)
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "sage-release" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an email to sage-release...@googlegroups.com.
>> > To post to this group, send email to sage-r...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/sage-release.
>> > 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...@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 (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.

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread Dima Pasechnik


On Monday, 23 November 2015 00:43:02 UTC, William wrote:
>
> This definitely looks like a bug.  In the meantime, a workaround is to 
> use sympy: 
>
> sage: var('m a0') 
> (m, a0) 
> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x 
> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 
> sage: limit(x, m=oo) 
> [BAD] 
> sage: limit(x, m=oo, algorithm='sympy') 
> 400 
>
> I wonder -- to what extent should we be using maxima by default still 
> for limits, instead of sympy...?  At some point, presumably sympy will 
> be uniformly better than maxima? 
>

the bug is not really in maxima, it's in Sage's interface to maxima:

(%i7) limit(2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 
2)*a0,m,inf);
(%o7)   40

(this is with 'sage --maxima')
probably extra maxima packages loaded along with maxima cause this OOM in 
Sage.

 

>
> Public worksheet: 
>
>
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>  
>
> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  > wrote: 
> > Forwarded to the correct list 
> > 
> > -- Forwarded message -- 
> > From: G. M.-S. > 
> > Date: Sun, Nov 22, 2015 at 4:34 PM 
> > Subject: [sage-release] Bug in limit? 
> > To: sage-r...@googlegroups.com  
> > 
> > 
> > 
> > Hello. 
> > 
> > This is my first post, please be indulgent. 
> > 
> > Is the following a bug? 
> > 
> > Thanks in advance. 
> > 
> > Guillermo Moreno-Socías 
> > 
> > ┌┐ 
> > │ SageMath Version 6.9, Release Date: 2015-10-10 │ 
> > │ Type "notebook()" for the browser-based notebook interface.│ 
> > │ Type "help()" for help.│ 
> > └┘ 
> > sage: var('m a0') 
> > (m, a0) 
> > sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x 
> > 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0 
> > sage: limit(x,m=oo) 
> > 
> > ;;; 
> > ;;; Detected access to protected memory, also kwown as 'bus or 
> > segmentation fault'. 
> > ;;; Jumping to the outermost toplevel prompt 
> > ;;; 
> > 
> > (Note that if x is expanded then the limit is correctly calculated.) 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "sage-release" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to sage-release...@googlegroups.com . 
> > To post to this group, send email to sage-r...@googlegroups.com 
> . 
> > Visit this group at http://groups.google.com/group/sage-release. 
> > 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...@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 (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.


Re: [sympy] Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread Aaron Meurer
(note, I am not on the sage list or gms list, so this probably won't
make it there unless someone forwards it)

SymPy's limit primarily uses the Gruntz algorithm, which is fairly
capable. I'm not an expert on it, so others will be able to comment in
more detail, but as far as I know, it's mostly reliant on the ability
to compute series expansions, which SymPy has built up quite a bit.
Computing series expansions and limits with this algorithm was one of
the first things SymPy was able to do when Ondrej created it back in
2005 (IIRC), so it's fairly developed. I believe the algorithm has
some difficulties with expressions with trigonometric functions (but
again, others should comment on that).

What algorithms does Maxima implement? Does Sage generally only use
one backend or can it also use fallback mechanisms. SymPy should
generally raise NotImplementedError (or maybe another error if there
is a bug) if it can't compute a limit.

Aaron Meurer


On Sun, Nov 22, 2015 at 6:42 PM, William Stein  wrote:
> This definitely looks like a bug.  In the meantime, a workaround is to
> use sympy:
>
> sage: var('m a0')
> (m, a0)
> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
> sage: limit(x, m=oo)
> [BAD]
> sage: limit(x, m=oo, algorithm='sympy')
> 400
>
> I wonder -- to what extent should we be using maxima by default still
> for limits, instead of sympy...?  At some point, presumably sympy will
> be uniformly better than maxima?
>
> Public worksheet:
>
> https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews
>
> On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  wrote:
>> Forwarded to the correct list
>>
>> -- Forwarded message --
>> From: G. M.-S. 
>> Date: Sun, Nov 22, 2015 at 4:34 PM
>> Subject: [sage-release] Bug in limit?
>> To: sage-rele...@googlegroups.com
>>
>>
>>
>> Hello.
>>
>> This is my first post, please be indulgent.
>>
>> Is the following a bug?
>>
>> Thanks in advance.
>>
>> Guillermo Moreno-Socías
>>
>> ┌┐
>> │ SageMath Version 6.9, Release Date: 2015-10-10 │
>> │ Type "notebook()" for the browser-based notebook interface.│
>> │ Type "help()" for help.│
>> └┘
>> sage: var('m a0')
>> (m, a0)
>> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
>> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
>> sage: limit(x,m=oo)
>>
>> ;;;
>> ;;; Detected access to protected memory, also kwown as 'bus or
>> segmentation fault'.
>> ;;; Jumping to the outermost toplevel prompt
>> ;;;
>>
>> (Note that if x is expanded then the limit is correctly calculated.)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "sage-release" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to sage-release+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-rele...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-release.
>> 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.
>
>
>
> --
> William (http://wstein.org)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CACLE5GAujsLOsoVfxQ2qxiydnYYRJsaEX_r9Efiw2LhUZC3V%3Dw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-support] Fwd: [sage-release] Bug in limit?

2015-11-23 Thread kcrisman

>
>
> I wonder -- to what extent should we be using maxima by default still 
> for limits, instead of sympy...?  At some point, presumably sympy will 
> be uniformly better than maxima? 
>
>
>
I've been wondering about this as well (also integrals) for some time. 
 Unfortunately I haven't had time to systematically try things out.   

-- 
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] Fwd: [sage-release] Bug in limit?

2015-11-22 Thread William Stein
This definitely looks like a bug.  In the meantime, a workaround is to
use sympy:

sage: var('m a0')
(m, a0)
sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
sage: limit(x, m=oo)
[BAD]
sage: limit(x, m=oo, algorithm='sympy')
400

I wonder -- to what extent should we be using maxima by default still
for limits, instead of sympy...?  At some point, presumably sympy will
be uniformly better than maxima?

Public worksheet:

https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-11-22-163829-limit.sagews

On Sun, Nov 22, 2015 at 2:00 PM, David Joyner  wrote:
> Forwarded to the correct list
>
> -- Forwarded message --
> From: G. M.-S. 
> Date: Sun, Nov 22, 2015 at 4:34 PM
> Subject: [sage-release] Bug in limit?
> To: sage-rele...@googlegroups.com
>
>
>
> Hello.
>
> This is my first post, please be indulgent.
>
> Is the following a bug?
>
> Thanks in advance.
>
> Guillermo Moreno-Socías
>
> ┌┐
> │ SageMath Version 6.9, Release Date: 2015-10-10 │
> │ Type "notebook()" for the browser-based notebook interface.│
> │ Type "help()" for help.│
> └┘
> sage: var('m a0')
> (m, a0)
> sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
> 2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
> sage: limit(x,m=oo)
>
> ;;;
> ;;; Detected access to protected memory, also kwown as 'bus or
> segmentation fault'.
> ;;; Jumping to the outermost toplevel prompt
> ;;;
>
> (Note that if x is expanded then the limit is correctly calculated.)
>
> --
> You received this message because you are subscribed to the Google
> Groups "sage-release" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-release+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-rele...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-release.
> 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.



-- 
William (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] Fwd: [sage-release] Bug in limit?

2015-11-22 Thread David Joyner
Forwarded to the correct list

-- Forwarded message --
From: G. M.-S. 
Date: Sun, Nov 22, 2015 at 4:34 PM
Subject: [sage-release] Bug in limit?
To: sage-rele...@googlegroups.com



Hello.

This is my first post, please be indulgent.

Is the following a bug?

Thanks in advance.

Guillermo Moreno-Socías

┌┐
│ SageMath Version 6.9, Release Date: 2015-10-10 │
│ Type "notebook()" for the browser-based notebook interface.│
│ Type "help()" for help.│
└┘
sage: var('m a0')
(m, a0)
sage: x=2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0;x
2/5*((3/4)^m - 1)*(a0 - 100) + 1/5*(3*(3/4)^m + 2)*a0
sage: limit(x,m=oo)

;;;
;;; Detected access to protected memory, also kwown as 'bus or
segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;

(Note that if x is expanded then the limit is correctly calculated.)

--
You received this message because you are subscribed to the Google
Groups "sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-release+unsubscr...@googlegroups.com.
To post to this group, send email to sage-rele...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-release.
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.