#2656 core dump in evaluating hypergeometric

None
open
5
2013-11-24
2013-11-02
igorpesando
No

(%i1) hypergeometric([0.5,0.5],[2],2);

Unrecoverable error: invocation history stack overflow.
Aborted (core dumped)


Maxima version: 5.24.0
Maxima build date: 9:11 2/29/2012
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.7

Discussion

  • Robert Dodier

    Robert Dodier - 2013-11-04

    Also observed in current version from Git (post-5.31) with GCL 2.6.9.

    Not observed in current version with Clisp, SBCL, or Clozure CL. In each case, hypergeometric([0.5,0.5],[2],2) just comes back the same.

     
    • Barton Willis

      Barton Willis - 2013-11-24

      For some half-integer parameters, analytic continuation of the Gauss hypergeometric function requires transformations that the hypergeometric code doesn't know (I think the needed transformations include those given in http://dlmf.nist.gov/15.8).

      Sorry about this bug--I'll try to fix it.

       
  • Robert Dodier

    Robert Dodier - 2013-11-24
    • labels: --> numeric, hypergeometric
    • assigned_to: Barton Willis
     
  • Robert Dodier

    Robert Dodier - 2013-11-24

    Looks like the problem is in floating point evaluation of hypergeometric (not specific to GCL; the stack overflow is just a side effect). Looks like the various functions for floating point evaluation end up calling each other recursively without any stopping point; looks like the loop over fpprec in HYPERGEOMETRIC-FLOAT-EVAL is in the middle of it.

    Here's what I see (with Clozure CL). Note that I've changed max_fpprec to 20 so that it doesn't run so long before giving up.

    (%i1) load (hypergeometric);
    (%o1) /home/robert/maxima/maxima-git/maxima-code/share/hypergeometric/hypergeo\
    metric.lisp
    (%i2) max_fpprec;
    (%o2)                                1000
    (%i3) max_fpprec : 20 $
    
    (%i4) :lisp (trace bigfloat::running-error-eval bigfloat::running-error-hypergeometric bigfloat::hypergeometric-float-eval bigfloat::hypergeometric-by-series)
    NIL
    (%i4) hypergeometric([0.5, 0.5], [2], 2);
    
    0> Calling (BIGFLOAT::HYPERGEOMETRIC-FLOAT-EVAL (0.5 0.5) (2) 2 16) 
     1> Calling (BIGFLOAT::RUNNING-ERROR-EVAL (($HYPERGEOMETRIC SIMP) ((MLIST SIMP) 0.5 0.5) ((MLIST SIMP) 2) Z) ((MLIST) ((MEQUAL) Z 2)) 56) 
      2> Calling (BIGFLOAT::RUNNING-ERROR-HYPERGEOMETRIC ((MLIST SIMP) 0.5 0.5) ((MLIST SIMP) 2) Z ((MLIST) ((MEQUAL) Z 2)) 56) 
       3> Calling (BIGFLOAT::RUNNING-ERROR-EVAL 0.5 ((MLIST) ((MEQUAL) Z 2)) 56) 
       <3 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
       3> Calling (BIGFLOAT::RUNNING-ERROR-EVAL 0.5 ((MLIST) ((MEQUAL) Z 2)) 56) 
       <3 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
       3> Calling (BIGFLOAT::RUNNING-ERROR-EVAL 2 ((MLIST) ((MEQUAL) Z 2)) 56) 
       <3 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
       3> Calling (BIGFLOAT::RUNNING-ERROR-EVAL Z ((MLIST) ((MEQUAL) Z 2)) 56) 
       <3 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
       3> Calling (BIGFLOAT::HYPERGEOMETRIC-FLOAT-EVAL (((BIGFLOAT SIMP 56) 36028797018963968 0) ((BIGFLOAT SIMP 56) 36028797018963968 0)) (((BIGFLOAT SIMP 56) 36028797018963968 2)) ((BIGFLOAT SIMP 56) 36028797018963968 2) 17 T) 
        4> Calling (BIGFLOAT::RUNNING-ERROR-EVAL (($HYPERGEOMETRIC SIMP) ((MLIST SIMP) ((BIGFLOAT SIMP 56) 36028797018963968 0) ((BIGFLOAT SIMP 56) 36028797018963968 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 56) 36028797018963968 2)) Z) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
         5> Calling (BIGFLOAT::RUNNING-ERROR-HYPERGEOMETRIC ((MLIST SIMP) ((BIGFLOAT SIMP 56) 36028797018963968 0) ((BIGFLOAT SIMP 56) 36028797018963968 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 56) 36028797018963968 2)) Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
          6> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 56) 36028797018963968 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
          <6 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
          6> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 56) 36028797018963968 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
          <6 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
          6> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 56) 36028797018963968 2) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
          <6 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
          6> Calling (BIGFLOAT::RUNNING-ERROR-EVAL Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 56) 36028797018963968 2))) 59) 
          <6 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
          6> Calling (BIGFLOAT::HYPERGEOMETRIC-FLOAT-EVAL (((BIGFLOAT SIMP 59) 288230376151711744 0) ((BIGFLOAT SIMP 59) 288230376151711744 0)) (((BIGFLOAT SIMP 59) 288230376151711744 2)) ((BIGFLOAT SIMP 59) 288230376151711744 2) 18 T) 
           7> Calling (BIGFLOAT::RUNNING-ERROR-EVAL (($HYPERGEOMETRIC SIMP) ((MLIST SIMP) ((BIGFLOAT SIMP 59) 288230376151711744 0) ((BIGFLOAT SIMP 59) 288230376151711744 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 59) 288230376151711744 2)) Z) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
            8> Calling (BIGFLOAT::RUNNING-ERROR-HYPERGEOMETRIC ((MLIST SIMP) ((BIGFLOAT SIMP 59) 288230376151711744 0) ((BIGFLOAT SIMP 59) 288230376151711744 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 59) 288230376151711744 2)) Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
             9> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 59) 288230376151711744 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
             <9 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
             9> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 59) 288230376151711744 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
             <9 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
             9> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 59) 288230376151711744 2) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
             <9 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
             9> Calling (BIGFLOAT::RUNNING-ERROR-EVAL Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 59) 288230376151711744 2))) 62) 
             <9 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
             9> Calling (BIGFLOAT::HYPERGEOMETRIC-FLOAT-EVAL (((BIGFLOAT SIMP 62) 2305843009213693952 0) ((BIGFLOAT SIMP 62) 2305843009213693952 0)) (((BIGFLOAT SIMP 62) 2305843009213693952 2)) ((BIGFLOAT SIMP 62) 2305843009213693952 2) 19 T) 
              10> Calling (BIGFLOAT::RUNNING-ERROR-EVAL (($HYPERGEOMETRIC SIMP) ((MLIST SIMP) ((BIGFLOAT SIMP 62) 2305843009213693952 0) ((BIGFLOAT SIMP 62) 2305843009213693952 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 62) 2305843009213693952 2)) Z) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
               11> Calling (BIGFLOAT::RUNNING-ERROR-HYPERGEOMETRIC ((MLIST SIMP) ((BIGFLOAT SIMP 62) 2305843009213693952 0) ((BIGFLOAT SIMP 62) 2305843009213693952 0)) ((MLIST SIMP) ((BIGFLOAT SIMP 62) 2305843009213693952 2)) Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
                12> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 62) 2305843009213693952 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
                <12 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
                12> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 62) 2305843009213693952 0) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
                <12 BIGFLOAT::RUNNING-ERROR-EVAL returned (+5.0b-1 +5.0b-1)
                12> Calling (BIGFLOAT::RUNNING-ERROR-EVAL ((BIGFLOAT SIMP 62) 2305843009213693952 2) ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
                <12 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
                12> Calling (BIGFLOAT::RUNNING-ERROR-EVAL Z ((MLIST) ((MEQUAL) Z ((BIGFLOAT SIMP 62) 2305843009213693952 2))) 66) 
                <12 BIGFLOAT::RUNNING-ERROR-EVAL returned (+2.0b0 +2.0b0)
                12> Calling (BIGFLOAT::HYPERGEOMETRIC-FLOAT-EVAL (((BIGFLOAT SIMP 66) 36893488147419103232 0) ((BIGFLOAT SIMP 66) 36893488147419103232 0)) (((BIGFLOAT SIMP 66) 36893488147419103232 2)) ((BIGFLOAT SIMP 66) 36893488147419103232 2) 20 T) 
    Unable to evaluate to requested number of digits
     -- an error. To debug this try: debugmode(true);
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks