From jbogumil@pipeline.com Mon Jan 31 19:33 EST 1994 Received: from localhost (jbogumil@localhost) by pipeline.com (8.6.5/8.6.5) id TAA26704 for jbogumil@pipeline.com; Mon, 31 Jan 1994 19:33:42 -0500 Date: Mon, 31 Jan 1994 19:33:42 -0500 From: Jeff Bogumil Message-Id: <199402010033.TAA26704@pipeline.com> Subject: Bugs Known to Exist in the Current Release Apparently-To: jbogumil@pipeline.com Content-Type: text Content-Length: 4654 Status: O X-Status: Numerical Recipes Current Bug Reports This file lists known or suspected bugs that were reported or discovered after the deadline for the current release of Numerical Recipes. Not all the reports listed here are fully validated, so this listing should not be relied on as definitive. All the entries here will be further investigated before the next release. However, users of the current release who encounter bugs may wish to see if their bugs are already in this listing and, if so, whether they have additional information that may be useful for a fix. (If so, we encourage email reports to "bugs@nr.com".) NOTE THAT THIS FILE DOES NOT INCLUDE BUGS ALREADY FIXED IN THE CURRENT RELEASE. IF YOU WANT INFORMATION ON THOSE, LOOK AT THE PATCH FILES ELSEWHERE IN THIS DIRECTORY TREE. ***** bsstep.c and stifbs.c: in both of these routines, the matrix d is allocated incorectly as d=matrix(1,KMAXX,1,KMAXX); Instead, this should read d=matrix(1,nv,1,KMAXX); Correspondingly, the deallocation statements free_matrix(d,1,KMAXX,1,KMAXX); should instead read free_matrix(d,1,nv,1,KMAXX); This bug affects only uses where more than 8 differential equations are integrated simultaneously. There is no similar bug in the corresponding FORTRAN routines. ***** sobseq.f and sobseq.for: the routine does not properly re-initialize to a different value of "n" after the first initialization. Fix by adding lines marked +: do k=1,MAXDIM + ix(k)=0 + enddo + in=0 + if(iv(1).ne.1)return + fac=1./2.**MAXBIT + do k=1,MAXDIM do j=1,mdeg(k) and deleting lines marked -: enddo - fac=1./2.**MAXBIT - in=0 else ***** sobseq.c: same problem as above. (You only need to fix this if you initialize sobseq more than once.) Here is the relevant section of fixed code: if (*n < 0) { for (k=1;k<=MAXDIM;k++) ix[k]=0; in=0; if (iv[1] != 1) return; fac=1.0/(1L << MAXBIT); for (j=1,k=0;j<=MAXBIT;j++,k+=MAXDIM) iu[j] = &iv[k]; for (k=1;k<=MAXDIM;k++) { for (j=1;j<=mdeg[k];j++) iu[j][k] <<= (MAXBIT-j); for (j=mdeg[k]+1;j<=MAXBIT;j++) { ipp=ip[k]; i=iu[j-mdeg[k]][k]; i ^= (i >> mdeg[k]); for (l=mdeg[k]-1;l>=1;l--) { if (ipp & 1) i ^= iu[j-l][k]; ipp >>= 1; } iu[j][k]=i; } } } else { im=in++; ALSO delete the line "in++;" near the end of the routine. ***** mpmul.c: the single line while (b[j] >= RX) b[j] -= RX; slows the routine down by a huge factor! It should be replaced by either b[j] = fmod(t,RX); or perhaps by the safer cy = (int) (t/RX); b[j] -= cy*RX; This problem is not present in the FORTRAN version. ***** mppi.c: for some choices of "n" (the number of bytes of pi to compute), the routine exits a loop at the wrong time and gets the wrong answer. The relevant fixed lines of code are: mm=t[2]-1; for (j=3;j<=n;j++) { if (t[j] != mm) break; } m=t[n+1]-mm; if (j <= n || m > 1 || m < -1) { mpmul(s,pi,&t[1],n,n); mpmov(pi,&s[1],n); continue; } printf("pi=\n"); This problem is not present in the FORTRAN version. ***** miser.c: a purely cosmetic bug is several wrong third arguments in calls to free_vector; they should all be "ndim". (This is cosmetic, since free_vector makes no use of its third argument!) ***** nr.h: the entry "int igray();" should be "unsigned long igray();". ***** xvegas.c: a purely cosmetic bug is that the line printf("ENTER N,NDIM,XOFF,NCALL,ITMAX,NPRN\n"); should read printf("ENTER NDIM,XOFF,NCALL,ITMAX,NPRN\n"); ***** nrtodp.dat: the line beginning "&broyden" on the MS-DOS diskette version of this file should be changed to begin with "&broydn". ***** END OF LIST