diff -x *.info* -rc2P gsl-1.1/BUGS gsl-1.1.1/BUGS *** gsl-1.1/BUGS Sun Feb 10 21:31:58 2002 --- gsl-1.1.1/BUGS Mon Mar 11 21:46:30 2002 *************** *** 35,36 **** --- 35,40 ---- ---------------------------------------------------------------------- + + In QAWO the expressions center-half_length and center+half_length should + be replaced by a and b to avoid cancellation errors which occur for + ranges like [1e-30, 1] diff -x *.info* -rc2P gsl-1.1/COPYING gsl-1.1.1/COPYING *** gsl-1.1/COPYING Mon Jul 8 18:31:21 1996 --- gsl-1.1.1/COPYING Thu Feb 28 18:58:20 2002 *************** *** 1,7 **** GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. --- 1,8 ---- + GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. *************** *** 280,284 **** END OF TERMS AND CONDITIONS ! Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest --- 281,285 ---- END OF TERMS AND CONDITIONS ! How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest *************** *** 292,296 **** ! Copyright (C) 19yy This program is free software; you can redistribute it and/or modify --- 293,297 ---- ! Copyright (C) This program is free software; you can redistribute it and/or modify *************** *** 306,310 **** You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. --- 307,312 ---- You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! Also add information on how to contact you by electronic and paper mail. *************** *** 313,317 **** when it starts in an interactive mode: ! Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it --- 315,319 ---- when it starts in an interactive mode: ! Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it diff -x *.info* -rc2P gsl-1.1/KNOWN-PROBLEMS gsl-1.1.1/KNOWN-PROBLEMS *** gsl-1.1/KNOWN-PROBLEMS Sat Jan 26 20:50:06 2002 --- gsl-1.1.1/KNOWN-PROBLEMS Sat Mar 9 17:36:19 2002 *************** *** 18,22 **** ------------------------------------------------------------------------------- ! *** VERSION: 1.1 --- 18,22 ---- ------------------------------------------------------------------------------- ! *** VERSION: 1.1.1 diff -x *.info* -rc2P gsl-1.1/MACHINES gsl-1.1.1/MACHINES *** gsl-1.1/MACHINES Sun Feb 17 22:38:04 2002 --- gsl-1.1.1/MACHINES Wed Mar 6 19:53:14 2002 *************** *** 18,22 **** -------------- ! If there are problems building the library try using ./configure --disable-shared --- 18,22 ---- -------------- ! 1) If there are problems building the library try using ./configure --disable-shared *************** *** 27,31 **** If you get any problems try this first. ! Attempts to run 'strip' on the static library libgsl.a will probably produce a broken library (it is known to happen with GNU binutils strip, and probably affects others too). The libgsl.a ar archive made --- 27,39 ---- If you get any problems try this first. ! 2) With gcc-2.95/2.96 the tests fail in the eigen/ directory. This is ! due to a compiler optimization bug which causes errors in the ! manipulation of complex numbers. Do not use the library if you ! encounter this problem. ! ! This is fixed in more recent versions of gcc. Compiling without ! optimisation will work around the bug. ! ! 3) Attempts to run 'strip' on the static library libgsl.a will probably produce a broken library (it is known to happen with GNU binutils strip, and probably affects others too). The libgsl.a ar archive made *************** *** 39,43 **** meantime compile without -g instead if you need to reduce the file size. - * AIX ----- --- 47,50 ---- *************** *** 63,74 **** * Compaq/DEC Alpha ------------------ - - With gcc-2.95/2.96 the tests fail in the eigen/ directory. This is - due to a compiler optimization bug which causes errors in the - manipulation of complex numbers. Do not use the library if you - encounter this problem. - - This may be fixed in more recent versions of gcc. Compiling without - optimisation will work around the bug. The library should compile successfully with Compaq's C compiler using --- 70,73 ---- diff -x *.info* -rc2P gsl-1.1/NEWS gsl-1.1.1/NEWS *** gsl-1.1/NEWS Sat Feb 9 18:17:29 2002 --- gsl-1.1.1/NEWS Wed Mar 13 20:15:26 2002 *************** *** 1,3 **** ! * What is new in gsl-1.1: ** The permutation module now includes a copy function --- 1,14 ---- ! * What is new in gsl-1.1.1: ! ! ** Fixes to histogram2d stat functions ! ! ** Added missing prototypes for complex LU determinant functions ! ! ** Improved error handling in multifit routines ! ! ** Added check to avoid division by zero for rank-deficient matrix in ! multifit iteration ! ! * What was new in gsl-1.1: ** The permutation module now includes a copy function diff -x *.info* -rc2P gsl-1.1/THANKS gsl-1.1.1/THANKS *** gsl-1.1/THANKS Sat Feb 23 11:30:27 2002 --- gsl-1.1.1/THANKS Thu Feb 28 20:16:17 2002 *************** *** 127,131 **** * Hans E. Plesser (hans dot plesser at itf dot nlh dot no) more ! reliable implementation of gamma_inc * Arin Chaudhuri documentation bug reports --- 127,131 ---- * Hans E. Plesser (hans dot plesser at itf dot nlh dot no) more ! reliable implementation of gamma_inc, multifit bug fixes * Arin Chaudhuri documentation bug reports diff -x *.info* -rc2P gsl-1.1/TODO gsl-1.1.1/TODO *** gsl-1.1/TODO Sat Feb 9 22:58:57 2002 --- gsl-1.1.1/TODO Thu Mar 7 20:20:52 2002 *************** *** 30,33 **** --- 30,38 ---- vector/TODO + * Remove use of long double internally, e.g. as an accumulator in loops. It + introduces variation between platforms which is undesirable. + + * Check behavior of conjugate_fr in multimin -- the demo results look odd. + * Switch to library interface versioning for libtool (eventually), provide better GSL_VERSION_MAJOR, GSL_VERSION_MINOR macros. diff -x *.info* -rc2P gsl-1.1/configure gsl-1.1.1/configure *** gsl-1.1/configure Sun Feb 24 11:43:06 2002 --- gsl-1.1.1/configure Sat Mar 9 16:19:23 2002 *************** *** 863,867 **** PACKAGE=gsl ! VERSION="1.1" if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then --- 863,867 ---- PACKAGE=gsl ! VERSION="1.1.1" if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then diff -x *.info* -rc2P gsl-1.1/configure.in gsl-1.1.1/configure.in *** gsl-1.1/configure.in Sun Feb 24 11:42:03 2002 --- gsl-1.1.1/configure.in Sat Mar 9 16:16:10 2002 *************** *** 2,6 **** AC_INIT(gsl_math.h) ! AM_INIT_AUTOMAKE(gsl,"1.1") AM_CONFIG_HEADER(config.h) --- 2,6 ---- AC_INIT(gsl_math.h) ! AM_INIT_AUTOMAKE(gsl,"1.1.1") AM_CONFIG_HEADER(config.h) diff -x *.info* -rc2P gsl-1.1/doc/stamp-vti gsl-1.1.1/doc/stamp-vti *** gsl-1.1/doc/stamp-vti Sun Feb 24 12:27:15 2002 --- gsl-1.1.1/doc/stamp-vti Sat Mar 9 16:29:26 2002 *************** *** 1,3 **** @set UPDATED 9 January 2002 ! @set EDITION 1.1 ! @set VERSION 1.1 --- 1,3 ---- @set UPDATED 9 January 2002 ! @set EDITION 1.1.1 ! @set VERSION 1.1.1 diff -x *.info* -rc2P gsl-1.1/doc/vectors.texi gsl-1.1.1/doc/vectors.texi *** gsl-1.1/doc/vectors.texi Fri Oct 26 09:37:42 2001 --- gsl-1.1.1/doc/vectors.texi Mon Mar 4 22:22:45 2002 *************** *** 1052,1057 **** vector views of a matrix, such as row or column views. ! @deftypefun gsl_matrix_view gsl_matrix_submatrix (gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}, size_t @var{n1}, size_t @var{n2}) ! @deftypefunx gsl_matrix_const_view gsl_matrix_const_submatrix (const gsl_matrix * @var{m}, size_t @var{i}, size_t @var{j}, size_t @var{n1}, size_t @var{n2}) These functions return a matrix view of a submatrix of the matrix @var{m}. The upper-left element of the submatrix is the element --- 1052,1057 ---- vector views of a matrix, such as row or column views. ! @deftypefun gsl_matrix_view gsl_matrix_submatrix (gsl_matrix * @var{m}, size_t @var{k1}, size_t @var{k2}, size_t @var{n1}, size_t @var{n2}) ! @deftypefunx gsl_matrix_const_view gsl_matrix_const_submatrix (const gsl_matrix * @var{m}, size_t @var{k1}, size_t @var{k2}, size_t @var{n1}, size_t @var{n2}) These functions return a matrix view of a submatrix of the matrix @var{m}. The upper-left element of the submatrix is the element *************** *** 1062,1066 **** @example ! m'(i,j) = m->data[(k1*m->tda + k2) + i*m->tda + j] @end example @noindent --- 1062,1066 ---- @example ! m'(i,j) = m->data[(k1*m->tda + k1) + i*m->tda + j] @end example @noindent *************** *** 1069,1073 **** The @code{data} pointer of the returned matrix struct is set to null if ! the combined parameters (@var{k1},@var{k2},@var{n1},@var{n2},@var{tda}) overrun the ends of the original matrix. --- 1069,1073 ---- The @code{data} pointer of the returned matrix struct is set to null if ! the combined parameters (@var{i},@var{j},@var{n1},@var{n2},@var{tda}) overrun the ends of the original matrix. diff -x *.info* -rc2P gsl-1.1/doc/version-ref.texi gsl-1.1.1/doc/version-ref.texi *** gsl-1.1/doc/version-ref.texi Sat Jan 26 16:48:34 2002 --- gsl-1.1.1/doc/version-ref.texi Sat Mar 9 16:29:26 2002 *************** *** 1,3 **** @set UPDATED 9 January 2002 ! @set EDITION 1.1 ! @set VERSION 1.1 --- 1,3 ---- @set UPDATED 9 January 2002 ! @set EDITION 1.1.1 ! @set VERSION 1.1.1 diff -x *.info* -rc2P gsl-1.1/gsl_version.h gsl-1.1.1/gsl_version.h *** gsl-1.1/gsl_version.h Sun Feb 24 11:44:39 2002 --- gsl-1.1.1/gsl_version.h Sat Mar 9 16:19:51 2002 *************** *** 14,18 **** ! #define GSL_VERSION "1.1" extern const char * gsl_version; --- 14,18 ---- ! #define GSL_VERSION "1.1.1" extern const char * gsl_version; diff -x *.info* -rc2P gsl-1.1/histogram/ChangeLog gsl-1.1.1/histogram/ChangeLog *** gsl-1.1/histogram/ChangeLog Sat Jan 26 17:09:33 2002 --- gsl-1.1.1/histogram/ChangeLog Wed Mar 6 22:33:39 2002 *************** *** 1,2 **** --- 1,8 ---- + Wed Mar 6 22:03:35 2002 Brian Gough + + * test2d.c (main): cleaned up the tests a bit + + * stat2d.c: added checks for wi>0 (Achim Gaedke) + Sat Jan 26 17:09:10 2002 Brian Gough diff -x *.info* -rc2P gsl-1.1/histogram/stat2d.c gsl-1.1.1/histogram/stat2d.c *** gsl-1.1/histogram/stat2d.c Sat Jan 26 17:09:09 2002 --- gsl-1.1.1/histogram/stat2d.c Wed Mar 6 22:04:23 2002 *************** *** 42,53 **** */ ! double ! gsl_histogram2d_sum(const gsl_histogram2d * h) { ! const size_t n=h->nx*h->ny; ! double sum=0; ! size_t i=0; ! while(i < n) sum += h->bin[i++]; --- 42,53 ---- */ ! double ! gsl_histogram2d_sum (const gsl_histogram2d * h) { ! const size_t n = h->nx * h->ny; ! double sum = 0; ! size_t i = 0; ! while (i < n) sum += h->bin[i++]; *************** *** 79,90 **** double wi = 0; ! for (j=0; jbin[i*ny+j]; if (wij > 0) ! wi+=wij; } - W += wi; - wmean += (xi - wmean) * (wi / W); } --- 79,93 ---- double wi = 0; ! for (j = 0; j < ny; j++) { ! double wij = h->bin[i * ny + j]; if (wij > 0) ! wi += wij; ! } ! if (wi > 0) ! { ! W += wi; ! wmean += (xi - wmean) * (wi / W); } } *************** *** 116,129 **** double wj = 0; ! for (i=0; ibin[i*ny+j]; ! if (wij>0) ! wj+=wij; } ! W += wj; ! wmean += (yj - wmean) * (wj / W); ! } --- 119,134 ---- double wj = 0; ! for (i = 0; i < nx; i++) { ! double wij = h->bin[i * ny + j]; ! if (wij > 0) ! wj += wij; } ! if (wj > 0) ! { ! W += wj; ! wmean += (yj - wmean) * (wj / W); ! } } *************** *** 132,137 **** double ! gsl_histogram2d_xsigma (const gsl_histogram2d * h) { ! const double xmean=gsl_histogram2d_xmean(h); const size_t nx = h->nx; const size_t ny = h->ny; --- 137,143 ---- double ! gsl_histogram2d_xsigma (const gsl_histogram2d * h) ! { ! const double xmean = gsl_histogram2d_xmean (h); const size_t nx = h->nx; const size_t ny = h->ny; *************** *** 155,171 **** double wi = 0; ! for (j=0; jbin[i*ny+j]; ! if (wij>0) ! wi+=wij; } ! W += wi; ! wvariance += ((xi * xi) - wvariance) * (wi / W); } { ! double xsigma=sqrt(wvariance); return xsigma; } --- 161,180 ---- double wi = 0; ! for (j = 0; j < ny; j++) { ! double wij = h->bin[i * ny + j]; ! if (wij > 0) ! wi += wij; } ! if (wi > 0) ! { ! W += wi; ! wvariance += ((xi * xi) - wvariance) * (wi / W); ! } } { ! double xsigma = sqrt (wvariance); return xsigma; } *************** *** 173,178 **** double ! gsl_histogram2d_ysigma (const gsl_histogram2d * h) { ! const double ymean=gsl_histogram2d_ymean(h); const size_t nx = h->nx; const size_t ny = h->ny; --- 182,188 ---- double ! gsl_histogram2d_ysigma (const gsl_histogram2d * h) ! { ! const double ymean = gsl_histogram2d_ymean (h); const size_t nx = h->nx; const size_t ny = h->ny; *************** *** 196,212 **** double wj = 0; ! for (i=0; ibin[i*ny+j]; if (wij > 0) ! wj+=wij; } - - W += wj; - wvariance += ((yj * yj) - wvariance) * (wj / W); } { ! double ysigma=sqrt(wvariance); return ysigma; } --- 206,224 ---- double wj = 0; ! for (i = 0; i < nx; i++) { ! double wij = h->bin[i * ny + j]; if (wij > 0) ! wj += wij; ! } ! if (wj > 0) ! { ! W += wj; ! wvariance += ((yj * yj) - wvariance) * (wj / W); } } { ! double ysigma = sqrt (wvariance); return ysigma; } *************** *** 214,220 **** double ! gsl_histogram2d_cov (const gsl_histogram2d * h) { ! const double xmean=gsl_histogram2d_xmean(h); ! const double ymean=gsl_histogram2d_ymean(h); const size_t nx = h->nx; const size_t ny = h->ny; --- 226,233 ---- double ! gsl_histogram2d_cov (const gsl_histogram2d * h) ! { ! const double xmean = gsl_histogram2d_xmean (h); ! const double ymean = gsl_histogram2d_ymean (h); const size_t nx = h->nx; const size_t ny = h->ny; *************** *** 235,244 **** for (j = 0; j < ny; j++) { ! for (i=0; ixrange[i + 1] + h->xrange[i]) / 2.0 - xmean; ! double yj = (h->yrange[j + 1] + h->yrange[j]) / 2.0 - ymean; ! double wij = h->bin[i*ny+j]; ! if (wij > 0) { --- 248,257 ---- for (j = 0; j < ny; j++) { ! for (i = 0; i < nx; i++) { ! double xi = (h->xrange[i + 1] + h->xrange[i]) / 2.0 - xmean; ! double yj = (h->yrange[j + 1] + h->yrange[j]) / 2.0 - ymean; ! double wij = h->bin[i * ny + j]; ! if (wij > 0) { diff -x *.info* -rc2P gsl-1.1/histogram/test2d.c gsl-1.1.1/histogram/test2d.c *** gsl-1.1/histogram/test2d.c Fri Jan 18 22:05:21 2002 --- gsl-1.1.1/histogram/test2d.c Sat Mar 9 16:01:24 2002 *************** *** 39,46 **** { double xr[MR + 1] = ! {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; ! double yr[NR + 1] = ! {90.0, 91.0, 92.0, 93.0, 94.0, 95.0}; gsl_histogram2d *h, *h1, *g, *hr; --- 39,45 ---- { double xr[MR + 1] = ! { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 }; ! double yr[NR + 1] = { 90.0, 91.0, 92.0, 93.0, 94.0, 95.0 }; gsl_histogram2d *h, *h1, *g, *hr; *************** *** 57,62 **** gsl_test (h->yrange == 0, "gsl_histogram2d_calloc returns valid yrange pointer"); ! gsl_test (h->bin == 0, ! "gsl_histogram2d_calloc returns valid bin pointer"); gsl_test (h->nx != M, "gsl_histogram2d_calloc returns valid nx"); --- 56,60 ---- gsl_test (h->yrange == 0, "gsl_histogram2d_calloc returns valid yrange pointer"); ! gsl_test (h->bin == 0, "gsl_histogram2d_calloc returns valid bin pointer"); gsl_test (h->nx != M, "gsl_histogram2d_calloc returns valid nx"); *************** *** 85,89 **** }; ! gsl_test (status, "gsl_histogram2d_calloc_range creates xrange correctly"); } --- 83,88 ---- }; ! gsl_test (status, ! "gsl_histogram2d_calloc_range creates xrange correctly"); } *************** *** 98,102 **** }; ! gsl_test (status, "gsl_histogram2d_calloc_range creates yrange correctly"); } --- 97,102 ---- }; ! gsl_test (status, ! "gsl_histogram2d_calloc_range creates yrange correctly"); } *************** *** 112,117 **** { ! int status = gsl_histogram2d_set_ranges (hr, xr, MR+1, yr, NR+1); ! for (i = 0; i <= MR; i++) { --- 112,117 ---- { ! int status = gsl_histogram2d_set_ranges (hr, xr, MR + 1, yr, NR + 1); ! for (i = 0; i <= MR; i++) { *************** *** 189,193 **** for (i = 0; i <= N; i++) { ! h1->yrange[i] = 900.0 + i*i; } --- 189,193 ---- for (i = 0; i <= N; i++) { ! h1->yrange[i] = 900.0 + i * i; } *************** *** 218,226 **** for (i = 0; i < M; i++) { ! for (j = 0; j < N; j++) ! { ! if (gsl_histogram2d_get (h1, i, j) != gsl_histogram2d_get (h, i, j)) ! status = 1; ! } } gsl_test (status, "gsl_histogram2d_memcpy copies bin values correctly"); --- 218,227 ---- for (i = 0; i < M; i++) { ! for (j = 0; j < N; j++) ! { ! if (gsl_histogram2d_get (h1, i, j) != ! gsl_histogram2d_get (h, i, j)) ! status = 1; ! } } gsl_test (status, "gsl_histogram2d_memcpy copies bin values correctly"); *************** *** 255,263 **** for (i = 0; i < M; i++) { ! for (j = 0; j < N; j++) ! { ! if (gsl_histogram2d_get (h1, i, j) != gsl_histogram2d_get (h, i, j)) ! status = 1; ! } } gsl_test (status, "gsl_histogram2d_clone copies bin values correctly"); --- 256,265 ---- for (i = 0; i < M; i++) { ! for (j = 0; j < N; j++) ! { ! if (gsl_histogram2d_get (h1, i, j) != ! gsl_histogram2d_get (h, i, j)) ! status = 1; ! } } gsl_test (status, "gsl_histogram2d_clone copies bin values correctly"); *************** *** 327,331 **** } gsl_test (status, ! "gsl_histogram2d_get_xlowerlimit and xupperlimit works correctly"); } --- 329,333 ---- } gsl_test (status, ! "gsl_histogram2d_get_xlowerlimit and xupperlimit works correctly"); } *************** *** 343,347 **** } } ! gsl_test (status, "gsl_histogram2d_get_ylowerlimit and yupperlimit works correctly"); } --- 345,350 ---- } } ! gsl_test (status, ! "gsl_histogram2d_get_ylowerlimit and yupperlimit works correctly"); } *************** *** 389,394 **** } ! h->bin[3*N+2] = 123456.0; ! h->bin[4*N+3] = -654321; { --- 392,397 ---- } ! h->bin[3 * N + 2] = 123456.0; ! h->bin[4 * N + 3] = -654321; { *************** *** 399,403 **** { double min = gsl_histogram2d_min_val (h); ! gsl_test (min != -654321.0, "gsl_histogram2d_min_val finds minimum value"); } --- 402,407 ---- { double min = gsl_histogram2d_min_val (h); ! gsl_test (min != -654321.0, ! "gsl_histogram2d_min_val finds minimum value"); } *************** *** 405,409 **** size_t imax, jmax; gsl_histogram2d_max_bin (h, &imax, &jmax); ! gsl_test (imax != 3 || jmax != 2, "gsl_histogram2d_max_bin finds maximum value bin"); } --- 409,415 ---- size_t imax, jmax; gsl_histogram2d_max_bin (h, &imax, &jmax); ! gsl_test (imax != 3 ! || jmax != 2, ! "gsl_histogram2d_max_bin finds maximum value bin"); } *************** *** 411,418 **** size_t imin, jmin; gsl_histogram2d_min_bin (h, &imin, &jmin); ! gsl_test (imin != 4 || jmin != 3, "gsl_histogram2d_min_bin find minimum value bin"); } ! for (i = 0; i < M*N; i++) { h->bin[i] = i + 27; --- 417,425 ---- size_t imin, jmin; gsl_histogram2d_min_bin (h, &imin, &jmin); ! gsl_test (imin != 4 ! || jmin != 3, "gsl_histogram2d_min_bin find minimum value bin"); } ! for (i = 0; i < M * N; i++) { h->bin[i] = i + 27; *************** *** 421,491 **** { ! double sum = gsl_histogram2d_sum (h); ! gsl_test(sum != N*M*27+((N*M-1)*N*M)/2, "gsl_histogram2d_sum sums all bin values correctly"); } { /* first test... */ ! const double xpos=0.6; ! const double ypos=0.85; double xmean; double ymean; size_t xbin; size_t ybin; ! gsl_histogram2d* h3=gsl_histogram2d_alloc(M,N); ! gsl_histogram2d_set_ranges_uniform(h3,0,1,0,1); ! gsl_histogram2d_increment(h3,xpos,ypos); ! gsl_histogram2d_find(h3,xpos,ypos,&xbin,&ybin); ! xmean=gsl_histogram2d_xmean(h3); ! ymean=gsl_histogram2d_ymean(h3); ! /* seems to have precision problems of order 1e-17 ! printf("differences: x: %g, y: %g\n", ! xmean-(h3->xrange[xbin]+h3->xrange[xbin+1])/2.0, ! ymean-(h3->yrange[ybin]+h3->yrange[ybin+1])/2.0); ! */ ! gsl_test(abs(xmean-(h3->xrange[xbin]+h3->xrange[xbin+1])/2.0)>GSL_DBL_EPSILON, ! "gsl_histogram2d_xmean works correctly"); ! gsl_test(abs(ymean-(h3->yrange[ybin]+h3->yrange[ybin+1])/2.0)>GSL_DBL_EPSILON, ! "gsl_histogram2d_ymean works correctly"); ! gsl_histogram2d_free(h3); } { /* test it with bivariate normal distribution */ ! const double xmean=0.7; ! const double ymean=0.85; ! const double xsigma=0.1; ! const double ysigma=0.1; ! const double correl=0.5; ! const double norm=10.0/M_PI/xsigma/ysigma/sqrt(1-correl*correl); size_t xbin; size_t ybin; ! gsl_histogram2d* h3=gsl_histogram2d_alloc(M,N); ! gsl_histogram2d_set_ranges_uniform(h3,0,1,0,1); ! /* initialize with 2d gauss pdf in two directions*/ ! for (xbin=0 ; xbinxrange[xbin]+h3->xrange[xbin+1])/2.0-xmean)/xsigma; ! for (ybin=0 ; ybinyrange[ybin]+h3->yrange[ybin+1])/2.0-ymean)/ysigma; ! double prob=norm*exp(-(xi*xi-2.0*correl*xi*yi+yi*yi)/2.0/(1-correl*correl)); ! h3->bin[xbin*N+ybin]=prob; } - } { ! /* ! printf("x: %g +/- %g\n",gsl_histogram2d_xmean(h3),gsl_histogram2d_xsigma(h3)); ! printf("y: %g +/- %g\n",gsl_histogram2d_ymean(h3),gsl_histogram2d_ysigma(h3)); ! printf("cov: %g\n",gsl_histogram2d_cov(h3)); ! */ ! double xs=gsl_histogram2d_xsigma(h3); ! double ys=gsl_histogram2d_ysigma(h3); /* evaluate results and compare with parameters */ ! gsl_test(abs(xmean-gsl_histogram2d_xmean(h3))>2/M,"gsl_histogram2d_xmean works fine"); ! gsl_test(abs(ymean-gsl_histogram2d_ymean(h3))>2/N,"gsl_histogram2d_ymean works fine"); ! gsl_test(abs(xsigma-xs)>2/M,"gsl_histogram2d_xsigma works fine"); ! gsl_test(abs(ysigma-ys)>2/N,"gsl_histogram2d_ysigma works fine"); ! gsl_test(abs(correl-gsl_histogram2d_cov(h3)/xs/ys)>2/((Mxrange[xbin] + h3->xrange[xbin + 1]) / 2.0; ! double expected_ymean = (h3->yrange[ybin] + h3->yrange[ybin + 1]) / 2.0; ! gsl_test_abs (xmean, expected_xmean, 100.0 * GSL_DBL_EPSILON, ! "gsl_histogram2d_xmean works correctly"); ! gsl_test_abs (ymean, expected_ymean, 100.0 * GSL_DBL_EPSILON, ! "gsl_histogram2d_ymean works correctly"); ! }; ! gsl_histogram2d_free (h3); } { /* test it with bivariate normal distribution */ ! const double xmean = 0.7; ! const double ymean = 0.7; ! const double xsigma = 0.1; ! const double ysigma = 0.1; ! const double correl = 0.5; ! const double norm = ! 10.0 / M_PI / xsigma / ysigma / sqrt (1.0 - correl * correl); size_t xbin; size_t ybin; ! gsl_histogram2d *h3 = gsl_histogram2d_alloc (M, N); ! gsl_histogram2d_set_ranges_uniform (h3, 0, 1, 0, 1); ! /* initialize with 2d gauss pdf in two directions */ ! for (xbin = 0; xbin < M; xbin++) ! { ! double xi = ! ((h3->xrange[xbin] + h3->xrange[xbin + 1]) / 2.0 - xmean) / xsigma; ! for (ybin = 0; ybin < N; ybin++) ! { ! double yi = ! ((h3->yrange[ybin] + h3->yrange[ybin + 1]) / 2.0 - ! ymean) / ysigma; ! double prob = ! norm * exp (-(xi * xi - 2.0 * correl * xi * yi + yi * yi) / ! 2.0 / (1 - correl * correl)); ! h3->bin[xbin * N + ybin] = prob; ! } } { ! double xs = gsl_histogram2d_xsigma (h3); ! double ys = gsl_histogram2d_ysigma (h3); /* evaluate results and compare with parameters */ ! ! gsl_test_abs (gsl_histogram2d_xmean (h3), xmean, 2.0/M, ! "gsl_histogram2d_xmean works correctly"); ! gsl_test_abs (gsl_histogram2d_ymean (h3), ymean, 2.0/N, ! "gsl_histogram2d_ymean works correctly"); ! gsl_test_abs (xs, xsigma, 2.0/M, ! "gsl_histogram2d_xsigma works correctly"); ! gsl_test_abs (ys, ysigma, 2.0/N, ! "gsl_histogram2d_ysigma works correctly"); ! gsl_test_abs (gsl_histogram2d_cov (h3) / xs / ys, correl, ! 2.0/((M < N) ? M : N), ! "gsl_histogram2d_cov works correctly"); } ! gsl_histogram2d_free (h3); } *************** *** 495,499 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != g->bin[i] + h->bin[i]) --- 513,517 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != g->bin[i] + h->bin[i]) *************** *** 508,512 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != g->bin[i] - h->bin[i]) --- 526,530 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != g->bin[i] - h->bin[i]) *************** *** 522,526 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != g->bin[i] * h->bin[i]) --- 540,544 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != g->bin[i] * h->bin[i]) *************** *** 535,539 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != g->bin[i] / h->bin[i]) --- 553,557 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != g->bin[i] / h->bin[i]) *************** *** 548,552 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != 0.5 * g->bin[i]) --- 566,570 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != 0.5 * g->bin[i]) *************** *** 561,565 **** { int status = 0; ! for (i = 0; i < M*N; i++) { if (h1->bin[i] != 0.25 + g->bin[i]) --- 579,583 ---- { int status = 0; ! for (i = 0; i < M * N; i++) { if (h1->bin[i] != 0.25 + g->bin[i]) *************** *** 579,586 **** gsl_test (h->bin == 0, "gsl_histogram2d_calloc_uniform returns valid bin pointer"); ! gsl_test (h->nx != M1, ! "gsl_histogram2d_calloc_uniform returns valid nx"); ! gsl_test (h->ny != N1, ! "gsl_histogram2d_calloc_uniform returns valid ny"); gsl_histogram2d_accumulate (h, 0.0, 3.01, 1.0); --- 597,602 ---- gsl_test (h->bin == 0, "gsl_histogram2d_calloc_uniform returns valid bin pointer"); ! gsl_test (h->nx != M1, "gsl_histogram2d_calloc_uniform returns valid nx"); ! gsl_test (h->ny != N1, "gsl_histogram2d_calloc_uniform returns valid ny"); gsl_histogram2d_accumulate (h, 0.0, 3.01, 1.0); *************** *** 651,655 **** { printf ("xrange[%d] : %g orig vs %g\n", ! (int)i, h->xrange[i], hh->xrange[i]); status = 1; } --- 667,671 ---- { printf ("xrange[%d] : %g orig vs %g\n", ! (int) i, h->xrange[i], hh->xrange[i]); status = 1; } *************** *** 661,665 **** { printf ("yrange[%d] : %g orig vs %g\n", ! (int)j, h->yrange[j], hh->yrange[j]); status = 1; } --- 677,681 ---- { printf ("yrange[%d] : %g orig vs %g\n", ! (int) j, h->yrange[j], hh->yrange[j]); status = 1; } *************** *** 670,675 **** if (h->bin[i] != hh->bin[i]) { ! printf ("bin[%d] : %g orig vs %g\n", ! (int)i, h->bin[i], hh->bin[i]); status = 1; } --- 686,691 ---- if (h->bin[i] != hh->bin[i]) { ! printf ("bin[%d] : %g orig vs %g\n", ! (int) i, h->bin[i], hh->bin[i]); status = 1; } *************** *** 700,704 **** { printf ("xrange[%d] : %g orig vs %g\n", ! (int)i, h->xrange[i], hh->xrange[i]); status = 1; } --- 716,720 ---- { printf ("xrange[%d] : %g orig vs %g\n", ! (int) i, h->xrange[i], hh->xrange[i]); status = 1; } *************** *** 710,714 **** { printf ("yrange[%d] : %g orig vs %g\n", ! (int)j, h->yrange[j], hh->yrange[j]); status = 1; } --- 726,730 ---- { printf ("yrange[%d] : %g orig vs %g\n", ! (int) j, h->yrange[j], hh->yrange[j]); status = 1; } *************** *** 719,724 **** if (h->bin[i] != hh->bin[i]) { ! printf ("bin[%d] : %g orig vs %g\n", ! (int)i, h->bin[i], hh->bin[i]); status = 1; } --- 735,740 ---- if (h->bin[i] != hh->bin[i]) { ! printf ("bin[%d] : %g orig vs %g\n", ! (int) i, h->bin[i], hh->bin[i]); status = 1; } *************** *** 730,734 **** fclose (f); } ! gsl_histogram2d_free (h); gsl_histogram2d_free (h1); --- 746,750 ---- fclose (f); } ! gsl_histogram2d_free (h); gsl_histogram2d_free (h1); diff -x *.info* -rc2P gsl-1.1/linalg/gsl_linalg.h gsl-1.1.1/linalg/gsl_linalg.h *** gsl-1.1/linalg/gsl_linalg.h Thu Jan 24 18:40:03 2002 --- gsl-1.1.1/linalg/gsl_linalg.h Thu Feb 28 20:52:37 2002 *************** *** 195,199 **** --- 195,205 ---- gsl_matrix_complex * inverse); + gsl_complex gsl_linalg_complex_LU_det (gsl_matrix_complex * LU, + int signum); + double gsl_linalg_complex_LU_lndet (gsl_matrix_complex * LU); + + gsl_complex gsl_linalg_complex_LU_sgndet (gsl_matrix_complex * LU, + int signum); /* QR decomposition */ diff -x *.info* -rc2P gsl-1.1/multifit/ChangeLog gsl-1.1.1/multifit/ChangeLog *** gsl-1.1/multifit/ChangeLog Mon Oct 8 18:40:11 2001 --- gsl-1.1.1/multifit/ChangeLog Thu Feb 28 20:23:03 2002 *************** *** 1,2 **** --- 1,10 ---- + Thu Feb 28 20:15:33 2002 Brian Gough + + * lmiterate.c (iterate): return immediately if evaluation raised + error (Hans E. Plesser) + + * lmpar.c (lmpar): avoid division by zero for w=0 in rank + deficient case + Mon Oct 8 19:25:55 2001 Brian Gough diff -x *.info* -rc2P gsl-1.1/multifit/lmiterate.c gsl-1.1.1/multifit/lmiterate.c *** gsl-1.1/multifit/lmiterate.c Mon Oct 8 14:14:55 2001 --- gsl-1.1.1/multifit/lmiterate.c Thu Feb 28 20:22:53 2002 *************** *** 70,75 **** /* Evaluate function at x + p */ ! ! GSL_MULTIFIT_FN_EVAL_F (fdf, x_trial, f_trial); fnorm1 = enorm (f_trial); --- 70,79 ---- /* Evaluate function at x + p */ ! /* return immediately if evaluation raised error */ ! { ! int status = GSL_MULTIFIT_FN_EVAL_F (fdf, x_trial, f_trial); ! if (status) ! return status; ! } fnorm1 = enorm (f_trial); *************** *** 160,164 **** gsl_vector_memcpy (f, f_trial); ! GSL_MULTIFIT_FN_EVAL_DF (fdf, x_trial, J); /* wa2_j = diag_j * x_j */ --- 164,173 ---- gsl_vector_memcpy (f, f_trial); ! /* return immediately if evaluation raised error */ ! { ! int status = GSL_MULTIFIT_FN_EVAL_DF (fdf, x_trial, J); ! if (status) ! return status; ! } /* wa2_j = diag_j * x_j */ diff -x *.info* -rc2P gsl-1.1/multifit/lmpar.c gsl-1.1.1/multifit/lmpar.c *** gsl-1.1/multifit/lmpar.c Mon Oct 8 13:33:17 2001 --- gsl-1.1.1/multifit/lmpar.c Thu Feb 28 20:15:30 2002 *************** *** 268,272 **** double wnorm = enorm (w); double phider = wnorm * wnorm; ! par_lower = fp / (delta * phider); } --- 268,279 ---- double wnorm = enorm (w); double phider = wnorm * wnorm; ! ! /* w == zero if r rank-deficient, ! then set lower bound to zero form MINPACK, lmder.f ! Hans E. Plesser 2002-02-25 (hans.plesser@itf.nlh.no) */ ! if ( wnorm > 0 ) ! par_lower = fp / (delta * phider); ! else ! par_lower = 0.0; }