diff -r -c1 recipes_f/COPYRIGHT.NOTICE ../recipes_f/COPYRIGHT.NOTICE *** recipes_f/COPYRIGHT.NOTICE Sun Jul 06 06:14:50 1997 --- ../recipes_f/COPYRIGHT.NOTICE Fri Nov 30 18:48:08 2001 *************** *** 1,2 **** The contents of this Numerical Recipes Fortran distribution are ! Copyright (C) 1986-1997 Numerical Recipes Software. --- 1,2 ---- The contents of this Numerical Recipes Fortran distribution are ! Copyright (C) 1986-2002 Numerical Recipes Software. diff -r -c1 recipes_f/doc/ADDRESS ../recipes_f/doc/ADDRESS *** recipes_f/doc/ADDRESS Tue Nov 10 13:31:50 1992 --- ../recipes_f/doc/ADDRESS Fri Nov 30 17:54:58 2001 *************** *** 1,3 **** Our address is: Numerical Recipes Software ! P.O. Box 243 Cambridge, MA 02238 (USA) --- 1,3 ---- Our address is: Numerical Recipes Software ! P.O. Box 380243 Cambridge, MA 02238 (USA) diff -r -c1 recipes_f/doc/DISTRIBUTION ../recipes_f/doc/DISTRIBUTION *** recipes_f/doc/DISTRIBUTION Thu Nov 19 03:54:54 1992 --- ../recipes_f/doc/DISTRIBUTION Fri Nov 30 18:01:22 2001 *************** *** 10,22 **** in your program executable. Contact Numerical Recipes Software at ! P.O. Box 243, Cambridge, MA 02238 (USA) [fax 617-863-1739] for details. In distributing a program containing Numerical Recipes routines, you acknowledge acceptance of the DISCLAIMER OF WARRANTY ! below, and of the fact that no business relationship is created ! between your program's users and Numerical Recipes Software, the ! authors of the Numerical Recipes books, or Cambridge University Press. ! If you want to distribute software that has Numerical Recipes in the ! form of source code or individually callable object modules, then you ! must contact Numerical Recipes Software for further information. A ! fee (per Recipe) is charged, and we normally limit the total number ! of Recipes distributed to 20. --- 10,21 ---- in your program executable. Contact Numerical Recipes Software at ! P.O. Box 380243, Cambridge, MA 02238 (USA) [fax 617-863-1739] for details. In distributing a program containing Numerical Recipes routines, you acknowledge acceptance of the DISCLAIMER OF WARRANTY ! distributed herewith, and of the fact that no business relationship ! is created between your program's users and Numerical Recipes ! Software, the authors of the Numerical Recipes books, or Cambridge ! University Press. ! For complete information on permissions, please go to ! http://www.nr.com/infotop.html ! or contact Numerical Recipes Software at the address given above. diff -r -c1 recipes_f/doc/ORDERING ../recipes_f/doc/ORDERING *** recipes_f/doc/ORDERING Tue Nov 10 13:36:12 1992 --- ../recipes_f/doc/ORDERING Sun Nov 25 19:07:18 2001 *************** *** 2,4 **** ! Numerical Recipes books, and diskettes for IBM/PC-compatible and Apple Macintosh computers, are published exclusively by Cambridge --- 2,4 ---- ! Numerical Recipes books, and CDROMs for IBM/PC-compatible and Apple Macintosh computers, are published exclusively by Cambridge *************** *** 14,15 **** --- 14,19 ---- + e-mail: orders@cup.org + + Web: http://www.cambridge.org + Outside of North America, orders may be placed with: *************** *** 20,33 **** Cambridge, CB2 2RU ! U.K. more... ! fax: (U.K. country code+) 223 315052 telex: 851 817256 CUPCAM G The following books are available (prices subject to change): ! Numerical Recipes in FORTRAN, 2nd Edition (hardcover) $49.95 ! Numerical Recipes FORTRAN Example Book, 2nd Ed. (paper) $29.95 - Numerical Recipes in C, 2nd Edition (hardcover) $49.95 - Numerical Recipes C Example Book, 2nd Ed. (paper) $29.95 --- 24,48 ---- Cambridge, CB2 2RU ! U.K. ! fax: (U.K. country code+) 223 325891 telex: 851 817256 CUPCAM G + e-mail: directcustserv@cambridge.org + + Web: http://www.cambridge.org + The following books are available (prices subject to change): ! Numerical Recipes in Fortran 77, 2nd Edition (hardcover) $64.95 ! (Volume 1 of Fortran Numerical Recipes) ! Numerical Recipes in Fortran 90 (hardcover) $47.95 ! (Volume 2 of Fortran Numerical Recipes) ! Numerical Recipes FORTRAN Example Book, 2nd Ed. (paper) $32.95 ! ! Numerical Recipes in C, 2nd Edition (hardcover) $64.95 ! Numerical Recipes C Example Book, 2nd Ed. (paper) $32.95 ! ! Numerical Recipes in C++, 2nd Edition (hardcover) $69.95 ! Numerical Recipes Example Book (C++) (paper) $34.95 *************** *** 35,43 **** ! Numerical Recipes in Pascal, Revised Edition (hardcover) $49.95 Numerical Recipes Example Book (Pascal), Revised Ed. (paper) $29.95 ! Numerical Recipes Routines and Examples in BASIC (paper) $32.50 ! Diskettes are available in FORTRAN, C, Pascal, and BASIC (Microsoft ! QuickBASIC), for IBM/PC-compatibles and Apple Macintosh. Contact Cambridge University Press for pricing information. A TrueBasic --- 50,58 ---- ! Numerical Recipes in Pascal, Revised Edition (hardcover) $59.95 Numerical Recipes Example Book (Pascal), Revised Ed. (paper) $29.95 ! Numerical Recipes Routines and Examples in BASIC (paper) $37.95 ! CDROMs are available for all languages for Windows, Apple Macintosh, ! and Unix/Linux operating systems. Contact Cambridge University Press for pricing information. A TrueBasic diff -r -c1 recipes_f/doc/VERSION ../recipes_f/doc/VERSION *** recipes_f/doc/VERSION Sat Jul 19 07:26:12 1997 --- ../recipes_f/doc/VERSION Fri Nov 30 18:48:58 2001 *************** *** 1,2 **** ! Numerical Recipes in FORTRAN ! Unix Version 2.08 --- 1,2 ---- ! Numerical Recipes in Fortran 77 ! UNIX/Linux Version 2.10 diff -r -c1 recipes_f/recipes/broydn.f ../recipes_f/recipes/broydn.f *** recipes_f/recipes/broydn.f Mon Jul 14 18:32:36 1997 --- ../recipes_f/recipes/broydn.f Tue Oct 02 21:27:50 2001 *************** *** 30,32 **** restrt=.true. ! do 44 its=1,MAXITS if(restrt)then --- 30,32 ---- restrt=.true. ! do 42 its=1,MAXITS if(restrt)then *************** *** 112,114 **** 33 continue ! g(i)=sum 34 continue --- 112,114 ---- 33 continue ! p(i)=-sum 34 continue *************** *** 117,119 **** do 35 j=1,i ! sum=sum+r(j,i)*g(j) 35 continue --- 117,119 ---- do 35 j=1,i ! sum=sum-r(j,i)*p(j) 35 continue *************** *** 126,134 **** fold=f - do 39 i=1,n - sum=0. - do 38 j=1,n - sum=sum+qt(i,j)*fvec(j) - 38 continue - p(i)=-sum - 39 continue call rsolv(r,n,NP,d,p) --- 126,127 ---- *************** *** 136,140 **** test=0. ! do 41 i=1,n if(abs(fvec(i)).gt.test)test=abs(fvec(i)) ! 41 continue if(test.lt.TOLF)then --- 129,133 ---- test=0. ! do 38 i=1,n if(abs(fvec(i)).gt.test)test=abs(fvec(i)) ! 38 continue if(test.lt.TOLF)then *************** *** 149,154 **** den=max(f,.5*n) ! do 42 i=1,n temp=abs(g(i))*max(abs(x(i)),1.)/den if(temp.gt.test)test=temp ! 42 continue if(test.lt.TOLMIN)then --- 142,147 ---- den=max(f,.5*n) ! do 39 i=1,n temp=abs(g(i))*max(abs(x(i)),1.)/den if(temp.gt.test)test=temp ! 39 continue if(test.lt.TOLMIN)then *************** *** 162,170 **** test=0. ! do 43 i=1,n temp=(abs(x(i)-xold(i)))/max(abs(x(i)),1.) if(temp.gt.test)test=temp ! 43 continue if(test.lt.TOLX)return endif ! 44 continue pause 'MAXITS exceeded in broydn' --- 155,163 ---- test=0. ! do 41 i=1,n temp=(abs(x(i)-xold(i)))/max(abs(x(i)),1.) if(temp.gt.test)test=temp ! 41 continue if(test.lt.TOLX)return endif ! 42 continue pause 'MAXITS exceeded in broydn' diff -r -c1 recipes_f/recipes/caldat.f ../recipes_f/recipes/caldat.f *** recipes_f/recipes/caldat.f Mon Jul 14 18:32:36 1997 --- ../recipes_f/recipes/caldat.f Tue Oct 02 21:27:52 2001 *************** *** 5,8 **** if(julian.ge.IGREG)then ! jalpha=int(((julian-1867216)-0.25)/36524.25) ! ja=julian+1+jalpha-int(0.25*jalpha) else if(julian.lt.0)then --- 5,8 ---- if(julian.ge.IGREG)then ! jalpha=int(((julian-1867216)-0.25d0)/36524.25d0) ! ja=julian+1+jalpha-int(0.25d0*jalpha) else if(julian.lt.0)then *************** *** 13,18 **** jb=ja+1524 ! jc=int(6680.+((jb-2439870)-122.1)/365.25) ! jd=365*jc+int(0.25*jc) ! je=int((jb-jd)/30.6001) ! id=jb-jd-int(30.6001*je) mm=je-1 --- 13,18 ---- jb=ja+1524 ! jc=int(6680.0d0+((jb-2439870)-122.1d0)/365.25d0) ! jd=365*jc+int(0.25d0*jc) ! je=int((jb-jd)/30.6001d0) ! id=jb-jd-int(30.6001d0*je) mm=je-1 diff -r -c1 recipes_f/recipes/fasper.f ../recipes_f/recipes/fasper.f *** recipes_f/recipes/fasper.f Mon Jul 14 18:32:40 1997 --- ../recipes_f/recipes/fasper.f Tue Oct 02 21:27:52 2001 *************** *** 19,20 **** --- 19,21 ---- call avevar(y,n,ave,var) + if(var.eq.0.) pause 'zero variance in fasper' xmin=x(1) diff -r -c1 recipes_f/recipes/four1.f ../recipes_f/recipes/four1.f *** recipes_f/recipes/four1.f Mon Jul 14 18:32:42 1997 --- ../recipes_f/recipes/four1.f Tue Oct 02 21:27:54 2001 *************** *** 17,19 **** endif ! m=n/2 1 if ((m.ge.2).and.(j.gt.m)) then --- 17,19 ---- endif ! m=nn 1 if ((m.ge.2).and.(j.gt.m)) then diff -r -c1 recipes_f/recipes/gaussj.f ../recipes_f/recipes/gaussj.f *** recipes_f/recipes/gaussj.f Mon Jul 14 18:32:44 1997 --- ../recipes_f/recipes/gaussj.f Tue Oct 02 21:27:54 2001 *************** *** 20,23 **** endif - else if (ipiv(k).gt.1) then - pause 'singular matrix in gaussj' endif --- 20,21 ---- diff -r -c1 recipes_f/recipes/hqr.f ../recipes_f/recipes/hqr.f *** recipes_f/recipes/hqr.f Mon Jul 14 18:32:44 1997 --- ../recipes_f/recipes/hqr.f Tue Oct 02 21:44:56 2001 *************** *** 18,20 **** if(s.eq.0.)s=anorm ! if(abs(a(l,l-1))+s.eq.s)goto 3 13 continue --- 18,23 ---- if(s.eq.0.)s=anorm ! if(abs(a(l,l-1))+s.eq.s)then ! a(l,l-1)=0. ! goto 3 ! endif 13 continue diff -r -c1 recipes_f/recipes/iindexx.f ../recipes_f/recipes/iindexx.f *** recipes_f/recipes/iindexx.f Mon Jul 14 18:32:46 1997 --- ../recipes_f/recipes/iindexx.f Tue Oct 02 21:27:58 2001 *************** *** 16,18 **** a=arr(indxt) ! do 12 i=j-1,1,-1 if(arr(indx(i)).le.a)goto 2 --- 16,18 ---- a=arr(indxt) ! do 12 i=j-1,l,-1 if(arr(indx(i)).le.a)goto 2 *************** *** 20,22 **** 12 continue ! i=0 2 indx(i+1)=indxt --- 20,22 ---- 12 continue ! i=l-1 2 indx(i+1)=indxt *************** *** 32,38 **** indx(l+1)=itemp - if(arr(indx(l+1)).gt.arr(indx(ir)))then - itemp=indx(l+1) - indx(l+1)=indx(ir) - indx(ir)=itemp - endif if(arr(indx(l)).gt.arr(indx(ir)))then --- 32,33 ---- *************** *** 42,47 **** endif ! if(arr(indx(l+1)).gt.arr(indx(l)))then itemp=indx(l+1) ! indx(l+1)=indx(l) ! indx(l)=itemp endif --- 37,47 ---- endif ! if(arr(indx(l+1)).gt.arr(indx(ir)))then itemp=indx(l+1) ! indx(l+1)=indx(ir) ! indx(ir)=itemp ! endif ! if(arr(indx(l)).gt.arr(indx(l+1)))then ! itemp=indx(l) ! indx(l)=indx(l+1) ! indx(l+1)=itemp endif *************** *** 49,51 **** j=ir ! indxt=indx(l) a=arr(indxt) --- 49,51 ---- j=ir ! indxt=indx(l+1) a=arr(indxt) *************** *** 62,67 **** goto 3 ! 5 indx(l)=indx(j) indx(j)=indxt jstack=jstack+2 ! if(jstack.gt.NSTACK)pause 'NSTACK too small in indexx' if(ir-i+1.ge.j-l)then --- 62,67 ---- goto 3 ! 5 indx(l+1)=indx(j) indx(j)=indxt jstack=jstack+2 ! if(jstack.gt.NSTACK)pause 'NSTACK too small in iindexx' if(ir-i+1.ge.j-l)then diff -r -c1 recipes_f/recipes/julday.f ../recipes_f/recipes/julday.f *** recipes_f/recipes/julday.f Mon Jul 14 18:32:46 1997 --- ../recipes_f/recipes/julday.f Tue Oct 02 21:27:58 2001 *************** *** 13,18 **** endif ! julday=int(365.25*jy)+int(30.6001*jm)+id+1720995 if (id+31*(mm+12*iyyy).ge.IGREG) then ! ja=int(0.01*jy) ! julday=julday+2-ja+int(0.25*ja) endif --- 13,18 ---- endif ! julday=365*jy+int(0.25d0*jy+2000.d0)+int(30.6001d0*jm)+id+1718995 if (id+31*(mm+12*iyyy).ge.IGREG) then ! ja=int(0.01d0*jy) ! julday=julday+2-ja+int(0.25d0*ja) endif diff -r -c1 recipes_f/recipes/medfit.f ../recipes_f/recipes/medfit.f *** recipes_f/recipes/medfit.f Mon Jul 14 18:32:48 1997 --- ../recipes_f/recipes/medfit.f Tue Oct 02 21:28:00 2001 *************** *** 32,33 **** --- 32,34 ---- f1=rofunc(b1) + if(sigb.gt.0.)then b2=bb+sign(3.*sigb,f1) *************** *** 61,62 **** --- 62,64 ---- goto 2 + endif endif diff -r -c1 recipes_f/recipes/mpdiv.f ../recipes_f/recipes/mpdiv.f *** recipes_f/recipes/mpdiv.f Mon Jul 14 18:32:48 1997 --- ../recipes_f/recipes/mpdiv.f Tue Oct 02 21:28:00 2001 *************** *** 10,12 **** call mpmul(rr,s,u,n+MACC,n) ! call mpsad(s,rr,n+n+MACC/2,1) call mpmov(q,s(3),n-m+1) --- 10,12 ---- call mpmul(rr,s,u,n+MACC,n) ! call mpsad(s,rr,n+MACC-1,1) call mpmov(q,s(3),n-m+1) diff -r -c1 recipes_f/recipes/pade.f ../recipes_f/recipes/pade.f *** recipes_f/recipes/pade.f Mon Jul 14 18:32:50 1997 --- ../recipes_f/recipes/pade.f Tue Oct 02 21:28:02 2001 *************** *** 31,33 **** if(rr.lt.rrold)goto 1 ! resid=sqrt(rr) do 16 k=1,n --- 31,33 ---- if(rr.lt.rrold)goto 1 ! resid=sqrt(rrold) do 16 k=1,n *************** *** 35,37 **** do 15 j=1,k ! sum=sum-x(j)*cof(k-j+1) 15 continue --- 35,37 ---- do 15 j=1,k ! sum=sum-z(j)*cof(k-j+1) 15 continue *************** *** 41,43 **** cof(j+1)=y(j) ! cof(j+n+1)=-x(j) 17 continue --- 41,43 ---- cof(j+1)=y(j) ! cof(j+n+1)=-z(j) 17 continue diff -r -c1 recipes_f/recipes/period.f ../recipes_f/recipes/period.f *** recipes_f/recipes/period.f Mon Jul 14 18:32:50 1997 --- ../recipes_f/recipes/period.f Tue Oct 02 21:28:02 2001 *************** *** 14,15 **** --- 14,16 ---- call avevar(y,n,ave,var) + if(var.eq.0.) pause 'zero variance in period' xmax=x(1) diff -r -c1 recipes_f/recipes/toeplz.f ../recipes_f/recipes/toeplz.f *** recipes_f/recipes/toeplz.f Mon Jul 14 18:32:58 1997 --- ../recipes_f/recipes/toeplz.f Tue Oct 02 21:28:04 2001 *************** *** 33,35 **** 13 continue ! if(sd.eq.0..or.sgd.eq.0.)goto 99 g(m1)=sgn/sgd --- 33,35 ---- 13 continue ! if(sgd.eq.0.)goto 99 g(m1)=sgn/sgd