#279 tiny bug in PDL-2.4.3. May apply to 2.4.9

unreproducible
closed-fixed
other (94)
1
2011-08-09
2011-08-09
peng
No

Hello I find your code in this link,

http://cpansearch.perl.org/src/CSOE/PDL-2.4.3/Basic/MatrixOps/matrix.c

I know it is not the latest version, but because I am unable to find the corresponding part in PDL-2.4.9, I have to report the bug in the 2.4.3 version as the link above pointing to.

One sentence in the link

x[i]=(b[i]-c[i]*b[i+1])/d[i];

should be replaced by

x[i]=(b[i]-c[i]*x[i+1])/d[i];

for matrix calculation, as c is the coefficient of the unknown variables x. I have verified it in my own code.

Discussion

  • Chris Marshall

    Chris Marshall - 2011-08-09

    The file is at the same location for the latest PDL releases:
    http://cpansearch.perl.org/src/CHM/PDL-2.4.9/Basic/MatrixOps/matrix.c

    Could you please attach a small piece of code that shows
    the bug? I did not see any obvious way for the Tridiag()
    routine to even be called.

    See BUGS in the PDL distribution for information on
    other things that are good to have in a bug report.

    Thanks. --Chris

     
  • Chris Marshall

    Chris Marshall - 2011-08-09
    • milestone: --> unreproducible
     
  • Chris Marshall

    Chris Marshall - 2011-08-09

    I could find no code using the Tridiag() routine in PDL-2.4.3.

     
  • peng

    peng - 2011-08-09
     
  • peng

    peng - 2011-08-09

    Actually I did not call the tridiag function in this package, but only copy and paste it to my own file for homework (see the attached file). You can use "make run" for my homework. The bug is in the line 37 of otherFn.h, where I copied the whole function tridiag(). If I use the original version (line 37), the "result" file will explode, and if I use the new version (line 38), it will converge to 0, which is an expected output. In def.h, you can use other values of ROUTINEID to verify the convergence.

     
  • Chris Marshall

    Chris Marshall - 2011-08-09

    As the Tridiag() routine has never been exposed
    at the perl/PDL level, this is dead code. I've removed
    it from the PDL git to avoid the perception that it
    is used. Thanks for reporting the problem..

     
  • Chris Marshall

    Chris Marshall - 2011-08-09
    • priority: 5 --> 1
    • assigned_to: nobody --> marshallch
    • status: open --> closed-fixed
     

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

Sign up for the SourceForge newsletter:





No, thanks