#1274 fatal error: Integral calculation failure

closed
nobody
None
5
2007-10-02
2007-09-30
Anonymous
No

(%i1) f(x):=sin(x);
(%o1) f(x) := sin(x)
(%i2) xx: create_list(i, i, 0, 3);
(%o2) [0, 1, 2, 3]
(%i3) fi(x):= quad_qags(f(xx), xx, 0, x);
(%o3) fi(x) := quad_qags(f(xx), xx, 0, x)
(%i4) maplist(lambda([L], fi(L)), xx);

Maxima encountered a Lisp error:

Error in PROGN [or a callee]: Caught fatal error [memory may be damaged]

Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
(%i5) maplist(lambda([L], fi(L)), xx);
Segmentation fault

-------------------------------------------------------

Additional information:

Maxima version: 5.13.0
Maxima build date: 1:22 9/30/2007
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7

-------------------------------------------------------

I've found that everything works fine if assign %i2 statement to a variable with another name. But I still belive that it's an error.

Discussion

  • Barton Willis
    Barton Willis
    2007-10-02

    Logged In: YES
    user_id=895922
    Originator: NO

    Change the definition of fi to

    fi(x) := quad_qags(f('xx), 'xx, 0, x)

    This should fix the problem. Without the quote on x, the
    function is

    fi(x) := quad_qags(f([0,1,2]),[0,1,2],x)

    And that's not right. For this definition of fi, Maxima
    shouldn't give a Lisp error. That's a bug, I suppose.

     
  • Dan Gildea
    Dan Gildea
    2007-10-02

    • status: open --> closed
     
  • Dan Gildea
    Dan Gildea
    2007-10-02

    Logged In: YES
    user_id=1797506
    Originator: NO

    error checking added in quadpack.lisp rev 1.9

    (%i1) quad_qags(sin(x), [0,1,2,3], 0, 10);
    Variable of integration not a variable: [0, 1, 2, 3]
    -- an error. To debug this try debugmode(true);

    (%i2) f(x):=sin(x);
    (%o2) f(x) := sin(x)
    (%i3) xx: create_list(i, i, 0, 3);
    (%o3) [0, 1, 2, 3]
    (%i4) fi(x):= quad_qags(f(xx), xx, 0, x);
    (%o4) fi(x) := quad_qags(f(xx), xx, 0, x)
    (%i5) maplist(lambda([L], fi(L)), xx);
    Variable of integration not a variable: [0, 1, 2, 3]
    #0: fi(x=0)
    #1: lambda([L],fi(L))(l=0)
    -- an error. To debug this try debugmode(true);

     
  • mikolg
    mikolg
    2007-10-02

    Logged In: YES
    user_id=1902378
    Originator: NO

    You are very fast. Thank you.