rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

taylor expansion issue #81

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-01 18:04:48 Created by igorpesando on 2017-03-03 18:58:40 Original: https://sourceforge.net/p/maxima/bugs/3290


Maxima version 5.37.2 using Lisp GNU Common Lisp (GCL) GCL 2.6.12 in ubuntu 16.04.2

Example: N:20; F:taylor((1+z)^(1/3),z,0,N); tmp:coeff(F,z,1); F/tmp;

the last command gives an error (with segfault if one tries to repeat it) Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-ERROR: Caught fatal error [memory may be damaged]

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-01 18:04:49 Created by robert_dodier on 2017-03-04 06:13:43 Original: https://sourceforge.net/p/maxima/bugs/3290/#7a61


I don't see that behavior. I tried it with both Clisp (Maxima 5.39.0) and GCL (post-5.39) on Ubuntu 14.04. Perhaps you can retry it with a new version?

EDIT: Fixed up formatting.

With Clisp:

$ maxima
Maxima 5.39.0 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) N:20;
(%o1)                                 20
(%i2) F:taylor((1+z)^(1/3),z,0,N);
                  2      3       4       5        6        7        8
             z   z    5 z    10 z    22 z    154 z    374 z    935 z
(%o2)/T/ 1 + - - -- + ---- - ----- + ----- - ------ + ------ - ------
             3   9     81     243     729     6561    19683    59049
          9          10           11            12            13            14
   21505 z    55913 z     147407 z     1179256 z     3174920 z     8617640 z
 + -------- - --------- + ---------- - ----------- + ----------- - -----------
   1594323     4782969     14348907     129140163     387420489    1162261467
             15              16              17                18
   70664648 z     194327782 z     537259162 z     13431479050 z
 + ------------ - ------------- + ------------- - ---------------
   10460353203     31381059609     94143178827     2541865828329
                19                 20
   37466757350 z     104906920580 z
 + --------------- - ---------------- + . . .
    7625597484987     22876792454961
(%i3) tmp:coeff(F,z,1);
                                       1
(%o3)/R/                               -
                                       3
(%i4) F/tmp;
                    2      3       4       5        6        7        8
                   z    5 z    10 z    22 z    154 z    374 z    935 z
(%o4)/T/ 3 + 1 z - -- + ---- - ----- + ----- - ------ + ------ - ------
                   3     27     81      243     2187     6561    19683
          9          10           11            12            13            14
   21505 z    55913 z     147407 z     1179256 z     3174920 z     8617640 z
 + -------- - --------- + ---------- - ----------- + ----------- - -----------
    531441     1594323     4782969      43046721      129140163     387420489
             15              16              17                18
   70664648 z     194327782 z     537259162 z     13431479050 z
 + ------------ - ------------- + ------------- - ---------------
    3486784401     10460353203     31381059609     847288609443
                19                 20
   37466757350 z     104906920580 z
 + --------------- - ---------------- + . . .
    2541865828329     7625597484987

With GCL:

$ sh maxima-local -l gcl
Maxima branch_5_39_base_82_g59007f6_dirty http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
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) N:20;
(%o1)                                 20
(%i2) F:taylor((1+z)^(1/3),z,0,N);
                  2      3       4       5        6        7        8
             z   z    5 z    10 z    22 z    154 z    374 z    935 z
(%o2)/T/ 1 + - - -- + ---- - ----- + ----- - ------ + ------ - ------
             3   9     81     243     729     6561    19683    59049
          9          10           11            12            13            14
   21505 z    55913 z     147407 z     1179256 z     3174920 z     8617640 z
 + -------- - --------- + ---------- - ----------- + ----------- - -----------
   1594323     4782969     14348907     129140163     387420489    1162261467
             15              16              17                18
   70664648 z     194327782 z     537259162 z     13431479050 z
 + ------------ - ------------- + ------------- - ---------------
   10460353203     31381059609     94143178827     2541865828329
                19                 20
   37466757350 z     104906920580 z
 + --------------- - ---------------- + . . .
    7625597484987     22876792454961
(%i3) tmp:coeff(F,z,1);
                                       1
(%o3)/R/                               -
                                       3
(%i4) F/tmp;
                    2      3       4       5        6        7        8
                   z    5 z    10 z    22 z    154 z    374 z    935 z
(%o4)/T/ 3 + 1 z - -- + ---- - ----- + ----- - ------ + ------ - ------
                   3     27     81      243     2187     6561    19683
          9          10           11            12            13            14
   21505 z    55913 z     147407 z     1179256 z     3174920 z     8617640 z
 + -------- - --------- + ---------- - ----------- + ----------- - -----------
    531441     1594323     4782969      43046721      129140163     387420489
             15              16              17                18
   70664648 z     194327782 z     537259162 z     13431479050 z
 + ------------ - ------------- + ------------- - ---------------
    3486784401     10460353203     31381059609     847288609443
                19                 20
   37466757350 z     104906920580 z
 + --------------- - ---------------- + . . .
    2541865828329     7625597484987