Possible bug in (our port of) Maxima : please check me

24 views
Skip to first unread message

Emmanuel Charpentier

unread,
Feb 20, 2021, 6:10:23 AM2/20/21
to sage-support
In 9.2.beta7, (our port of) Maxima seems to have an nice bug : inability to evaluate (some) symbolic sums. Minimal illustration :

```
;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sockets.fas"
using Lisp ECL 20.4.24
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) display2d:false;

(%o1) false
(%i2) sum(i, i, 1, 7);

(%o2) 28

/* As expected */

(%i3) sum(i, i, 1, p);

(%o3) 'sum(i,i,1,p)

/*Huh ? */

(%i4) sum(i, i, 1, p), nouns;

(%o4) 'sum(i,i,1,p)

/* !!!! */
```

Curiously, `sage` seems perfectly able to use Maxima's `sum` for its own purposes :

```
sage: sum(i, i, 1, n)
1/2*n^2 + 1/2*n
```

Could you check this ?

- On a standalone installation of Maxima

- On previous versions of Sage ?


Dima Pasechnik

unread,
Feb 20, 2021, 11:37:30 AM2/20/21
to sage-support
On Sat, Feb 20, 2021 at 11:10 AM Emmanuel Charpentier
<emanuel.c...@gmail.com> wrote:
>
> In 9.2.beta7, (our port of) Maxima seems to have an nice bug : inability to evaluate (some) symbolic sums. Minimal illustration :
>
> ```
> ;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sb-bsd-sockets.fas"
> ;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sockets.fas"
> Maxima 5.44.0 http://maxima.sourceforge.net
> using Lisp ECL 20.4.24
> 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) display2d:false;
>
> (%o1) false
> (%i2) sum(i, i, 1, 7);
>
> (%o2) 28
>
> /* As expected */
>
> (%i3) sum(i, i, 1, p);
>
> (%o3) 'sum(i,i,1,p)
>
> /*Huh ? */

sum() is lazy by default, you need

(%i5) sum(i,i,1,p), simpsum;

(%o5) (p^2+p)/2


HTH
Dima

>
> (%i4) sum(i, i, 1, p), nouns;
>
> (%o4) 'sum(i,i,1,p)
>
> /* !!!! */
> ```
>
> Curiously, `sage` seems perfectly able to use Maxima's `sum` for its own purposes :
>
> ```
> sage: sum(i, i, 1, n)
> 1/2*n^2 + 1/2*n
> ```
>
> Could you check this ?
>
> - On a standalone installation of Maxima
>
> - On previous versions of Sage ?
>
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/28fae2a2-ab48-426a-8045-a010bcd5ee83n%40googlegroups.com.

Emmanuel Charpentier

unread,
Feb 21, 2021, 3:48:17 AM2/21/21
to sage-support
Le samedi 20 février 2021 à 17:37:30 UTC+1, dim...@gmail.com a écrit :
On Sat, Feb 20, 2021 at 11:10 AM Emmanuel Charpentier
<emanuel.c...@gmail.com> wrote:
>
> In 9.2.beta7, (our port of) Maxima seems to have an nice bug : inability to evaluate (some) symbolic sums. Minimal illustration :
>
> ```
> ;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sb-bsd-sockets.fas"
> ;;; Loading #P"/usr/local/sage-9/local/lib/ecl/sockets.fas"
> Maxima 5.44.0 http://maxima.sourceforge.net
> using Lisp ECL 20.4.24
> 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) display2d:false;
>
> (%o1) false
> (%i2) sum(i, i, 1, 7);
>
> (%o2) 28
>
> /* As expected */
>
> (%i3) sum(i, i, 1, p);
>
> (%o3) 'sum(i,i,1,p)
>
> /*Huh ? */

sum() is lazy by default, you need

(%i5) sum(i,i,1,p), simpsum;

(%o5) (p^2+p)/2

My recollection of  `Maxima`'s  documentation was incorrect...


HTH

It did. Thank you very much !
Reply all
Reply to author
Forward
0 new messages