diff -x *.info* -rc2P gsl-1.2/AUTHORS gsl-1.3/AUTHORS *** gsl-1.2/AUTHORS Fri Jul 19 19:35:25 2002 --- gsl-1.3/AUTHORS Sun Oct 6 21:46:23 2002 *************** *** 20,21 **** --- 20,23 ---- Szymon Jaroszewicz (sj@cs.umb.edu) - combinations Nicolas Darnis (ndarnis@cvf.fr) - canonical permutation functions + Tuomo Keskitalo (tuomo.keskitalo@iki.fi) - multidimensional minimization + Ivo Alxneit (ivo.alxneit@psi.ch) - multidimensional minimization diff -x *.info* -rc2P gsl-1.2/BUGS gsl-1.3/BUGS *** gsl-1.2/BUGS Fri Jun 21 19:13:14 2002 --- gsl-1.3/BUGS Fri Dec 13 12:02:03 2002 *************** *** 3,7 **** ---------------------------------------------------------------------- ! BUG#1 -- STATUS: reproducible, not yet fixed From: keith.briggs@bt.com --- 3,7 ---- ---------------------------------------------------------------------- ! BUG#1 -- gsl_sf_hyperg_2F1_e fails for some arguments From: keith.briggs@bt.com *************** *** 37,41 **** ---------------------------------------------------------------------- ! BUG#3 -- STATUS: reproducible, not yet fixed From: Rodolphe Conan --- 37,41 ---- ---------------------------------------------------------------------- ! BUG#3 -- gsl_sf_bessel_Jn fails for large argument From: Rodolphe Conan *************** *** 53,57 **** ---------------------------------------------------------------------- ! BUG#4 -- STATUS: reproducible, not yet fixed From: David Necas (Yeti) --- 53,57 ---- ---------------------------------------------------------------------- ! BUG#4 -- gsl_linalg_solve_symm_cyc_tridiag() crashes From: David Necas (Yeti) *************** *** 71,72 **** --- 71,297 ---- ---------------------------------------------------------------------- + BUG#5 -- broken error terms for implicit odes + + The error terms for the implicit ode integrators are broken. They + have 'FIXME' entries still in the code. Only the bsimp error term is + implemented. + + ---------------------------------------------------------------------- + + BUG#7 -- gsl_sf_coupling_3j loses accuracy for large arguments + + From: Filip Floegel + Subject: gsl_sf_coupling_3j + Date: Wed, 2 Oct 2002 17:45:52 +0200 + + gsl_sf_coupling_3j doesn't work properly for large + angular mementa like j1=j2=j3=40 m1=m2=m3=0 !!! + + gsl_sf_coupling_3j_e(80,80,80,0,0,0,&result) + + which correspond to j1=j2=j3=40 m1=m2=m3=0 + + gives me: + + result.val = 0.0625 + result.err = 0.172766 + + mathematica gives me: + + N[ThreeJSymbol[{40,0},{40,0},{40,0}]] = 0.0149685 + + my guess is that gamma.c which is used for calculating fractional + numbers probably diverges for large integers. + + Note from Serge Winitzki : + + The package "matpack" (www.matpack.de) includes many special functions, + also the 3j symbols. They refer to some quite complicated numerical + methods using recursion relations to get the right answers for large + momenta, and to 1975-1976 papers by Schulten and Gordon for the + description of the algorithms. The papers can be downloaded for free at + http://www.ks.uiuc.edu/Publications/Papers/ + + + ---------------------------------------------------------------------- + + BUG#8 -- inexact coefficients in rk8pd.c + + From: Luc Maisonobe + To: gsl-discuss@sources.redhat.com + Subject: further thoughts about Dormand-Prince 8 (RK8PD) + Date: Wed, 14 Aug 2002 10:50:49 +0200 + + I was looking for some references concerning Runge-Kutta methods when I + noticed GSL had an high order one. I also found a question in the list + archive (April 2002) about the references of this method which is + implemented in rk8pd.c. It was said the coefficients were taken from the + "Numerical Algorithms with C" book by Engeln-Mullges and Uhlig. + + I have checked the coefficients somewhat with a little java tool I have + developped (see http://www.spaceroots.org/archive.htm#RKCheckSoftware) + and found they were not exact. I think this method is really the method + that is already in rksuite (http://www.netlib.org/ode/rksuite/) were the + coefficients are given as real values with 30 decimal digits. The + coefficients have probably been approximated as fractions later on. + However, these approximations are not perfect, they are good only for + the first 16 or 18 digits depending on the coefficient. + + This has no consequence for practical purposes since they are stored in + double variables, but give a false impression of beeing exact + expressions. Well, there are even some coefficients that should really + be rational numbers but for which wrong numerators and denominators are + given. As an example, the first and fourth elements of the b7 array are + given as 29443841.0 / 614563906.0 and 77736538.0 / 692538347, hence the + sum off all elements of the b7 array (which should theoretically be + equal to ah[5]) only approximate this. For these two coefficients, this + could have been avoided using 215595617.0 / 4500000000.0 and + 202047683.0 / 1800000000.0, which also looks more coherent with the + other coefficients. + + The rksuite comments say this method is described in this paper : + + High Order Embedded Runge-Kutta Formulae + P.J. Prince and J.R. Dormand + J. Comp. Appl. Math.,7, pp. 67-75, 1981 + + It also says the method is an 8(7) method (i.e. the coefficients set + used to advance integration is order 8 and error estimation is order 7). + If I use my tool to check the order, I am forced to check the order + conditions numerically with a tolerance since I do not have an exact + expression of the coefficients. Since even if some conditions are not + mathematically met, the residuals are small and could be below the + tolerance. There are tolerance values for which such numerical test + dedeuce the method is of order 9, as is said in GSL. However, I am not + convinced, there are to few parameters for the large number of order + conditions needed at order 9. + + I would suggest to correct the coefficients in rk8pd.c (just put the + literal constants of rksuite) and to add the reference to the article. + + ---------------------------------------------------------------------- + + BUG#9 -- problem with multimin example + + From: Thomas Kunert + To: gsl-discuss@sources.redhat.com + Subject: Re: multimin example + + The example for multimin doesn't give me the expected output but a much + worse result. Any idea about the reason? I have gsl 1.2 on Mandrake 8.2. + + 1 4.99629 6.99072 687.84780 + 2 4.98886 6.97215 683.55456 + 3 4.97400 6.93501 675.01278 + 4 4.94429 6.86073 658.10798 + + It's true that there is a problem there, but I don't know why. + + ---------------------------------------------------------------------- + BUG#10 -- gsl_sf_fermi_dirac_int error estimates + + Some of the error estimates on gsl_sf_fermi_dirac_int are much too + large. The value itself is pretty accurate. + + In the test_sf_result you need to work in something like + + if(r.err > 1.0e5 * (fabs(r.val - val) + GSL_DBL_EPSILON * fabs(val))) + s |= TEST_SF_INCONS; /* error estimate too large */ + + in addition to the existing + + if(fabs(val - r.val) > 2.0*r.err) s |= TEST_SF_INCONS; + + to catch those. + + #include + #include + #include + + int main() { + gsl_sf_result r; + int status; + + status = gsl_sf_fermi_dirac_int_e (9, 500.0, &r); + printf("FD_9(500) = %.18e +- %.18e\n", r.val, r.err); + } + + result, + + FD_9(500) = 2.692738498426942915e+20 +- 2.629627439870118259e+47 + + Exact = 2.692738498...e+20 + + ---------------------------------------------------------------------- + + BUG#11 -- SVD does not handle N=1 + + From: Tiago de Paula Peixoto + To: gsl-discuss@sources.redhat.com + Subject: Problem with least-squares fitting. + Date: Mon, 4 Nov 2002 14:46:02 -0200 + + I'm experiencing a weird error message using the GSL linear least squares + multi-parameter fitting. When I try to fit a function with only one + parameter, such as "y = a * x", I get the following error: + + subvector_source.c:28: vector length n must be positive integer + (gsl_error: invalid argument supplied by user) + + The fit results seem OK, and I don't know what I'm doing wrong. When I fit + with 2 parameters or more, everything works fine. + + The calling stack is: + + #0 least_gsl_error_handler ( + reason=0x4019be80 "vector length n must be positive integer", + file=0x4019be4e "subvector_source.c", line=28, gsl_errno=4) + at least_test.c:11 + #1 0x4008fc92 in gsl_error () from /usr/lib/libgsl.so.0 + #2 0x40169857 in gsl_vector_subvector () from /usr/lib/libgsl.so.0 + #3 0x400ba859 in gsl_linalg_SV_decomp () from /usr/lib/libgsl.so.0 + #4 0x400bb4c4 in gsl_linalg_SV_decomp_mod () from /usr/lib/libgsl.so.0 + #5 0x400ea171 in gsl_multifit_linear () from /usr/lib/libgsl.so.0 + #6 0x080489a5 in main () at least_test.c:50 + + #include + #include + #include + #include + void least_gsl_error_handler( const char * reason, + const char * file, + int line, + int gsl_errno) + { + printf("%s:%d: %s (gsl_error: %s)\n", + file, line, reason, gsl_strerror(gsl_errno)); + } + int main() + { + gsl_vector *x,*y,*p; + gsl_multifit_linear_workspace *workspace; + gsl_matrix *X, *cov; + double chi2; + int i; + double xi[5] = {1.0, 2.0, 3.0, 4.0, 5.0}; + double yi[5] = {4.0, 8.0, 12.0, 16.0, 20.0}; + gsl_set_error_handler( &least_gsl_error_handler ); + workspace = gsl_multifit_linear_alloc(5, 1); + cov = gsl_matrix_alloc(1, 1); + p = gsl_vector_alloc(1); + x = gsl_vector_alloc(5); + y = gsl_vector_alloc(5); + X = gsl_matrix_alloc( 5, 1 ); + for (i = 0; i < 5; i++) + { + gsl_vector_set(x, i, xi[i]); + gsl_vector_set(y, i, yi[i]); + gsl_matrix_set(X, i, 0, xi[i]); /* straight line */ + } + gsl_multifit_linear(X, y, p, cov, &chi2, workspace); + printf(" a = %e +/- %e\n chi2 = %e\n", + gsl_vector_get(p, 0), sqrt(gsl_matrix_get(cov,0,0)), chi2); + return 0; + } + + ---------------------------------------------------------------------- diff -x *.info* -rc2P gsl-1.2/ChangeLog gsl-1.3/ChangeLog *** gsl-1.2/ChangeLog Sun Jul 14 11:49:11 2002 --- gsl-1.3/ChangeLog Sun Dec 15 14:32:51 2002 *************** *** 1,2 **** --- 1,17 ---- + 2002-11-24 Brian Gough + + * configure.in: check for presence of non-ansi functions in header + files before running AC_CHECK_FUNCS to look in libraries, to + support compilation with -ansi. + + Fri Sep 6 15:00:40 2002 Brian Gough + + * acconfig.h (GSL_RANGE_CHECK_OFF): turned range checking off in + acconfig.h as it overwrites config.h.in + + Wed Aug 7 22:34:36 2002 Brian Gough + + * config.h.in: fixed RANGE_CHECK_ON to GSL_RANGE_CHECK_ON + Sun Jul 14 12:48:50 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/INSTALL gsl-1.3/INSTALL *** gsl-1.2/INSTALL Sun Jul 14 22:38:45 2002 --- gsl-1.3/INSTALL Mon Dec 9 21:19:59 2002 *************** *** 44,50 **** make install ! The default install directory prefix is /usr/local. Consult the file ! INSTALL for information on installing the library in another location ! or changing other default compilation options. ------------------------------ --- 44,51 ---- make install ! The default install directory prefix is /usr/local. Consult the ! "Further Information" section below for instructions on installing the ! library in another location or changing other default compilation ! options. ------------------------------ *************** *** 113,120 **** The library should compile successfully with Compaq's C compiler using ! the -std option for ANSI conformance. Use CC=cc ./configure ! make CFLAGS="-std" to build the library this way. --- 114,121 ---- The library should compile successfully with Compaq's C compiler using ! the -std and -ieee options. Use CC=cc ./configure ! make CFLAGS="-std -ieee" to build the library this way. *************** *** 147,152 **** ! Hints for IRIX ! ============== The library should be compiled with the following option, --- 148,162 ---- ! Hints for Intel (Pentium) ! ======================== ! ! For the Pentium 4 with GCC-3.2 the flags, ! ! CFLAGS="-O2 -march=pentium4 -mfpmath=sse -msse2" ! ! increase performance by 33% (reported by Sam Halliday ) ! ! Hints for IRIX (SGI) ! ==================== The library should be compiled with the following option, *************** *** 193,199 **** There are problems with dynamic linker, so the library should be ! compiled with ./configure --disable-shared To avoid warnings about long-double, use the flag --- 203,218 ---- There are problems with dynamic linker, so the library should be ! compiled with, ./configure --disable-shared + + To build shared libraries you can install MacOS X versions of libtool, + automake and autoconf, and then reconfigure: + + 1. Get the fink packaging tool (http://fink.sourceforge.net) + 2, Install fink's libtool14, automake, autoconf25. + 3. Regenerate GSL's configuration using ./autogen.sh in the + top-level directory. + 4. ./configure, make To avoid warnings about long-double, use the flag diff -x *.info* -rc2P gsl-1.2/Makefile.in gsl-1.3/Makefile.in *** gsl-1.2/Makefile.in Sat Jul 20 20:27:17 2002 --- gsl-1.3/Makefile.in Wed Dec 18 22:36:20 2002 *************** *** 170,174 **** config.guess config.h.in config.sub configure configure.in \ gsl-config.in gsl.pc.in gsl.spec.in gsl_version.h.in install-sh \ ! ltconfig ltmain.sh mdate-sh missing mkinstalldirs --- 170,174 ---- config.guess config.h.in config.sub configure configure.in \ gsl-config.in gsl.pc.in gsl.spec.in gsl_version.h.in install-sh \ ! ltmain.sh mdate-sh missing mkinstalldirs diff -x *.info* -rc2P gsl-1.2/NEWS gsl-1.3/NEWS *** gsl-1.2/NEWS Mon Jul 15 18:59:18 2002 --- gsl-1.3/NEWS Sun Dec 15 19:23:34 2002 *************** *** 1,3 **** ! * What is new in gsl-1.2: ** Added new functions for combining permutations, converting between --- 1,57 ---- ! * What is new in gsl-1.3: ! ! ** Changed interface for gsl_sf_coupling_6j...(...). The old functions ! actually calculated 6j for a permutation of the arguments (that ! related to Racah W). This was incorrect and not consistent with ! the documentation. The new versions calculate < {a,b,c}, {d,e,f} >, ! as stated in the documentation. The old versions are still available ! as gsl_sf_coupling_6j_INCORRECT...(...), though they are deprecated ! and will be removed at some point in the future. ! ! ** Added new functions for computing Em(x)=exp(-x)*Ei(x), the modified ! (scaled) form of the exponential integral, gsl_sf_expint_E1_scaled, ! gsl_sf_expint_E2_scaled, gsl_sf_expint_Ei_scaled. ! ! ** Fixed compilation problems with gcc -ansi and other ANSI compilers. ! ! ** Fixed uninitialized memory access in the Niederreiter quasi-random ! number generator. ! ! ** Fixed the eigenvalue routines to prevent an infinite loop for Inf ! or NaN entries in matrix. ! ! ** Fixed a bug in the multifit and multiroots allocation routines ! which cause them to fail to report some out of memory conditions. ! ! ** Fixed a bug in the seeding for the random number generator ! gsl_rng_taus2 which affected a small number of seeds. ! ! ** Modified the complex householder transforms to avoid division by ! zero, which could cause NaNs to be returned by the gsl_eigen_hermv ! eigenvalue decomposition. ! ! ** The Nelder-Mead simplex algorithm for multidimensional ! minimisation has been added. ! ! ** The random number distributions now include the Dirichlet and ! Multinomial distributions. ! ! ** Added a new function gsl_fcmp for approximate comparison of ! floating point numbers using Knuth's algorithm. ! ! ** Added new functions gsl_ldexp and gsl_frexp as portable ! alternatives to ldexp() and frexp(). ! ! ** Fixed a bug in gsl_linalg_bidiag_unpack_B which was returning ! incorrect results for the superdiagonal. ! ! ** Fixed a bug in the acceptance condition for simulated annealing ! ! ** Ordinary differential equations can now be solved using a different ! absolute error for each component with gsl_odeiv_control_scaled_new(). ! ! ** Upgraded to libtool-1.4.3 ! ! * What was new in gsl-1.2: ** Added new functions for combining permutations, converting between diff -x *.info* -rc2P gsl-1.2/README gsl-1.3/README *** gsl-1.2/README Sun Jul 14 22:37:58 2002 --- gsl-1.3/README Sat Oct 5 19:37:54 2002 *************** *** 37,54 **** The project homepage is http://www.gnu.org/software/gsl/ ! The development site is http://sources.redhat.com/gsl/ ! ! Please report bugs to the GSL discussion list gsl-discuss@sources.redhat.com ! ! See the NEWS file for recent developments. The GSL Manual has been published and can be ordered from most bookstores. The publication details are, ! GNU Scientific Library Reference Manual, M. Galassi et al, ISBN ! 095416170X (600 pages, paperback). ! ! If you are interested in participating in GSL development, please send ! mail to Mark Galassi -- rosalia@lanl.gov Reporting Bugs --- 37,49 ---- The project homepage is http://www.gnu.org/software/gsl/ ! See the NEWS file for recent changes to the library. The GSL Manual has been published and can be ordered from most bookstores. The publication details are, ! GNU Scientific Library Reference Manual, ! M. Galassi et al, ! ISBN 095416170X ! (600 pages, paperback). Reporting Bugs *************** *** 59,67 **** If you find a bug which is not listed in these files please report it ! to the mailing list gsl-discuss@sources.redhat.com. All bug reports should include: ! The version number of GSL The hardware and operating system The compiler used, including version number and compilation options --- 54,62 ---- If you find a bug which is not listed in these files please report it ! to bug-gsl@gnu.org. All bug reports should include: ! The version number of GSL, and where you obtained it. The hardware and operating system The compiler used, including version number and compilation options *************** *** 73,75 **** --- 68,77 ---- Thank you. + + Contributing to GSL + =================== + + If you are interested in participating in GSL development, please send + mail to Mark Galassi and Brian Gough + . diff -x *.info* -rc2P gsl-1.2/THANKS gsl-1.3/THANKS *** gsl-1.2/THANKS Sun Jul 14 20:54:39 2002 --- gsl-1.3/THANKS Tue Dec 10 19:56:24 2002 *************** *** 175,176 **** --- 175,209 ---- * Nicolas Bock documentation bug report + * Alan Aspuru-Guzik documentation bug report + + * Peter S. Christopher bug fix for + simulated annealing + + * Gene Carter build shared libraries on MacOS X + + * "Fabian Jakobs" fixed a bug in + gsl_linalg_bidiag_unpack_B, and documentation bug-fix for blas + + * "Gavin Crooks" documentation bug fix, + dirichlet distribution, multinomial distribution + + * Gert Van den Eynde gsl_ldexp, gsl_frexp, gsl_fcmp + + * Reinhold Bader , fixes for Hitachi SR8000 + + * Slaven Peles , build options for + Compaq cc, doc bug fix + + * David Favis-Mortlock bug report for + gsl_rng_taus2 seeding + + * Alexander Babansky documentation bug report for Ei(x) + + * Tiago de Paula Peixoto bug report for multifit + memory allocation + + * Adam Johansen bug report for eigenvalue routines + + * Wolfgang Hoermann bug report for niederreiter qrng + + * Jerome Houdayer bug report for taus seeding diff -x *.info* -rc2P gsl-1.2/TODO gsl-1.3/TODO *** gsl-1.2/TODO Mon Apr 22 18:29:37 2002 --- gsl-1.3/TODO Tue Nov 5 17:08:04 2002 *************** *** 2,69 **** =============== ! We are looking for volunteers to do the following tasks, ! * Consult the TODO files in each directory first for specific ! requirements ! blas/TODO ! cblas/TODO ! complex/TODO ! eigen/TODO ! fft/TODO ! ieee-utils/TODO ! integration/TODO ! interpolation/TODO ! linalg/TODO ! matrix/TODO ! monte/TODO ! multifit/TODO ! ode-initval/TODO ! poly/TODO ! randist/TODO ! rng/TODO ! roots/TODO ! siman/TODO ! sort/TODO ! specfunc/TODO ! statistics/TODO ! 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. ! ! * Sort out "const" in prototypes for rng/qrng, it looks odd since there are ! consts for many functions which modify the state. ! ! * Switch to library interface versioning for libtool (eventually), ! provide better GSL_VERSION_MAJOR, GSL_VERSION_MINOR macros. ! ! * add Fresnel Integrals to specfunc. See TOMS 723 + 2 subsequent ! errata. ! ! * make mode variables consistent in specfunc -- some seem to be ! unnecessary from performance point of view since the speed difference ! is negligible. ! ! * Complex polynomial solvers (Got Newton-Mueller from ! jotahtin@cc.hut.fi, still to add (BJG)). ! * Reorganize siman interfaces to allow iterative use. ! * Add a GSL_ERROR_MODE environment variable for choosing error ! behavior at runtime (???). ! * Implement N-d histograms (Simone Piccardi is ! working on something here). * More tests. We should (at least) have a test for every error condition. Use GCOV to improve coverage. ! * Annotate the header files with GAMS classifications ! ! * Use pkg-config from GNOME, preferably the C version when that is ! working. * Make the return value EINVAL vs EDOM consistent for invalid --- 2,76 ---- =============== ! We are looking for volunteers to do the following tasks. ! Consult the TODO files in each directory first for specific ! requirements. ! * Fix error terms in implicit ODE solvers rk2imp, rk4imp, gear1, gear2. ! * Improve accuracy of coupling constant functions for large J (BUG#7) ! * PyGSL -- python bindings for GSL, see http://pygsl.sf.net/ ! * 1st-line support on the mailing lists (e.g. checking that bugs are ! reproducible, and that all relevant information is supplied) ! * Modified Ei(x) function (see specfunc/TODO) ! ! * Eigensystems for non-symmetric matrices ! ! * Quasi-random number distributions ! ! * ODE algorithms from RKSUITE ! ! * Incomplete Fermi-Dirac functions ! ! * General Legendre functions ! ! * Spheroidal wave functions ! ! * Weierstrass elliptic functions ! ! * Complex Bessel Functions ! ! * Additional volunteers with access to a good library to get copies of ! papers for other developers. ! ! * Estimates of condition numbers for linear solvers ! ! * Sine and Cosine Transforms from FFTPACK (Alok Singhal ) ! ! * Cubature, e.g as provided by Cubpack. (Gert Van den Eynde ! ?) ! ! * Mathieu functions (Lowell Johnson ) ! ! * Fresnel Integrals ("Juergen J. Zach" ) ! ! * Cumulative Distribution functions for the random distributions ! (Jason Hooper Stover ) ! ! Other tasks: ! ! * Fix build problems which occur with -ansi (and similar options) ! where BSD extensions like hypot(), log1p() are found by the ! configure script in the system math library but without any ! prototypes in the include files. ! ! * Remove use of long double internally, e.g. as an accumulator in ! loops. It introduces variation between platforms which is undesirable. ! It should be replaced with a preprocessor variable ACC_DOUBLE so ! that the user can compile the library with the old long double ! behavior if desired. ! ! * Use BLAS internally as much as possible, to take advantage of ! speed improvements on large-scale systems. There may be some ! instances where a simple for() loop is preferred since there's a ! function-call overhead in calling BLAS routines. * More tests. We should (at least) have a test for every error condition. Use GCOV to improve coverage. ! * Annotate the header files with GAMS classifications. See if they ! can be included in the GAMs website. * Make the return value EINVAL vs EDOM consistent for invalid *************** *** 81,98 **** the outermost layer which may have been missed. Everything should be of the form #define foo(x) (....) so there is no possibility of bad ! parsing. * Clean up the ordering of lines in the Makefile.am's so that they are ! all consistent. At the moment the lines are in any order. Also get rid ! of make strict targets, since it's better to define a shell alias to ! do that. Files with strict target are ! specfunc/Makefile.am Wishlist or vague ideas ======================= ! * An example chapter on how to link GSL code with Python * Provide an interface to LAPACK, as for BLAS? Clarify the license --- 88,111 ---- the outermost layer which may have been missed. Everything should be of the form #define foo(x) (....) so there is no possibility of bad ! parsing. Need a perl script to check this! * Clean up the ordering of lines in the Makefile.am's so that they are ! all consistent. At the moment the lines are in any order. ! * Eliminate use of volatile where it has been used to force rounding ! (integration/). It is better to write the code to avoid dependence on ! rounding. + * Constant objects (like gsl_roots_fsolver_brent) ought to have + constant pointers (const gsl_roots_fsolver_type * const + gsl_roots_fsolver_brent) Wishlist or vague ideas ======================= ! * An example chapter on how to link GSL code with GNU Guile, and Python ! ! We could also provide g-wrap wrappers for guile, or swig.i files and ! swig demos so that swig can be run more easily. * Provide an interface to LAPACK, as for BLAS? Clarify the license *************** *** 106,109 **** --- 119,124 ---- be public domain. + SEPT/02: See online images at http://members.fortunecity.com/aands/ + Devroye's book on Random Variates (1st ed) is/was in the public domain. The troff source has been lost, unfortunately, but he says we *************** *** 112,130 **** needed, plus a scanner with an Automatic Document Feeder. - ACM TOMS articles in the printed journal have the following copyright notice, - - "Permission to copy without fee all or part fo this material is - granted provided that the copies are made not made or distributed for - direct commercial advantage, the ACM copyright notice and the title of - the publication and its date appear, and notice is given by - permisision of the association for Computing Machinery. To copy - otherwise, or to republish, requires a fee and/or specific - permission." - - Wonder what this might mean with regard to being scanned and - distributed (??), presumably it is considered "republication" and so - requires permission. The versions downloaded from their server - explicitly forbid redistribution (natch). - * Investigate complex support in GCC: Operations like sin(z) silently convert argument to double, losing the imaginary part. This is --- 127,130 ---- *************** *** 153,171 **** checked for. - * Eliminate use of volatile where it has been used to force rounding - (integration/). It is better to write the code to avoid dependence on - rounding. - * Optimization/error for dest == src as appropriate - - * Constant objects (like gsl_roots_fsolver_brent) ought to have - constant pointers (const gsl_roots_fsolver_type * const - gsl_roots_fsolver_brent)?? - - * Provide g-wrap wrappers for guile - - * Add swig.i files and swig demos so that swig can be run more easily - - * Add a vector layer to statistics and ffts maybe * Provide a run-time expression evaluator for interactive programs --- 153,157 ---- diff -x *.info* -rc2P gsl-1.2/acconfig.h gsl-1.3/acconfig.h *** gsl-1.2/acconfig.h Sat May 11 20:46:21 2002 --- gsl-1.3/acconfig.h Fri Sep 6 14:00:37 2002 *************** *** 114,117 **** --- 114,126 ---- #endif + #ifndef HAVE_LDEXP + #define ldexp gsl_ldexp + #endif + + #ifndef HAVE_FREXP + #define frexp gsl_frexp + #endif + + #ifndef HAVE_FINITE #ifdef HAVE_ISFINITE *************** *** 128,132 **** #endif ! #ifndef RANGE_CHECK_ON ! #define RANGE_CHECK_OFF /* turn off range checking by default */ #endif --- 137,141 ---- #endif ! #ifndef GSL_RANGE_CHECK_ON ! #define GSL_RANGE_CHECK_OFF /* turn off range checking by default */ #endif diff -x *.info* -rc2P gsl-1.2/aclocal.m4 gsl-1.3/aclocal.m4 *** gsl-1.2/aclocal.m4 Fri Jul 19 20:58:21 2002 --- gsl-1.3/aclocal.m4 Wed Dec 18 22:31:49 2002 *************** *** 163,168 **** # serial 46 AC_PROG_LIBTOOL - builtin([undefine],[symbols]) - AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl --- 163,166 ---- *************** *** 190,193 **** --- 188,193 ---- AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl + AC_REQUIRE([LT_AC_PROG_SED])dnl + AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl *************** *** 290,296 **** ]) # _LT_AC_CHECK_DLFCN # -------------------- ! AC_DEFUN(_LT_AC_CHECK_DLFCN, [AC_CHECK_HEADERS(dlfcn.h) ])# _LT_AC_CHECK_DLFCN --- 290,317 ---- ]) + # AC_LIBTOOL_HEADER_ASSERT + # ------------------------ + AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], + [AC_CACHE_CHECK([whether $CC supports assert without backlinking], + [lt_cv_func_assert_works], + [case $host in + *-*-solaris*) + if test "$GCC" = yes && test "$with_gnu_ld" != yes; then + case `$CC --version 2>/dev/null` in + [[12]].*) lt_cv_func_assert_works=no ;; + *) lt_cv_func_assert_works=yes ;; + esac + fi + ;; + esac]) + + if test "x$lt_cv_func_assert_works" = xyes; then + AC_CHECK_HEADERS(assert.h) + fi + ])# AC_LIBTOOL_HEADER_ASSERT + # _LT_AC_CHECK_DLFCN # -------------------- ! AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h) ])# _LT_AC_CHECK_DLFCN *************** *** 310,317 **** # Character class describing NM global symbol codes. ! [symcode='[BCDEGRST]'] # Regexp to match symbols that can be accessed directly from C. ! [sympat='\([_A-Za-z][_A-Za-z0-9]*\)'] # Transform the above into a raw symbol and a C symbol. --- 331,338 ---- # Character class describing NM global symbol codes. ! symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. ! sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. *************** *** 327,334 **** case $host_os in aix*) ! [symcode='[BCDT]'] ;; cygwin* | mingw* | pw32*) ! [symcode='[ABCDGISTW]'] ;; hpux*) # Its linker distinguishes data from code symbols --- 348,355 ---- case $host_os in aix*) ! symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) ! symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols *************** *** 336,347 **** lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix*) ! [symcode='[BCDEGRST]'] ;; solaris* | sysv5*) ! [symcode='[BDT]'] ;; sysv4) ! [symcode='[DFNSTU]'] ;; esac --- 357,371 ---- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix* | nonstopux*) ! symcode='[[BCDEGRST]]' ! ;; ! osf*) ! symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) ! symcode='[[BDT]]' ;; sysv4) ! symcode='[[DFNSTU]]' ;; esac *************** *** 357,361 **** # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! [symcode='[ABCDGISTW]'] fi --- 381,385 ---- # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ! symcode='[[ABCDGISTW]]' fi *************** *** 364,368 **** # Write the raw and C identifiers. ! [lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"] # Check to see that the pipe works correctly. --- 388,392 ---- # Write the raw and C identifiers. ! lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. *************** *** 417,421 **** lt_ptr address; } ! [lt_preloaded_symbols[] =] { EOF --- 441,445 ---- lt_ptr address; } ! lt_preloaded_symbols[[]] = { EOF *************** *** 435,439 **** LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest; then pipe_works=yes fi --- 459,463 ---- LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" ! if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi *************** *** 490,493 **** --- 514,518 ---- *) lt_cv_sys_path_separator=':' ;; esac + PATH_SEPARATOR=$lt_cv_sys_path_separator fi ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR *************** *** 496,500 **** # -------------------------- # Add some code to the start of the generated configure script which ! # will find an echo command which doesn;t interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], --- 521,525 ---- # -------------------------- # Add some code to the start of the generated configure script which ! # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], *************** *** 565,569 **** # So, first we look for a working echo in the user's PATH. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && --- 590,594 ---- # So, first we look for a working echo in the user's PATH. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && *************** *** 654,658 **** # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ ! AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF, [if test "$cross_compiling" = yes; then : [$4] --- 679,683 ---- # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ ! AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [if test "$cross_compiling" = yes; then : [$4] *************** *** 741,745 **** # AC_LIBTOOL_DLOPEN_SELF # ------------------- ! AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF, [if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown --- 766,770 ---- # AC_LIBTOOL_DLOPEN_SELF # ------------------- ! AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown *************** *** 841,848 **** # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' ! [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. ! [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a --- 866,873 ---- # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' ! sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' # Same as above, but do not quote variable references. ! double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a *************** *** 978,982 **** lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; ! beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; --- 1003,1007 ---- lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; ! beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; *************** *** 1021,1025 **** ;; ! irix5* | irix6*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' --- 1046,1050 ---- ;; ! irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' *************** *** 1065,1073 **** lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ! if test "x$host_vendor" = xsni; then ! lt_cv_prog_cc_wl='-LD' ! else ! lt_cv_prog_cc_wl='-Wl,' ! fi ;; --- 1090,1094 ---- lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Wl,' ;; *************** *** 1135,1139 **** if test -n "$lt_cv_prog_cc_shlib"; then AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) ! if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then : else AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) --- 1156,1160 ---- if test -n "$lt_cv_prog_cc_shlib"; then AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) ! if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : else AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) *************** *** 1416,1420 **** if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else --- 1437,1441 ---- if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else *************** *** 1429,1438 **** export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ ! [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! ! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else --- 1450,1459 ---- export_symbols_cmds="$ltdll_cmds"' $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ ! sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! ! archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else *************** *** 1443,1446 **** --- 1464,1468 ---- case \[$]# in 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; esac; *************** *** 1555,1562 **** case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break ! fi done esac --- 1577,1586 ---- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do ! case $ld_flag in ! *-brtl*) aix_use_runtimelinking=yes break ! ;; ! esac done esac *************** *** 1672,1677 **** # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' --- 1696,1702 ---- # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' *************** *** 1725,1735 **** ;; ! irix5* | irix6*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes --- 1750,1761 ---- ;; ! irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: link_all_deplibs=yes *************** *** 1759,1763 **** hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' --- 1785,1789 ---- hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' *************** *** 1769,1773 **** ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; --- 1795,1799 ---- ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; *************** *** 1822,1826 **** --- 1848,1880 ---- solaris*) + # gcc --version < 3.0 without binutils cannot create self contained + # shared libraries reliably, requiring libgcc.a to resolve some of + # the object symbols generated in some cases. Libraries that use + # assert need libgcc.a to resolve __eprintf, for example. Linking + # a copy of libgcc.a into every shared library to guarantee resolving + # such symbols causes other problems: According to Tim Van Holder + # , C++ libraries end up with a separate + # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + case `$CC --version 2>/dev/null` in + [[12]].*) + cat <&2 + + *** Warning: Releases of GCC earlier than version 3.0 cannot reliably + *** create self contained shared libraries on Solaris systems, without + *** introducing a dependency on libgcc.a. Therefore, libtool is disabling + *** -no-undefined support, which will at least allow you to build shared + *** libraries. However, you may find that when you link such libraries + *** into an application without using GCC, you have to manually add + *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to + *** upgrade to a newer version of GCC. Another option is to rebuild your + *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. + + EOF + no_undefined_flag= + ;; + esac + fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now *************** *** 1831,1835 **** hardcode_shlibpath_var=no case $host_os in ! [solaris2.[0-5] | solaris2.[0-5].*]) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; --- 1885,1889 ---- hardcode_shlibpath_var=no case $host_os in ! solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *************** *** 1853,1863 **** sysv4) ! if test "x$host_vendor" = xsno; then ! archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes # is this really true??? ! else ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=no #Motorola manual says yes, but my tests say they lie ! fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no --- 1907,1927 ---- sysv4) ! case $host_vendor in ! sni) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! reload_cmds='$CC -r -o $output$reload_objs' ! hardcode_direct=no ! ;; ! motorola) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no *************** *** 2000,2003 **** --- 2064,2070 ---- aix4* | aix5*) version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 *************** *** 2011,2023 **** # development snapshots of GCC prior to 3.0. case $host_os in ! [ aix4 | aix4.[01] | aix4.[01].*)] ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; esac # AIX (on Power*) has no versioning support, so currently we can --- 2078,2090 ---- # development snapshots of GCC prior to 3.0. case $host_os in ! aix4 | aix4.[[01]] | aix4.[[01]].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; esac # AIX (on Power*) has no versioning support, so currently we can *************** *** 2038,2041 **** --- 2105,2109 ---- shlibpath_var=LIBPATH fi + hardcode_into_libs=yes ;; *************** *** 2043,2047 **** library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | [$Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\'']`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; --- 2111,2115 ---- library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. ! finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; *************** *** 2074,2078 **** yes,cygwin*) library_names_spec='$libname.dll.a' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ --- 2142,2146 ---- yes,cygwin*) library_names_spec='$libname.dll.a' ! soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ *************** *** 2084,2089 **** ;; yes,mingw*) ! library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) --- 2152,2157 ---- ;; yes,mingw*) ! library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` ;; yes,pw32*) *************** *** 2091,2095 **** ;; *) ! library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib' ;; esac --- 2159,2163 ---- ;; *) ! library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' ;; esac *************** *** 2168,2173 **** ;; ! irix5* | irix6*) ! version_type=irix need_lib_prefix=no need_version=no --- 2236,2244 ---- ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) version_type=irix ;; ! esac need_lib_prefix=no need_version=no *************** *** 2175,2179 **** library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in ! irix5*) libsuff= shlibsuff= ;; --- 2246,2250 ---- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in ! irix5* | nonstopux*) libsuff= shlibsuff= ;; *************** *** 2279,2287 **** version_type=osf need_version=no ! soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; --- 2350,2359 ---- version_type=osf need_version=no ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + hardcode_into_libs=yes ;; *************** *** 2326,2329 **** --- 2398,2407 ---- sni) shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no ;; motorola) *************** *** 2480,2484 **** # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ --- 2558,2562 ---- # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS SED \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ *************** *** 2542,2547 **** # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout --- 2620,2628 ---- # the same distribution terms that you use for the rest of that program. + # A sed that does not truncate output. + SED=$lt_SED + # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="${SED} -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout *************** *** 3212,3215 **** --- 3293,3297 ---- AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl + AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl ac_prog=ld if test "$GCC" = yes; then *************** *** 3225,3230 **** case $ac_prog in # Accept absolute paths. ! [[\\/]* | [A-Za-z]:[\\/]*)] ! [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` --- 3307,3312 ---- case $ac_prog in # Accept absolute paths. ! [[\\/]]* | [[A-Za-z]]:[[\\/]]*) ! re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` *************** *** 3250,3254 **** AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. --- 3332,3336 ---- AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. *************** *** 3303,3307 **** # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], ! [AC_CACHE_CHECK([how to recognise dependant libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' --- 3385,3389 ---- # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], ! [AC_CACHE_CHECK([how to recognise dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' *************** *** 3314,3318 **** # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # ['file_magic [regex]'] -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure --- 3396,3400 ---- # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure *************** *** 3329,3333 **** bsdi4*) ! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so --- 3411,3415 ---- bsdi4*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so *************** *** 3358,3362 **** # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` --- 3440,3444 ---- # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. ! lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` *************** *** 3373,3384 **** hpux10.20*|hpux11*) ! [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'] lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6*) case $host_os in ! irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" --- 3455,3466 ---- hpux10.20*|hpux11*) ! lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; ! irix5* | irix6* | nonstopux*) case $host_os in ! irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" *************** *** 3392,3396 **** esac # this will be overridden with pass_all, but let us keep it just in case ! [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"] ;; esac --- 3474,3478 ---- esac # this will be overridden with pass_all, but let us keep it just in case ! lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac *************** *** 3402,3410 **** linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;] esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` --- 3484,3492 ---- linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` *************** *** 3413,3424 **** netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] else ! [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] fi ;; newos6*) ! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so --- 3495,3506 ---- netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then ! lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' else ! lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' fi ;; newos6*) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so *************** *** 3451,3455 **** ;; ! [sysv5uw[78]* | sysv4*uw2*)] lt_cv_deplibs_check_method=pass_all ;; --- 3533,3537 ---- ;; ! sysv5uw[[78]]* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; *************** *** 3458,3462 **** case $host_vendor in motorola) ! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'] lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; --- 3540,3544 ---- case $host_vendor in motorola) ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; *************** *** 3466,3476 **** sequent) lt_cv_file_magic_cmd='/bin/file' ! [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;; sni) lt_cv_file_magic_cmd='/bin/file' ! [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"] lt_cv_file_magic_test_file=/lib/libc.so ;; esac ;; --- 3548,3561 ---- sequent) lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' ! lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; *************** *** 3484,3488 **** # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], ! [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(lt_cv_path_NM, [if test -n "$NM"; then --- 3569,3574 ---- # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], ! [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl ! AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(lt_cv_path_NM, [if test -n "$NM"; then *************** *** 3490,3494 **** lt_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. --- 3576,3580 ---- lt_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. *************** *** 3537,3546 **** # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and INCLTDL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and --- 3623,3632 ---- # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl convenience library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the ! # configure arguments. Note that LIBLTDL and LTDLINCL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed ! # with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and *************** *** 3554,3567 **** esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and --- 3640,3655 ---- esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ! # For backwards non-gettext consistent compatibility... ! INCLTDL="$LTDLINCL" ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for ! # the libltdl installable library and LTDLINCL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure ! # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will ! # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and *************** *** 3581,3590 **** ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! INCLTDL= fi ]) --- 3669,3680 ---- ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la ! LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" ! LTDLINCL= fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" ]) *************** *** 3600,3602 **** --- 3690,3781 ---- # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) + + # NOTE: This macro has been submitted for inclusion into # + # GNU Autoconf as AC_PROG_SED. When it is available in # + # a released version of Autoconf we should remove this # + # macro and use it instead. # + # LT_AC_PROG_SED + # -------------- + # Check for a fully-functional sed program, that truncates + # as few characters as possible. Prefer GNU sed if found. + AC_DEFUN([LT_AC_PROG_SED], + [AC_MSG_CHECKING([for a sed that does not truncate output]) + AC_CACHE_VAL(lt_cv_path_SED, + [# Loop through the user's path and test for sed and gsed. + # Then use that list of sed's as ones to test for truncation. + as_executable_p="test -f" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" + fi + done + done + done + + # Create a temporary directory, and hook for its removal unless debugging. + $debug || + { + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } + + # Create a (secure) tmp directory for tmp files. + : ${TMPDIR=/tmp} + { + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + tmp=$TMPDIR/sed$$-$RANDOM + (umask 077 && mkdir $tmp) + } || + { + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } + } + _max=0 + _count=0 + # Add /usr/xpg4/bin/sed as it is typically found on Solaris + # along with /bin/sed that truncates output. + for _sed in $_sed_list /usr/xpg4/bin/sed; do + test ! -f ${_sed} && break + cat /dev/null > "$tmp/sed.in" + _count=0 + echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" + # Check for GNU sed and select it if it is found. + if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then + lt_cv_path_SED=${_sed} + break + fi + while true; do + cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" + mv "$tmp/sed.tmp" "$tmp/sed.in" + cp "$tmp/sed.in" "$tmp/sed.nl" + echo >>"$tmp/sed.nl" + ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break + cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break + # 40000 chars as input seems more than enough + test $_count -gt 10 && break + _count=`expr $_count + 1` + if test $_count -gt $_max; then + _max=$_count + lt_cv_path_SED=$_sed + fi + done + done + rm -rf "$tmp" + ]) + if test "X$SED" != "X"; then + lt_cv_path_SED=$SED + else + SED=$lt_cv_path_SED + fi + AC_MSG_RESULT([$SED]) + ]) diff -x *.info* -rc2P gsl-1.2/block/test_complex_io.c gsl-1.3/block/test_complex_io.c *** gsl-1.2/block/test_complex_io.c Wed May 2 22:49:58 2001 --- gsl-1.3/block/test_complex_io.c Sun Dec 15 19:17:09 2002 *************** *** 61,64 **** } ! gsl_test (status, NAME (gsl_block) "_fprintf and fscanf work correctly"); } --- 61,64 ---- } ! gsl_test (status, NAME (gsl_block) "_fprintf and fscanf"); } diff -x *.info* -rc2P gsl-1.2/block/test_complex_source.c gsl-1.3/block/test_complex_source.c *** gsl-1.2/block/test_complex_source.c Wed May 2 22:49:58 2001 --- gsl-1.3/block/test_complex_source.c Sun Dec 15 19:17:09 2002 *************** *** 107,111 **** } ! gsl_test (status, NAME (gsl_block) "_write and read work correctly"); } --- 107,111 ---- } ! gsl_test (status, NAME (gsl_block) "_write and read"); } diff -x *.info* -rc2P gsl-1.2/block/test_io.c gsl-1.3/block/test_io.c *** gsl-1.2/block/test_io.c Wed Apr 18 21:52:21 2001 --- gsl-1.3/block/test_io.c Sun Dec 15 19:17:09 2002 *************** *** 56,60 **** }; ! gsl_test (status, NAME (gsl_block) "_fprintf and fscanf work correctly"); fclose (f); --- 56,60 ---- }; ! gsl_test (status, NAME (gsl_block) "_fprintf and fscanf"); fclose (f); diff -x *.info* -rc2P gsl-1.2/block/test_source.c gsl-1.3/block/test_source.c *** gsl-1.2/block/test_source.c Wed May 2 22:49:58 2001 --- gsl-1.3/block/test_source.c Sun Dec 15 19:17:09 2002 *************** *** 110,114 **** } ! gsl_test (status, NAME (gsl_block) "_write and read work correctly"); } --- 110,114 ---- } ! gsl_test (status, NAME (gsl_block) "_write and read"); } diff -x *.info* -rc2P gsl-1.2/complex/ChangeLog gsl-1.3/complex/ChangeLog *** gsl-1.2/complex/ChangeLog Tue Sep 11 19:20:50 2001 --- gsl-1.3/complex/ChangeLog Wed Dec 11 13:17:37 2002 *************** *** 1,2 **** --- 1,6 ---- + Wed Dec 11 13:17:21 2002 Brian Gough + + * math.c (gsl_complex_arg): enforce special case arg(0,0) = 0.0 + Mon Sep 10 22:57:27 2001 Brian Gough diff -x *.info* -rc2P gsl-1.2/complex/TODO gsl-1.3/complex/TODO *** gsl-1.2/complex/TODO Tue Apr 4 20:55:12 2000 --- gsl-1.3/complex/TODO Fri Jul 26 17:46:53 2002 *************** *** 1,2 **** --- 1,5 ---- + * Complex polynomial solvers (Got Newton-Mueller from + jotahtin@cc.hut.fi, still to add (BJG)). + * The asymptotic behavior of the secondary functions (sec, csc, cot, etc) can overflow because of expressions like cosh(x) / D , where D = diff -x *.info* -rc2P gsl-1.2/complex/math.c gsl-1.3/complex/math.c *** gsl-1.2/complex/math.c Tue Sep 11 19:20:51 2001 --- gsl-1.3/complex/math.c Wed Dec 11 13:17:14 2002 *************** *** 77,81 **** gsl_complex_arg (gsl_complex z) { /* return arg(z), -pi < arg(z) <= +pi */ ! return atan2 (GSL_IMAG (z), GSL_REAL (z)); } --- 77,89 ---- gsl_complex_arg (gsl_complex z) { /* return arg(z), -pi < arg(z) <= +pi */ ! double x = GSL_REAL (z); ! double y = GSL_IMAG (z); ! ! if (x == 0.0 && y == 0.0) ! { ! return 0; ! } ! ! return atan2 (y, x); } diff -x *.info* -rc2P gsl-1.2/config.guess gsl-1.3/config.guess *** gsl-1.2/config.guess Thu Sep 6 08:39:13 2001 --- gsl-1.3/config.guess Sun Dec 15 18:39:46 2002 *************** *** 1,8 **** #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! timestamp='2001-08-23' # This file is free software; you can redistribute it and/or modify it --- 1,8 ---- #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-10-21' # This file is free software; you can redistribute it and/or modify it *************** *** 25,30 **** # the same distribution terms that you use for the rest of that program. ! # Written by Per Bothner . ! # Please send patches to . # # This script attempts to guess a canonical system name similar to --- 25,31 ---- # the same distribution terms that you use for the rest of that program. ! # Originally written by Per Bothner . ! # Please send patches to . Submit a context ! # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to *************** *** 88,108 **** fi ! dummy=dummy-$$ ! trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int dummy(){}" > $dummy.c ; ! for c in cc gcc c89 ; do ! ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; ! if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; ! rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; --- 89,118 ---- fi + trap 'exit 1' 1 2 15 ! # CC_FOR_BUILD -- compiler used by this script. Note that the use of a ! # compiler to aid in system detection is discouraged as it requires ! # temporary files to be created and, as you can see below, it is a ! # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. ! # This shell variable is my proudest work .. or something. --bje ! ! set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; ! (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) ! || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; ! dummy=$tmpdir/dummy ; ! files="$dummy.c $dummy.o $dummy.rel $dummy" ; ! trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; ! case $CC_FOR_BUILD,$HOST_CC,$CC in ! ,,) echo "int x;" > $dummy.c ; ! for c in cc gcc c89 c99 ; do ! if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; ! rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; *************** *** 111,115 **** ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. --- 121,126 ---- ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; ! esac ; ! unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. *************** *** 128,132 **** case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) ! # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently --- 139,143 ---- case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) ! # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently *************** *** 135,154 **** # compatibility and a consistent mechanism for selecting the # object file format. ! # Determine the machine/vendor (is the vendor relevant). ! case "${UNAME_MACHINE}" in ! amiga) machine=m68k-unknown ;; ! arm32) machine=arm-unknown ;; ! atari*) machine=m68k-atari ;; ! sun3*) machine=m68k-sun ;; ! mac68k) machine=m68k-apple ;; ! macppc) machine=powerpc-apple ;; ! hp3[0-9][05]) machine=m68k-hp ;; ! ibmrt|romp-ibm) machine=romp-ibm ;; ! *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. ! case "${UNAME_MACHINE}" in ! i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ --- 146,166 ---- # compatibility and a consistent mechanism for selecting the # object file format. ! # ! # Note: NetBSD doesn't particularly care about the vendor ! # portion of the name. We always set it to "unknown". ! sysctl="sysctl -n hw.machine_arch" ! UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ! /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ! case "${UNAME_MACHINE_ARCH}" in ! armeb) machine=armeb-unknown ;; ! arm*) machine=arm-unknown ;; ! sh3el) machine=shl-unknown ;; ! sh3eb) machine=sh-unknown ;; ! *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. ! case "${UNAME_MACHINE_ARCH}" in ! arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ *************** *** 173,176 **** --- 185,227 ---- echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then *************** *** 181,184 **** --- 232,236 ---- # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data *************** *** 206,213 **** .end main EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ! case `./$dummy` in 0-0) UNAME_MACHINE="alpha" --- 258,264 ---- .end main EOF ! $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then ! case `$dummy` in 0-0) UNAME_MACHINE="alpha" *************** *** 231,237 **** UNAME_MACHINE="alphaev68" ;; esac fi ! rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; --- 282,291 ---- UNAME_MACHINE="alphaev68" ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi ! rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; *************** *** 248,274 **** echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! arc64:OpenBSD:*:*) ! echo mips64el-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! arc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! hkmips:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! pmax:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! sgi:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! wgrisc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) --- 302,310 ---- echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! *:[Mm]orph[Oo][Ss]:*:*) ! echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) *************** *** 292,295 **** --- 328,335 ---- echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` *************** *** 320,324 **** exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in --- 360,364 ---- exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in *************** *** 334,343 **** echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - sparc*:NetBSD:*) - echo `uname -p`-unknown-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not --- 374,377 ---- *************** *** 366,381 **** echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} --- 400,403 ---- *************** *** 394,397 **** --- 416,420 ---- exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus *************** *** 415,423 **** } EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.c -o $dummy \ ! && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; --- 438,445 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c \ ! && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; *************** *** 425,428 **** --- 447,456 ---- echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix *************** *** 485,488 **** --- 513,517 ---- *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include *************** *** 496,502 **** } EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then --- 525,530 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then *************** *** 507,511 **** exit 0 ;; *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 --- 535,539 ---- exit 0 ;; *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 *************** *** 547,554 **** 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) ! case "${HPUX_REV}" in ! 11.[0-9][0-9]) ! if [ -x /usr/bin/getconf ]; then ! sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in --- 575,580 ---- 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) ! if [ -x /usr/bin/getconf ]; then ! sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in *************** *** 559,568 **** 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac ! fi ;; ! esac ! if [ "${HP_ARCH}" = "" ]; then ! sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE --- 585,595 ---- 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac ! fi ! if [ "${HP_ARCH}" = "" ]; then ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE *************** *** 597,605 **** } EOF ! eval $set_cc_for_build ! (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy ! fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} --- 624,631 ---- } EOF ! (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy && rmdir $tmpdir ! fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} *************** *** 610,613 **** --- 636,640 ---- exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include *************** *** 635,641 **** } EOF ! eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; --- 662,667 ---- } EOF ! $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; *************** *** 665,671 **** echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd --- 691,694 ---- *************** *** 686,692 **** echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' --- 709,712 ---- *************** *** 710,716 **** echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` --- 730,733 ---- *************** *** 719,725 **** echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} --- 736,739 ---- *************** *** 732,739 **** exit 0 ;; *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ! exit 0 ;; ! *:OpenBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) --- 746,762 ---- exit 0 ;; *:FreeBSD:*:*) ! # Determine whether the default compiler uses glibc. ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #if __GLIBC__ >= 2 ! LIBC=gnu ! #else ! LIBC= ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c && rmdir $tmpdir ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) *************** *** 746,749 **** --- 769,775 ---- echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? *************** *** 771,775 **** exit 0 ;; ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) --- 797,801 ---- exit 0 ;; ia64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) *************** *** 777,784 **** exit 0 ;; mips:Linux:*:*) ! case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in ! big) echo mips-unknown-linux-gnu && exit 0 ;; ! little) echo mipsel-unknown-linux-gnu && exit 0 ;; ! esac ;; ppc:Linux:*:*) --- 803,824 ---- exit 0 ;; mips:Linux:*:*) ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #undef CPU ! #undef mips ! #undef mipsel ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mipsel ! #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ! CPU=mips ! #else ! CPU= ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) *************** *** 829,833 **** # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! ld_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g --- 869,874 ---- # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! # Set LC_ALL=C to ensure ld outputs messages in English. ! ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g *************** *** 841,845 **** a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" --- 882,886 ---- a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" *************** *** 852,882 **** esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c < - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { - #endif - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); - # else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); - # endif - # else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); - # endif - #else - printf ("%s-pc-linux-gnuaout\n", argv[1]); - #endif - return 0; - } - EOF eval $set_cc_for_build ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; --- 893,920 ---- esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #ifdef __ELF__ ! # ifdef __GLIBC__ ! # if __GLIBC__ >= 2 ! LIBC=gnu ! # else ! LIBC=gnulibc1 ! # endif ! # else ! LIBC=gnulibc1 ! # endif ! #else ! #ifdef __INTEL_COMPILER ! LIBC=gnu ! #else ! LIBC=gnuaout ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c && rmdir $tmpdir ! test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; *************** *** 916,926 **** echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` ! (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL --- 954,964 ---- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then ! UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` ! (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 ! (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 ! (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL *************** *** 955,961 **** echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ --- 993,1002 ---- echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; ! 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ *************** *** 1048,1051 **** --- 1089,1095 ---- echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} *************** *** 1058,1070 **** exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi ! echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; --- 1102,1116 ---- exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) ! UNAME_PROCESSOR=`uname -p` ! if test "$UNAME_PROCESSOR" = "x86"; then ! UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi ! echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; ! NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *************** *** 1123,1126 **** --- 1169,1173 ---- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + eval $set_cc_for_build cat >$dummy.c </dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy # Apollos put the system type in the environment. --- 1284,1289 ---- EOF ! $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 ! rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. diff -x *.info* -rc2P gsl-1.2/config.h.in gsl-1.3/config.h.in *** gsl-1.2/config.h.in Sun May 19 21:18:45 2002 --- gsl-1.3/config.h.in Tue Dec 10 19:57:21 2002 *************** *** 37,40 **** --- 37,43 ---- #undef HAVE_FINITE + /* Define if you have the frexp function. */ + #undef HAVE_FREXP + /* Define if you have the hypot function. */ #undef HAVE_HYPOT *************** *** 49,52 **** --- 52,58 ---- #undef HAVE_ISNAN + /* Define if you have the ldexp function. */ + #undef HAVE_LDEXP + /* Define if you have the log1p function. */ #undef HAVE_LOG1P *************** *** 190,193 **** --- 196,208 ---- #endif + #ifndef HAVE_LDEXP + #define ldexp gsl_ldexp + #endif + + #ifndef HAVE_FREXP + #define frexp gsl_frexp + #endif + + #ifndef HAVE_FINITE #ifdef HAVE_ISFINITE *************** *** 204,208 **** #endif ! #ifndef RANGE_CHECK_ON ! #define RANGE_CHECK_OFF /* turn off range checking by default */ #endif --- 219,223 ---- #endif ! #ifndef GSL_RANGE_CHECK_ON ! #define GSL_RANGE_CHECK_OFF /* turn off range checking by default */ #endif diff -x *.info* -rc2P gsl-1.2/config.sub gsl-1.3/config.sub *** gsl-1.2/config.sub Thu Sep 6 08:39:13 2001 --- gsl-1.3/config.sub Sun Dec 15 18:39:46 2002 *************** *** 1,8 **** #! /bin/sh # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! # Free Software Foundation, Inc. ! timestamp='2001-08-23' # This file is (in principle) common to ALL GNU software. --- 1,8 ---- #! /bin/sh # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. *************** *** 30,34 **** # the same distribution terms that you use for the rest of that program. ! # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. --- 30,35 ---- # the same distribution terms that you use for the rest of that program. ! # Please send patches to . Submit a context ! # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. *************** *** 118,122 **** maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` --- 119,123 ---- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` *************** *** 227,255 **** | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ! | c4x | clipper \ ! | d10v | d30v | dsp16xx \ ! | fr30 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el | mips64vr4300 \ ! | mips64vr4300el | mips64vr5000 | mips64vr5000el \ ! | mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ ! | openrisc \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | s390 | s390x \ ! | sh | sh[34] | sh[34]eb | shbe | shle \ ! | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ ! | stormy16 | strongarm \ | tahoe | thumb | tic80 | tron \ ! | v850 \ | we32k \ ! | x86 | xscale \ | z8k) basic_machine=$basic_machine-unknown --- 228,267 ---- | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ! | clipper \ ! | d10v | d30v | dlx | dsp16xx \ ! | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ ! | mips | mipsbe | mipseb | mipsel | mipsle \ ! | mips16 \ ! | mips64 | mips64el \ ! | mips64vr | mips64vrel \ ! | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el \ ! | mips64vr4300 | mips64vr4300el \ ! | mips64vr5000 | mips64vr5000el \ ! | mipsisa32 | mipsisa32el \ ! | mipsisa64 | mipsisa64el \ ! | mipsisa64sb1 | mipsisa64sb1el \ ! | mipsisa64sr71k | mipsisa64sr71kel \ ! | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ ! | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ ! | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ ! | sh64 | sh64le \ ! | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ ! | strongarm \ | tahoe | thumb | tic80 | tron \ ! | v850 | v850e \ | we32k \ ! | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown *************** *** 278,299 **** | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ! | alphapca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armv*-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c54x-* \ ! | clipper-* | cray2-* | cydra-* \ ! | d10v-* | d30v-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | m32r-* \ ! | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ ! | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \ ! | mipsle-* | mipstx39-* | mipstx39el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ --- 290,323 ---- | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ! | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ! | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ ! | avr-* \ | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ ! | clipper-* | cydra-* \ ! | d10v-* | d30v-* | dlx-* \ | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ ! | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ ! | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ ! | mips16-* \ ! | mips64-* | mips64el-* \ ! | mips64vr-* | mips64vrel-* \ ! | mips64orion-* | mips64orionel-* \ ! | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* \ ! | mips64vr5000-* | mips64vr5000el-* \ ! | mipsisa32-* | mipsisa32el-* \ ! | mipsisa64-* | mipsisa64el-* \ ! | mipsisa64sb1-* | mipsisa64sb1el-* \ ! | mipsisa64sr71k-* | mipsisa64sr71kel-* \ ! | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ *************** *** 302,313 **** | pyramid-* \ | romp-* | rs6000-* \ ! | s390-* | s390x-* \ ! | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ ! | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ ! | v850-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | ymp-* \ | z8k-*) --- 326,338 ---- | pyramid-* \ | romp-* | rs6000-* \ ! | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ ! | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ! | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ ! | v850-* | v850e-* | vax-* \ | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ ! | xtensa-* \ | ymp-* \ | z8k-*) *************** *** 374,377 **** --- 399,406 ---- os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex *************** *** 394,407 **** os=-bsd ;; ! cray | ymp) ! basic_machine=ymp-cray ! os=-unicos ! ;; ! cray2) ! basic_machine=cray2-cray ! os=-unicos ! ;; ! [cjt]90) ! basic_machine=${basic_machine}-cray os=-unicos ;; --- 423,428 ---- os=-bsd ;; ! cray | j90) ! basic_machine=j90-cray os=-unicos ;; *************** *** 418,421 **** --- 439,450 ---- basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) *************** *** 598,609 **** os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` --- 627,630 ---- *************** *** 620,623 **** --- 641,648 ---- os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc *************** *** 699,702 **** --- 724,731 ---- os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson *************** *** 721,731 **** basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; --- 750,760 ---- basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; ! pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; *************** *** 733,737 **** basic_machine=i686-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; --- 762,766 ---- basic_machine=i686-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; *************** *** 748,767 **** ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` --- 777,796 ---- ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ! ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ! ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` *************** *** 784,791 **** --- 813,832 ---- basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent *************** *** 795,799 **** os=-hms ;; ! sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks --- 836,840 ---- os=-hms ;; ! sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks *************** *** 861,868 **** os=-dynix ;; t3e) ! basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown --- 902,921 ---- os=-dynix ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; t3e) ! basic_machine=alphaev5-cray ! os=-unicos ! ;; ! t90) ! basic_machine=t90-cray os=-unicos ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown *************** *** 875,878 **** --- 928,935 ---- basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr *************** *** 899,904 **** ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs --- 956,961 ---- ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs *************** *** 925,935 **** os=-windows32-msvcrt ;; ! xmp) ! basic_machine=xmp-cray ! os=-unicos ! ;; ! xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown --- 982,992 ---- os=-windows32-msvcrt ;; ! xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown *************** *** 952,962 **** basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm --- 1009,1012 ---- *************** *** 978,988 **** basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; --- 1028,1041 ---- basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; *************** *** 999,1006 **** basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. --- 1052,1055 ---- *************** *** 1068,1072 **** | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; --- 1117,1122 ---- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ! | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; *************** *** 1120,1123 **** --- 1170,1176 ---- os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd *************** *** 1126,1131 **** os=-sysv ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) --- 1179,1187 ---- os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) ! os=-nextstep2 ;; -nsk*) *************** *** 1166,1171 **** os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) --- 1222,1227 ---- os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ;; -none) *************** *** 1200,1207 **** os=-aout ;; pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; --- 1256,1264 ---- os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; ! pdp11-*) os=-none ;; *************** *** 1230,1233 **** --- 1287,1293 ---- os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 *************** *** 1293,1300 **** os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; --- 1353,1360 ---- os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *************** *** 1302,1309 **** os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; --- 1362,1369 ---- os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *************** *** 1377,1381 **** vendor=sequent ;; ! -vxsim* | -vxworks*) vendor=wrs ;; --- 1437,1441 ---- vendor=sequent ;; ! -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; diff -x *.info* -rc2P gsl-1.2/configure gsl-1.3/configure *** gsl-1.2/configure Fri Jul 19 20:59:15 2002 --- gsl-1.3/configure Wed Dec 18 22:32:51 2002 *************** *** 32,35 **** --- 32,36 ---- *) lt_cv_sys_path_separator=':' ;; esac + PATH_SEPARATOR=$lt_cv_sys_path_separator fi *************** *** 98,102 **** # So, first we look for a working echo in the user's PATH. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && --- 99,103 ---- # So, first we look for a working echo in the user's PATH. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && *************** *** 727,731 **** # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:730: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then --- 728,732 ---- # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:731: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then *************** *** 780,784 **** echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:783: checking whether build environment is sane" >&5 # Just in case sleep 1 --- 781,785 ---- echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 ! echo "configure:784: checking whether build environment is sane" >&5 # Just in case sleep 1 *************** *** 837,841 **** echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:840: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then --- 838,842 ---- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:841: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then *************** *** 866,870 **** PACKAGE=gsl ! VERSION="1.2" if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then --- 867,871 ---- PACKAGE=gsl ! VERSION="1.3" if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then *************** *** 883,887 **** missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:886: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 884,888 ---- missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 ! echo "configure:887: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** *** 896,900 **** echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:899: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 897,901 ---- echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 ! echo "configure:900: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** *** 909,913 **** echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:912: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 910,914 ---- echo $ac_n "checking for working automake""... $ac_c" 1>&6 ! echo "configure:913: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** *** 922,926 **** echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:925: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 923,927 ---- echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 ! echo "configure:926: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** *** 935,939 **** echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:938: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. --- 936,940 ---- echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 ! echo "configure:939: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. *************** *** 952,956 **** echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:955: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then --- 953,957 ---- echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 ! echo "configure:956: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then *************** *** 976,980 **** ! GSL_LT_VERSION="3:0:3" GSL_LT_CBLAS_VERSION="0:0:0" --- 977,981 ---- ! GSL_LT_VERSION="4:0:4" GSL_LT_CBLAS_VERSION="0:0:0" *************** *** 1001,1005 **** echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1004: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then --- 1002,1006 ---- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:1005: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then *************** *** 1035,1039 **** echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:1038: checking host system type" >&5 host_alias=$host --- 1036,1040 ---- echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:1039: checking host system type" >&5 host_alias=$host *************** *** 1059,1063 **** set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1062: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1060,1064 ---- set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1063: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1089,1093 **** set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1092: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1090,1094 ---- set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1093: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1140,1144 **** set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1143: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1141,1145 ---- set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1144: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1172,1176 **** echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1175: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c --- 1173,1177 ---- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:1176: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c *************** *** 1183,1192 **** cat > conftest.$ac_ext << EOF ! #line 1186 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. --- 1184,1193 ---- cat > conftest.$ac_ext << EOF ! #line 1187 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:1192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. *************** *** 1214,1223 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1217: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1222: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1215,1224 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:1218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:1223: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1228,1232 **** #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else --- 1229,1233 ---- #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else *************** *** 1247,1251 **** CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1250: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1248,1252 ---- CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:1251: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1279,1283 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1282: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then --- 1280,1284 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:1283: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then *************** *** 1294,1298 **** # not just through cpp. cat > conftest.$ac_ext < --- 1295,1299 ---- # not just through cpp. cat > conftest.$ac_ext < *************** *** 1300,1304 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1301,1305 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1311,1315 **** CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < --- 1312,1316 ---- CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < *************** *** 1317,1321 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1318,1322 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1328,1332 **** CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < --- 1329,1333 ---- CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < *************** *** 1334,1338 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1335,1339 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1370,1374 **** # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1373: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then --- 1371,1375 ---- # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1374: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then *************** *** 1423,1427 **** echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1426: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1424,1428 ---- echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:1427: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1444,1448 **** echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1447: checking build system type" >&5 build_alias=$build --- 1445,1449 ---- echo $ac_n "checking build system type""... $ac_c" 1>&6 ! echo "configure:1448: checking build system type" >&5 build_alias=$build *************** *** 1470,1474 **** set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1473: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1471,1475 ---- set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1474: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1502,1506 **** set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1505: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1503,1507 ---- set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1506: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1537,1541 **** set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1540: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1538,1542 ---- set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1541: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1569,1573 **** set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1572: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1570,1574 ---- set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1573: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1602,1612 **** #AC_PROG_RANLIB echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:1606: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext </dev/null`} + case X$UNAME in + *-DOS) lt_cv_sys_path_separator=';' ;; + *) lt_cv_sys_path_separator=':' ;; + esac + PATH_SEPARATOR=$lt_cv_sys_path_separator + fi + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 ! echo "configure:1618: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes --- 1631,1635 ---- ; return 0; } EOF ! if { (eval echo configure:1634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes *************** *** 1636,1645 **** test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 ! echo "configure:1639: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1651: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes --- 1660,1664 ---- ; return 0; } EOF ! if { (eval echo configure:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes *************** *** 1745,1749 **** # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1748: checking for ld used by GCC" >&5 case $host in *-*-mingw*) --- 1757,1761 ---- # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 ! echo "configure:1760: checking for ld used by GCC" >&5 case $host in *-*-mingw*) *************** *** 1775,1782 **** elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1778: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1781: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then --- 1787,1794 ---- elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 ! echo "configure:1790: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 ! echo "configure:1793: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then *************** *** 1784,1788 **** else if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. --- 1796,1800 ---- else if test -z "$LD"; then ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. *************** *** 1813,1817 **** test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1816: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1825,1829 ---- test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 ! echo "configure:1828: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1830,1834 **** echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1833: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1842,1846 ---- echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 ! echo "configure:1845: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1842,1846 **** echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1845: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1854,1858 ---- echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 ! echo "configure:1857: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1850,1854 **** lt_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. --- 1862,1866 ---- lt_cv_path_NM="$NM" else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. *************** *** 1879,1884 **** echo "$ac_t""$NM" 1>&6 ! echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 ! echo "configure:1883: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1891,1980 ---- echo "$ac_t""$NM" 1>&6 ! echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6 ! echo "configure:1895: checking for a sed that does not truncate output" >&5 ! if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! # Loop through the user's path and test for sed and gsed. ! # Then use that list of sed's as ones to test for truncation. ! as_executable_p="test -f" ! as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ! for as_dir in $PATH ! do ! IFS=$as_save_IFS ! test -z "$as_dir" && as_dir=. ! for ac_prog in sed gsed; do ! for ac_exec_ext in '' $ac_executable_extensions; do ! if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then ! _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" ! fi ! done ! done ! done ! ! # Create a temporary directory, and hook for its removal unless debugging. ! $debug || ! { ! trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ! trap '{ (exit 1); exit 1; }' 1 2 13 15 ! } ! ! # Create a (secure) tmp directory for tmp files. ! : ${TMPDIR=/tmp} ! { ! tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && ! test -n "$tmp" && test -d "$tmp" ! } || ! { ! tmp=$TMPDIR/sed$$-$RANDOM ! (umask 077 && mkdir $tmp) ! } || ! { ! echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ! { (exit 1); exit 1; } ! } ! _max=0 ! _count=0 ! # Add /usr/xpg4/bin/sed as it is typically found on Solaris ! # along with /bin/sed that truncates output. ! for _sed in $_sed_list /usr/xpg4/bin/sed; do ! test ! -f ${_sed} && break ! cat /dev/null > "$tmp/sed.in" ! _count=0 ! echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" ! # Check for GNU sed and select it if it is found. ! if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then ! lt_cv_path_SED=${_sed} ! break ! fi ! while true; do ! cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" ! mv "$tmp/sed.tmp" "$tmp/sed.in" ! cp "$tmp/sed.in" "$tmp/sed.nl" ! echo >>"$tmp/sed.nl" ! ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break ! cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break ! # 40000 chars as input seems more than enough ! test $_count -gt 10 && break ! _count=`expr $_count + 1` ! if test $_count -gt $_max; then ! _max=$_count ! lt_cv_path_SED=$_sed ! fi ! done ! done ! rm -rf "$tmp" ! ! fi ! ! if test "X$SED" != "X"; then ! lt_cv_path_SED=$SED ! else ! SED=$lt_cv_path_SED ! fi ! echo "$ac_t""$SED" 1>&6 ! ! echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6 ! echo "configure:1979: checking how to recognise dependent libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1893,1897 **** # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # ['file_magic [regex]'] -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure --- 1989,1993 ---- # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. ! # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure *************** *** 1957,1963 **** ;; ! irix5* | irix6*) case $host_os in ! irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" --- 2053,2059 ---- ;; ! irix5* | irix6* | nonstopux*) case $host_os in ! irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" *************** *** 1981,1985 **** linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) --- 2077,2081 ---- linux-gnu*) case $host_cpu in ! alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) lt_cv_deplibs_check_method=pass_all ;; *) *************** *** 2052,2055 **** --- 2148,2154 ---- lt_cv_file_magic_test_file=/lib/libc.so ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; esac ;; *************** *** 2063,2067 **** echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2066: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2162,2166 ---- echo $ac_n "checking for object suffix""... $ac_c" 1>&6 ! echo "configure:2165: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2069,2073 **** rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in --- 2168,2172 ---- rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext ! if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *************** *** 2089,2093 **** echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2092: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2188,2192 ---- echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 ! echo "configure:2191: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2099,2103 **** echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in --- 2198,2202 ---- echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= ! if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *************** *** 2124,2128 **** # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 ! echo "configure:2127: checking command to parse $NM output" >&5 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2223,2227 ---- # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 ! echo "configure:2226: checking command to parse $NM output" >&5 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2159,2165 **** lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix*) symcode='[BCDEGRST]' ;; solaris* | sysv5*) symcode='[BDT]' --- 2258,2267 ---- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; ! irix* | nonstopux*) symcode='[BCDEGRST]' ;; + osf*) + symcode='[BCDEGQRST]' + ;; solaris* | sysv5*) symcode='[BDT]' *************** *** 2204,2211 **** EOF ! if { (eval echo configure:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. nlist=conftest.nm ! if { (eval echo configure:2210: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then --- 2306,2313 ---- EOF ! if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. nlist=conftest.nm ! if { (eval echo configure:2312: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then *************** *** 2258,2262 **** LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" ! if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes fi --- 2360,2364 ---- LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" ! if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then pipe_works=yes fi *************** *** 2307,2321 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2310: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 2409,2423 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2412: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 2347,2350 **** --- 2449,2453 ---- + # Only perform the check for file, if the check method requires it case $deplibs_check_method in *************** *** 2352,2356 **** if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2355: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2455,2459 ---- if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 ! echo "configure:2458: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2414,2418 **** if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2417: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2517,2521 ---- if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 ! echo "configure:2520: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2485,2489 **** set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2488: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2588,2592 ---- set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2591: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2517,2521 **** set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2520: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2620,2624 ---- set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2623: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2552,2556 **** set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2555: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2655,2659 ---- set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2658: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2584,2588 **** set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2587: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2687,2691 ---- set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:2690: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2633,2638 **** *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2636 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) --- 2736,2741 ---- *-*-irix6*) # Find out which ABI we are using. ! echo '#line 2739 "configure"' > conftest.$ac_ext ! if { (eval echo configure:2740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) *************** *** 2655,2659 **** CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2658: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2758,2762 ---- CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 ! echo "configure:2761: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2668,2672 **** cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes --- 2778,2782 ---- ; return 0; } EOF ! if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes *************** *** 2795,2799 **** echo $ac_n "checking for objdir""... $ac_c" 1>&6 ! echo "configure:2798: checking for objdir" >&5 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null --- 2898,2902 ---- echo $ac_n "checking for objdir""... $ac_c" 1>&6 ! echo "configure:2901: checking for objdir" >&5 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null *************** *** 2822,2826 **** # the associated values are set (in the cache) correctly too. echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 ! echo "configure:2825: checking for $compiler option to produce PIC" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2925,2929 ---- # the associated values are set (in the cache) correctly too. echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6 ! echo "configure:2928: checking for $compiler option to produce PIC" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2853,2857 **** lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; ! beos* | irix5* | irix6* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; --- 2956,2960 ---- lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ;; ! beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; *************** *** 2896,2900 **** ;; ! irix5* | irix6*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' --- 2999,3003 ---- ;; ! irix5* | irix6* | nonstopux*) lt_cv_prog_cc_wl='-Wl,' lt_cv_prog_cc_static='-non_shared' *************** *** 2940,2948 **** lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ! if test "x$host_vendor" = xsni; then ! lt_cv_prog_cc_wl='-LD' ! else ! lt_cv_prog_cc_wl='-Wl,' ! fi ;; --- 3043,3047 ---- lt_cv_prog_cc_pic='-KPIC' lt_cv_prog_cc_static='-Bstatic' ! lt_cv_prog_cc_wl='-Wl,' ;; *************** *** 2974,2978 **** # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 ! echo "configure:2977: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3073,3077 ---- # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6 ! echo "configure:3076: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 2981,2985 **** CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* case $host_os in --- 3087,3091 ---- ; return 0; } EOF ! if { (eval echo configure:3090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* case $host_os in *************** *** 3040,3044 **** echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 ! echo "configure:3043: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3139,3143 ---- echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6 ! echo "configure:3142: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 3048,3052 **** LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_prog_cc_static_works=yes --- 3154,3158 ---- ; return 0; } EOF ! if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_prog_cc_static_works=yes *************** *** 3082,3086 **** # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 ! echo "configure:3085: checking if $compiler supports -c -o file.$ac_objext" >&5 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3181,3185 ---- # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6 ! echo "configure:3184: checking if $compiler supports -c -o file.$ac_objext" >&5 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 3101,3105 **** CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no ! if { (eval echo configure:3104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings --- 3200,3204 ---- CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no ! if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings *************** *** 3130,3134 **** # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 ! echo "configure:3133: checking if $compiler supports -c -o file.lo" >&5 if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 3229,3233 ---- # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6 ! echo "configure:3232: checking if $compiler supports -c -o file.lo" >&5 if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 3141,3145 **** ac_objext=lo cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized --- 3247,3251 ---- ; return 0; } EOF ! if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized *************** *** 3179,3183 **** # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 ! echo "configure:3182: checking if we can lock with hard links" >&5 hard_links=yes $rm conftest* --- 3278,3282 ---- # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6 ! echo "configure:3281: checking if we can lock with hard links" >&5 hard_links=yes $rm conftest* *************** *** 3198,3202 **** # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 ! echo "configure:3201: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" --- 3297,3301 ---- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6 ! echo "configure:3300: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo "int some_variable = 0;" > conftest.$ac_ext save_CFLAGS="$CFLAGS" *************** *** 3204,3208 **** compiler_rtti_exceptions=no cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized --- 3310,3314 ---- ; return 0; } EOF ! if { (eval echo configure:3313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # The compiler can only warn and ignore the option if not recognized *************** *** 3238,3242 **** # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 ! echo "configure:3241: checking whether the linker ($LD) supports shared libraries" >&5 allow_undefined_flag= --- 3337,3341 ---- # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6 ! echo "configure:3340: checking whether the linker ($LD) supports shared libraries" >&5 allow_undefined_flag= *************** *** 3376,3380 **** if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < [$]0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else --- 3475,3479 ---- if test "x$lt_cv_need_dllmain" = "xyes"; then ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " ! ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' else *************** *** 3394,3398 **** # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! ! archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else --- 3493,3497 ---- # is EXPORTS), use it as is. # If DATA tags from a recent dlltool are present, honour them! ! archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname-def; else *************** *** 3403,3406 **** --- 3502,3506 ---- case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; + 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;; esac; *************** *** 3515,3522 **** case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do ! if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break ! fi done esac --- 3615,3624 ---- case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do ! case $ld_flag in ! *-brtl*) aix_use_runtimelinking=yes break ! ;; ! esac done esac *************** *** 3632,3637 **** # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. ! archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' --- 3734,3740 ---- # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not ! # yet detect zsh echo's removal of \ escapes. Also zsh mangles ! # `"' quotes if we put them in here... so don't! ! archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' # We need to add '_' to the symbols in $export_symbols first #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' *************** *** 3685,3695 **** ;; ! irix5* | irix6*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes --- 3788,3799 ---- ;; ! irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: link_all_deplibs=yes *************** *** 3719,3723 **** hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' --- 3823,3827 ---- hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' *************** *** 3729,3733 **** ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; --- 3833,3837 ---- ;; *) ! archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; *************** *** 3782,3786 **** --- 3886,3918 ---- solaris*) + # gcc --version < 3.0 without binutils cannot create self contained + # shared libraries reliably, requiring libgcc.a to resolve some of + # the object symbols generated in some cases. Libraries that use + # assert need libgcc.a to resolve __eprintf, for example. Linking + # a copy of libgcc.a into every shared library to guarantee resolving + # such symbols causes other problems: According to Tim Van Holder + # , C++ libraries end up with a separate + # (to the application) exception stack for one thing. no_undefined_flag=' -z defs' + if test "$GCC" = yes; then + case `$CC --version 2>/dev/null` in + [12].*) + cat <&2 + + *** Warning: Releases of GCC earlier than version 3.0 cannot reliably + *** create self contained shared libraries on Solaris systems, without + *** introducing a dependency on libgcc.a. Therefore, libtool is disabling + *** -no-undefined support, which will at least allow you to build shared + *** libraries. However, you may find that when you link such libraries + *** into an application without using GCC, you have to manually add + *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to + *** upgrade to a newer version of GCC. Another option is to rebuild your + *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. + + EOF + no_undefined_flag= + ;; + esac + fi # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now *************** *** 3813,3823 **** sysv4) ! if test "x$host_vendor" = xsno; then ! archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes # is this really true??? ! else ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=no #Motorola manual says yes, but my tests say they lie ! fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no --- 3945,3965 ---- sysv4) ! case $host_vendor in ! sni) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=yes # is this really true??? ! ;; ! siemens) ! ## LD is ld it makes a PLAMLIB ! ## CC just makes a GrossModule. ! archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' ! reload_cmds='$CC -r -o $output$reload_objs' ! hardcode_direct=no ! ;; ! motorola) ! archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ! hardcode_direct=no #Motorola manual says yes, but my tests say they lie ! ;; ! esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no *************** *** 3894,3898 **** # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 ! echo "configure:3897: checking how to hardcode library paths into programs" >&5 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ --- 4036,4040 ---- # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6 ! echo "configure:4039: checking how to hardcode library paths into programs" >&5 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ *************** *** 3922,3926 **** old_striplib= echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 ! echo "configure:3925: checking whether stripping libraries is possible" >&5 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" --- 4064,4068 ---- old_striplib= echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6 ! echo "configure:4067: checking whether stripping libraries is possible" >&5 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" *************** *** 3936,3940 **** # PORTME Fill in your ld.so characteristics echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 ! echo "configure:3939: checking dynamic linker characteristics" >&5 library_names_spec= libname_spec='lib$name' --- 4078,4082 ---- # PORTME Fill in your ld.so characteristics echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6 ! echo "configure:4081: checking dynamic linker characteristics" >&5 library_names_spec= libname_spec='lib$name' *************** *** 3963,3966 **** --- 4105,4111 ---- aix4* | aix5*) version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 *************** *** 3974,3986 **** # development snapshots of GCC prior to 3.0. case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; esac # AIX (on Power*) has no versioning support, so currently we can --- 4119,4131 ---- # development snapshots of GCC prior to 3.0. case $host_os in ! aix4 | aix4.[01] | aix4.[01].*) ! if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' ! echo ' yes ' ! echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then ! : ! else ! can_build_shared=no ! fi ! ;; esac # AIX (on Power*) has no versioning support, so currently we can *************** *** 4001,4004 **** --- 4146,4150 ---- shlibpath_var=LIBPATH fi + hardcode_into_libs=yes ;; *************** *** 4048,4052 **** yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` ;; yes,pw32*) --- 4194,4198 ---- yes,mingw*) library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' ! sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` ;; yes,pw32*) *************** *** 4131,4136 **** ;; ! irix5* | irix6*) ! version_type=irix need_lib_prefix=no need_version=no --- 4277,4285 ---- ;; ! irix5* | irix6* | nonstopux*) ! case $host_os in ! nonstopux*) version_type=nonstopux ;; ! *) version_type=irix ;; ! esac need_lib_prefix=no need_version=no *************** *** 4138,4142 **** library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in ! irix5*) libsuff= shlibsuff= ;; --- 4287,4291 ---- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' case $host_os in ! irix5* | nonstopux*) libsuff= shlibsuff= ;; *************** *** 4242,4250 **** version_type=osf need_version=no ! soname_spec='${libname}${release}.so' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; --- 4391,4400 ---- version_type=osf need_version=no ! soname_spec='${libname}${release}.so$major' ! library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + hardcode_into_libs=yes ;; *************** *** 4289,4292 **** --- 4439,4448 ---- sni) shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no ;; motorola) *************** *** 4333,4341 **** # Report the final consequences. echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 ! echo "configure:4336: checking if libtool supports shared libraries" >&5 echo "$ac_t""$can_build_shared" 1>&6 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 ! echo "configure:4340: checking whether to build shared libraries" >&5 test "$can_build_shared" = "no" && enable_shared=no --- 4489,4497 ---- # Report the final consequences. echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6 ! echo "configure:4492: checking if libtool supports shared libraries" >&5 echo "$ac_t""$can_build_shared" 1>&6 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6 ! echo "configure:4496: checking whether to build shared libraries" >&5 test "$can_build_shared" = "no" && enable_shared=no *************** *** 4360,4364 **** echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 ! echo "configure:4363: checking whether to build static libraries" >&5 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes --- 4516,4520 ---- echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6 ! echo "configure:4519: checking whether to build static libraries" >&5 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes *************** *** 4401,4410 **** *) echo $ac_n "checking for shl_load""... $ac_c" 1>&6 ! echo "configure:4404: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:4560: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" --- 4585,4589 ---- ; return 0; } EOF ! if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" *************** *** 4447,4451 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 ! echo "configure:4450: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4603,4607 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 ! echo "configure:4606: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4455,4459 **** LIBS="-ldld $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4622,4626 ---- ; return 0; } EOF ! if { (eval echo configure:4625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4485,4494 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 ! echo "configure:4488: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 ! echo "configure:4644: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" --- 4669,4673 ---- ; return 0; } EOF ! if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" *************** *** 4531,4535 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:4534: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4687,4691 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 ! echo "configure:4690: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4539,4543 **** LIBS="-ldl $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4706,4710 ---- ; return 0; } EOF ! if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4569,4573 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 ! echo "configure:4572: checking for dlopen in -lsvld" >&5 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4725,4729 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6 ! echo "configure:4728: checking for dlopen in -lsvld" >&5 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4577,4581 **** LIBS="-lsvld $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4744,4748 ---- ; return 0; } EOF ! if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4607,4611 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 ! echo "configure:4610: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 4763,4767 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 ! echo "configure:4766: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 4615,4619 **** LIBS="-ldld $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 4782,4786 ---- ; return 0; } EOF ! if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 4682,4686 **** echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 ! echo "configure:4685: checking whether a program can dlopen itself" >&5 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4838,4842 ---- echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 ! echo "configure:4841: checking whether a program can dlopen itself" >&5 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4692,4696 **** lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? --- 4909,4913 ---- } EOF ! if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? *************** *** 4776,4780 **** LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 ! echo "configure:4779: checking whether a statically linked program can dlopen itself" >&5 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 4932,4936 ---- LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 ! echo "configure:4935: checking whether a statically linked program can dlopen itself" >&5 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4786,4790 **** lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? --- 5003,5007 ---- } EOF ! if { (eval echo configure:5006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? *************** *** 4896,4900 **** # to ld, don't add -lc before -lgcc. echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 ! echo "configure:4899: checking whether -lc should be explicitly linked in" >&5 if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 5052,5056 ---- # to ld, don't add -lc before -lgcc. echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6 ! echo "configure:5055: checking whether -lc should be explicitly linked in" >&5 if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 4903,4907 **** echo 'static int dummy;' > conftest.$ac_ext ! if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then soname=conftest lib=conftest --- 5059,5063 ---- echo 'static int dummy;' > conftest.$ac_ext ! if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then soname=conftest lib=conftest *************** *** 4916,4920 **** save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= ! if { (eval echo configure:4919: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } then lt_cv_archive_cmds_need_lc=no --- 5072,5076 ---- save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= ! if { (eval echo configure:5075: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; } then lt_cv_archive_cmds_need_lc=no *************** *** 4956,4960 **** # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ --- 5112,5116 ---- # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. ! for var in echo old_CC old_CFLAGS SED \ AR AR_FLAGS CC LD LN_S NM SHELL \ reload_flag reload_cmds wl \ *************** *** 5018,5023 **** # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout --- 5174,5182 ---- # the same distribution terms that you use for the rest of that program. + # A sed that does not truncate output. + SED=$lt_SED + # Sed that helps us avoid accidentally triggering echo(1) options like -n. ! Xsed="${SED} -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout *************** *** 5503,5507 **** if test x"$ac_cv_prog_gcc" = xyes; then echo $ac_n "checking for PPC gcc bug""... $ac_c" 1>&6 ! echo "configure:5506: checking for PPC gcc bug" >&5 if test "$cross_compiling" = yes; then --- 5662,5666 ---- if test x"$ac_cv_prog_gcc" = xyes; then echo $ac_n "checking for PPC gcc bug""... $ac_c" 1>&6 ! echo "configure:5665: checking for PPC gcc bug" >&5 if test "$cross_compiling" = yes; then *************** *** 5509,5513 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_ppc_gcc_bug=no --- 5680,5684 ---- EOF ! if { (eval echo configure:5683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_ppc_gcc_bug=no *************** *** 5545,5554 **** echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:5548: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5704,5713 ---- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:5707: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5558,5562 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 5717,5721 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:5720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 5575,5579 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < --- 5734,5738 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 5593,5597 **** # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < --- 5752,5756 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < *************** *** 5614,5618 **** else cat > conftest.$ac_ext < --- 5773,5777 ---- else cat > conftest.$ac_ext < *************** *** 5625,5629 **** EOF ! if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : --- 5784,5788 ---- EOF ! if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : *************** *** 5649,5658 **** echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:5652: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 5808,5817 ---- echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:5811: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 5682,5691 **** echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:5685: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:5844: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes --- 5895,5899 ---- ; return 0; } EOF ! if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes *************** *** 5757,5761 **** echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:5760: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 5916,5920 ---- echo $ac_n "checking for inline""... $ac_c" 1>&6 ! echo "configure:5919: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 5764,5768 **** for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break --- 5930,5934 ---- ; return 0; } EOF ! if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break *************** *** 5798,5802 **** echo $ac_n "checking for extern inline""... $ac_c" 1>&6 ! echo "configure:5801: checking for extern inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_extern_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 5957,5961 ---- echo $ac_n "checking for extern inline""... $ac_c" 1>&6 ! echo "configure:5960: checking for extern inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_extern_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 5804,5808 **** ac_cv_c_extern_inline=no cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_extern_inline="yes" --- 5972,5976 ---- ; return 0; } EOF ! if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_extern_inline="yes" *************** *** 5841,5850 **** if test "x$LIBS" != "x" ; then echo $ac_n "checking for math library""... $ac_c" 1>&6 ! echo "configure:5844: checking for math library" >&5 echo "$ac_t""$LIBS" 1>&6 else echo $ac_n "checking for library containing cos""... $ac_c" 1>&6 ! echo "configure:5849: checking for library containing cos" >&5 if eval "test \"`echo '$''{'ac_cv_search_cos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 6000,6009 ---- if test "x$LIBS" != "x" ; then echo $ac_n "checking for math library""... $ac_c" 1>&6 ! echo "configure:6003: checking for math library" >&5 echo "$ac_t""$LIBS" 1>&6 else echo $ac_n "checking for library containing cos""... $ac_c" 1>&6 ! echo "configure:6008: checking for library containing cos" >&5 if eval "test \"`echo '$''{'ac_cv_search_cos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 5853,5857 **** ac_cv_search_cos="no" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_cos="none required" --- 6023,6027 ---- ; return 0; } EOF ! if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_cos="none required" *************** *** 5875,5879 **** LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_cos="-l$i" --- 6045,6049 ---- ; return 0; } EOF ! if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_cos="-l$i" *************** *** 5908,5920 **** fi ! for ac_func in hypot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5914: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in hypot ! do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6088: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! /* Override any gcc2 internal prototype to avoid an error. */ ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! ! int main() { ! ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! $ac_func(); ! #endif ! ! ; return 0; } ! EOF ! if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" ! fi ! rm -f conftest* ! fi ! ! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 ! fi ! done ! ! fi ! rm -f conftest* ! ! cat > conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in expm1 ! do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6161: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! /* Override any gcc2 internal prototype to avoid an error. */ ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! ! int main() { ! ! /* The GNU C library defines this for functions which it implements ! to always fail with ENOSYS. Some functions are actually named ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ! choke me ! #else ! $ac_func(); ! #endif ! ! ; return 0; } ! EOF ! if { (eval echo configure:6189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_func_$ac_func=no" ! fi ! rm -f conftest* ! fi ! ! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! cat >> confdefs.h <&6 ! fi ! done ! ! fi ! rm -f conftest* ! ! cat > conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in acosh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6234: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6259,6263 ---- ; return 0; } EOF ! if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 5963,5975 **** done ! for ac_func in expm1 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:5969: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in asinh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6307: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6332,6336 ---- ; return 0; } EOF ! if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6018,6030 **** done ! for ac_func in acosh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6024: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in atanh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6380: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6405,6409 ---- ; return 0; } EOF ! if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6073,6085 **** done ! for ac_func in asinh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6079: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in ldexp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6453: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6478,6482 ---- ; return 0; } EOF ! if { (eval echo configure:6481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6128,6140 **** done ! for ac_func in atanh do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6134: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! for ac_func in frexp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6526: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6551,6555 ---- ; return 0; } EOF ! if { (eval echo configure:6554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6183,6196 **** done ! for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6190: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! for ac_func in isinf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6600: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6625,6629 ---- ; return 0; } EOF ! if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6237,6243 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for isinf with ""... $ac_c" 1>&6 ! echo "configure:6240: checking for isinf with " >&5 ! cat > conftest.$ac_ext < --- 6647,6653 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for isinf with ""... $ac_c" 1>&6 ! echo "configure:6650: checking for isinf with " >&5 ! cat > conftest.$ac_ext < *************** *** 6246,6254 **** ; return 0; } EOF ! if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISINF 1 EOF --- 6656,6664 ---- ; return 0; } EOF ! if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISINF 1 EOF *************** *** 6264,6277 **** done ! for ac_func in finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6271: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! for ac_func in finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6699: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6724,6728 ---- ; return 0; } EOF ! if { (eval echo configure:6727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6318,6324 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for finite with ""... $ac_c" 1>&6 ! echo "configure:6321: checking for finite with " >&5 ! cat > conftest.$ac_ext < --- 6746,6752 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for finite with ""... $ac_c" 1>&6 ! echo "configure:6749: checking for finite with " >&5 ! cat > conftest.$ac_ext < *************** *** 6327,6339 **** ; return 0; } EOF ! if { (eval echo configure:6330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_FINITE 1 EOF ! ac_cv_func_finite=yes else echo "configure: failed program was:" >&5 --- 6755,6767 ---- ; return 0; } EOF ! if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_FINITE 1 EOF ! ac_cv_func_finite=yes else echo "configure: failed program was:" >&5 *************** *** 6346,6360 **** done if test "x${ac_cv_func_finite}" != "xyes" ; then ! for ac_func in isfinite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6354: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! for ac_func in isfinite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6800: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6825,6829 ---- ; return 0; } EOF ! if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6401,6407 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for isfinite with ""... $ac_c" 1>&6 ! echo "configure:6404: checking for isfinite with " >&5 ! cat > conftest.$ac_ext < --- 6847,6853 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for isfinite with ""... $ac_c" 1>&6 ! echo "configure:6850: checking for isfinite with " >&5 ! cat > conftest.$ac_ext < *************** *** 6410,6418 **** ; return 0; } EOF ! if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISFINITE 1 EOF --- 6856,6864 ---- ; return 0; } EOF ! if { (eval echo configure:6859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISFINITE 1 EOF *************** *** 6429,6442 **** fi ! for ac_func in isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6436: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! for ac_func in isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6900: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 6925,6929 ---- ; return 0; } EOF ! if { (eval echo configure:6928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6483,6489 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for isnan with ""... $ac_c" 1>&6 ! echo "configure:6486: checking for isnan with " >&5 ! cat > conftest.$ac_ext < --- 6947,6953 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for isnan with ""... $ac_c" 1>&6 ! echo "configure:6950: checking for isnan with " >&5 ! cat > conftest.$ac_ext < *************** *** 6492,6500 **** ; return 0; } EOF ! if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISNAN 1 EOF --- 6956,6964 ---- ; return 0; } EOF ! if { (eval echo configure:6959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ! echo "$ac_t""yes" 1>&6 ! cat >> confdefs.h <<\EOF #define HAVE_ISNAN 1 EOF *************** *** 6510,6513 **** --- 6974,6979 ---- done + fi + rm -f conftest* case "$host" in *************** *** 6516,6528 **** ;; *) ! for ac_func in log1p do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6522: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < conftest.$ac_ext < ! int main() { ! {} ! ; return 0; } ! EOF ! if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! : ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! for ac_func in log1p do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:7004: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 7029,7033 ---- ; return 0; } EOF ! if { (eval echo configure:7032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6571,6574 **** --- 7053,7058 ---- done + fi + rm -f conftest* ;; esac *************** *** 6576,6585 **** echo $ac_n "checking for vprintf""... $ac_c" 1>&6 ! echo "configure:6579: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7063: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" --- 7088,7092 ---- ; return 0; } EOF ! if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" *************** *** 6628,6637 **** if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 ! echo "configure:6631: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7115: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" --- 7140,7144 ---- ; return 0; } EOF ! if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" *************** *** 6684,6693 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6687: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 7196,7200 ---- ; return 0; } EOF ! if { (eval echo configure:7199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6743,6752 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:6746: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7230: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 7255,7259 ---- ; return 0; } EOF ! if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 6797,6806 **** echo $ac_n "checking for CLOCKS_PER_SEC""... $ac_c" 1>&6 ! echo "configure:6800: checking for CLOCKS_PER_SEC" >&5 if eval "test \"`echo '$''{'ac_cv_decl_clocks_per_sec'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7284: checking for CLOCKS_PER_SEC" >&5 if eval "test \"`echo '$''{'ac_cv_decl_clocks_per_sec'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6836: checking whether CLOCKS_PER_SEC is known for $host_os" >&5 case "$host" in *-*-sunos4.*) --- 7317,7321 ---- else echo $ac_n "checking whether CLOCKS_PER_SEC is known for $host_os""... $ac_c" 1>&6 ! echo "configure:7320: checking whether CLOCKS_PER_SEC is known for $host_os" >&5 case "$host" in *-*-sunos4.*) *************** *** 6860,6869 **** echo $ac_n "checking for EXIT_SUCCESS and EXIT_FAILURE""... $ac_c" 1>&6 ! echo "configure:6863: checking for EXIT_SUCCESS and EXIT_FAILURE" >&5 if eval "test \"`echo '$''{'ac_cv_decl_exit_success_and_failure'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:7347: checking for EXIT_SUCCESS and EXIT_FAILURE" >&5 if eval "test \"`echo '$''{'ac_cv_decl_exit_success_and_failure'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:6901: checking for IEEE arithmetic interface type" >&5 case "$host" in sparc-*-linux*) --- 7382,7386 ---- echo $ac_n "checking for IEEE arithmetic interface type""... $ac_c" 1>&6 ! echo "configure:7385: checking for IEEE arithmetic interface type" >&5 case "$host" in sparc-*-linux*) *************** *** 7023,7027 **** echo $ac_n "checking for cpu with extended floating point registers""... $ac_c" 1>&6 ! echo "configure:7026: checking for cpu with extended floating point registers" >&5 case "$host" in *sparc*-*-*) --- 7507,7511 ---- echo $ac_n "checking for cpu with extended floating point registers""... $ac_c" 1>&6 ! echo "configure:7510: checking for cpu with extended floating point registers" >&5 case "$host" in *sparc*-*-*) *************** *** 7070,7076 **** if test "x$need_fp_rnd_rn" = xyes; then echo $ac_n "checking for FP_RND_RN in ""... $ac_c" 1>&6 ! echo "configure:7073: checking for FP_RND_RN in " >&5 cat > conftest.$ac_ext < --- 7554,7560 ---- if test "x$need_fp_rnd_rn" = xyes; then echo $ac_n "checking for FP_RND_RN in ""... $ac_c" 1>&6 ! echo "configure:7557: checking for FP_RND_RN in " >&5 cat > conftest.$ac_ext < *************** *** 7079,7083 **** ; return 0; } EOF ! if { (eval echo configure:7082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result=yes --- 7563,7567 ---- ; return 0; } EOF ! if { (eval echo configure:7566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* result=yes *************** *** 7092,7098 **** if test "$result" = no; then echo $ac_n "checking for FP_RND_RN in /usr/include/float.h""... $ac_c" 1>&6 ! echo "configure:7095: checking for FP_RND_RN in /usr/include/float.h" >&5 cat > conftest.$ac_ext <&6 ! echo "configure:7579: checking for FP_RND_RN in /usr/include/float.h" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 --- 7585,7589 ---- ; return 0; } EOF ! if { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 *************** *** 7120,7124 **** echo $ac_n "checking for rounding-control compiler flags""... $ac_c" 1>&6 ! echo "configure:7123: checking for rounding-control compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in --- 7604,7608 ---- echo $ac_n "checking for rounding-control compiler flags""... $ac_c" 1>&6 ! echo "configure:7607: checking for rounding-control compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in *************** *** 7137,7141 **** # cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* --- 7628,7632 ---- ; return 0; } EOF ! if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* *************** *** 7176,7180 **** echo $ac_n "checking for IEEE-conformance compiler flags""... $ac_c" 1>&6 ! echo "configure:7179: checking for IEEE-conformance compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in --- 7660,7664 ---- echo $ac_n "checking for IEEE-conformance compiler flags""... $ac_c" 1>&6 ! echo "configure:7663: checking for IEEE-conformance compiler flags" >&5 save_cflags="$CFLAGS" case "$host" in *************** *** 7193,7197 **** # cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* --- 7684,7688 ---- ; return 0; } EOF ! if { (eval echo configure:7687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* *************** *** 7229,7238 **** echo $ac_n "checking whether printf/scanf works with long double""... $ac_c" 1>&6 ! echo "configure:7232: checking whether printf/scanf works with long double" >&5 if test "$cross_compiling" = yes; then ac_cv_func_printf_longdouble=no else cat > conftest.$ac_ext <&6 ! echo "configure:7716: checking whether printf/scanf works with long double" >&5 if test "$cross_compiling" = yes; then ac_cv_func_printf_longdouble=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_printf_longdouble=yes --- 7731,7735 ---- } EOF ! if { (eval echo configure:7734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_printf_longdouble=yes *************** *** 7272,7276 **** echo $ac_n "checking working IEEE comparisons""... $ac_c" 1>&6 ! echo "configure:7275: checking working IEEE comparisons" >&5 if eval "test \"`echo '$''{'ac_cv_c_ieee_comparisons'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 7756,7760 ---- echo $ac_n "checking working IEEE comparisons""... $ac_c" 1>&6 ! echo "configure:7759: checking working IEEE comparisons" >&5 if eval "test \"`echo '$''{'ac_cv_c_ieee_comparisons'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 7280,7284 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_ieee_comparisons="yes" --- 7777,7781 ---- } EOF ! if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_ieee_comparisons="yes" *************** *** 7319,7323 **** echo $ac_n "checking for IEEE denormalized values""... $ac_c" 1>&6 ! echo "configure:7322: checking for IEEE denormalized values" >&5 if eval "test \"`echo '$''{'ac_cv_c_ieee_denormals'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 7803,7807 ---- echo $ac_n "checking for IEEE denormalized values""... $ac_c" 1>&6 ! echo "configure:7806: checking for IEEE denormalized values" >&5 if eval "test \"`echo '$''{'ac_cv_c_ieee_denormals'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 7327,7331 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_ieee_denormals="yes" --- 7825,7829 ---- } EOF ! if { (eval echo configure:7828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_ieee_denormals="yes" *************** *** 7770,7775 **** *** *** A compatibility script 'os2makefiles.pl' is available from Henry ! *** Sobotka. You will need to download this script separately. See ! *** http://sources.redhat.com/gsl/ for a link to it. *** *** Run os2makefiles.pl to create OS/2 Makefiles --- 8254,8259 ---- *** *** A compatibility script 'os2makefiles.pl' is available from Henry ! *** Sobotka. You will need to download this script separately from, ! *** http://www.elzahir.org/download/scripts/os2makefiles.pl.gz *** *** Run os2makefiles.pl to create OS/2 Makefiles diff -x *.info* -rc2P gsl-1.2/configure.in gsl-1.3/configure.in *** gsl-1.2/configure.in Fri Jul 19 20:38:09 2002 --- gsl-1.3/configure.in Mon Dec 16 19:41:01 2002 *************** *** 2,6 **** AC_INIT(gsl_math.h) ! AM_INIT_AUTOMAKE(gsl,"1.2") AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE --- 2,6 ---- AC_INIT(gsl_math.h) ! AM_INIT_AUTOMAKE(gsl,"1.3") AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE *************** *** 13,18 **** dnl gsl-1.1.1 libgsl 2:0:2 libgslcblas 0:0:0 dnl gsl-1.2 libgsl 3:0:3 libgslcblas 0:0:0 ! GSL_LT_VERSION="3:0:3" AC_SUBST(GSL_LT_VERSION) GSL_LT_CBLAS_VERSION="0:0:0" --- 13,19 ---- dnl gsl-1.1.1 libgsl 2:0:2 libgslcblas 0:0:0 dnl gsl-1.2 libgsl 3:0:3 libgslcblas 0:0:0 + dnl gsl-1.3 libgsl 4:0:4 libgslcblas 0:0:0 ! GSL_LT_VERSION="4:0:4" AC_SUBST(GSL_LT_VERSION) GSL_LT_CBLAS_VERSION="0:0:0" *************** *** 116,155 **** fi ! AC_CHECK_FUNCS(hypot) ! AC_CHECK_FUNCS(expm1) ! AC_CHECK_FUNCS(acosh) ! AC_CHECK_FUNCS(asinh) ! AC_CHECK_FUNCS(atanh) ! ! AC_CHECK_FUNCS(isinf, ,[ ! AC_MSG_CHECKING([for isinf with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isinf(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISINF)], ! AC_MSG_RESULT(no))]) ! ! AC_CHECK_FUNCS(finite, ,[ ! AC_MSG_CHECKING([for finite with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; finite(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_FINITE) ! ac_cv_func_finite=yes], ! AC_MSG_RESULT(no))]) if test "x${ac_cv_func_finite}" != "xyes" ; then ! AC_CHECK_FUNCS(isfinite, ,[ ! AC_MSG_CHECKING([for isfinite with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isfinite(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISFINITE)], ! AC_MSG_RESULT(no))]) fi ! AC_CHECK_FUNCS(isnan, ,[ ! AC_MSG_CHECKING([for isnan with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isnan(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISNAN)], ! AC_MSG_RESULT(no))]) dnl OpenBSD has a broken implementation of log1p. --- 117,179 ---- fi ! AC_TRY_COMPILE([#define hypot /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(hypot)) ! ! AC_TRY_COMPILE([#define expm1 /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(expm1)) ! ! AC_TRY_COMPILE([#define acosh /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(acosh)) ! ! AC_TRY_COMPILE([#define asinh /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(asinh)) ! ! AC_TRY_COMPILE([#define atanh /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(atanh)) ! ! AC_TRY_COMPILE([#define ldexp /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(ldexp)) ! ! AC_TRY_COMPILE([#define frexp /* */ ! #include ],[{}],[],AC_CHECK_FUNCS(frexp)) ! ! AC_TRY_COMPILE([#define isinf /* */ ! #include ],[{}],[],[ ! AC_CHECK_FUNCS(isinf, ,[ ! AC_MSG_CHECKING([for isinf with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isinf(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISINF)], ! AC_MSG_RESULT(no))])]) ! ! AC_TRY_COMPILE([#define finite /* */ ! #include ],[{}],[],[ ! AC_CHECK_FUNCS(finite, ,[ ! AC_MSG_CHECKING([for finite with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; finite(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_FINITE) ! ac_cv_func_finite=yes], ! AC_MSG_RESULT(no))])]) if test "x${ac_cv_func_finite}" != "xyes" ; then ! AC_TRY_COMPILE([#define isfinite /* */ ! #include ],[{}],[],[ ! AC_CHECK_FUNCS(isfinite, ,[ ! AC_MSG_CHECKING([for isfinite with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isfinite(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISFINITE)], ! AC_MSG_RESULT(no))])]) fi ! AC_TRY_COMPILE([#define isnan /* */ ! #include ],[{}],[],[ ! AC_CHECK_FUNCS(isnan, ,[ ! AC_MSG_CHECKING([for isnan with ]) ! AC_TRY_LINK([#include ], [float f = 0.0; isnan(f)],[ ! AC_MSG_RESULT(yes) ! AC_DEFINE(HAVE_ISNAN)], ! AC_MSG_RESULT(no))])]) dnl OpenBSD has a broken implementation of log1p. *************** *** 159,163 **** ;; *) ! AC_CHECK_FUNCS(log1p) ;; esac --- 183,189 ---- ;; *) ! AC_TRY_COMPILE([#define log1p /* */ ! #include ],[{}],[],[ ! AC_CHECK_FUNCS(log1p)]) ;; esac *************** *** 532,537 **** *** *** A compatibility script 'os2makefiles.pl' is available from Henry ! *** Sobotka. You will need to download this script separately. See ! *** http://sources.redhat.com/gsl/ for a link to it. *** *** Run os2makefiles.pl to create OS/2 Makefiles --- 558,563 ---- *** *** A compatibility script 'os2makefiles.pl' is available from Henry ! *** Sobotka. You will need to download this script separately from, ! *** http://www.elzahir.org/download/scripts/os2makefiles.pl.gz *** *** Run os2makefiles.pl to create OS/2 Makefiles diff -x *.info* -rc2P gsl-1.2/doc/blas.texi gsl-1.3/doc/blas.texi *** gsl-1.2/doc/blas.texi Fri Oct 26 09:44:55 2001 --- gsl-1.3/doc/blas.texi Sat Aug 17 14:56:44 2002 *************** *** 324,329 **** @deftypefunx int gsl_blas_ztrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{x}) @cindex TRMV, Level-2 BLAS ! These functions compute the matrix-vector product and sum ! @math{y =\alpha op(A) x + \beta y} for the triangular matrix @var{A}, where @math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = @code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When --- 324,329 ---- @deftypefunx int gsl_blas_ztrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{x}) @cindex TRMV, Level-2 BLAS ! These functions compute the matrix-vector product ! @math{x =\alpha op(A) x} for the triangular matrix @var{A}, where @math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} = @code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When diff -x *.info* -rc2P gsl-1.2/doc/bugs.texi gsl-1.3/doc/bugs.texi *** gsl-1.2/doc/bugs.texi Sun Jul 14 11:47:50 2002 --- gsl-1.3/doc/bugs.texi Sat Oct 5 19:41:27 2002 *************** *** 4,9 **** the @file{INSTALL} file. ! If you find a bug which is not listed in these files please report it ! to the mailing list @email{gsl-discuss@@sources.redhat.com}. All bug reports should include: --- 4,9 ---- the @file{INSTALL} file. ! If you find a bug which is not listed in these files please report it to ! @email{bug-gsl@@gnu.org}. All bug reports should include: *************** *** 22,24 **** --- 22,27 ---- @end itemize @noindent + It is also useful if you can report whether the same problem occurs + when the library is compiled without optimization. + Thank you. diff -x *.info* -rc2P gsl-1.2/doc/err.texi gsl-1.3/doc/err.texi *** gsl-1.2/doc/err.texi Mon Jun 10 11:09:34 2002 --- gsl-1.3/doc/err.texi Wed Dec 11 14:10:30 2002 *************** *** 47,57 **** not considered serious. ! In addition to reporting errors the library also has an error handler ! function. The error handler is called by library functions when they ! report an error, just before they return to the caller. The purpose of ! the handler is to provide a function where a breakpoint can be set that ! will catch library errors when running under the debugger. It is not ! intended for use in production programs, which should handle any errors ! using the return codes. @node Error Codes --- 47,66 ---- not considered serious. ! In addition to reporting errors by return codes the library also has an ! error handler function @code{gsl_error}. This function is called by ! other library functions when they report an error, just before they ! return to the caller. The default behavior of the error handler is to ! print a message and abort the program, ! ! @example ! gsl: file.c:67: ERROR: invalid argument supplied by user ! Default GSL error handler invoked. ! Aborted ! @end example ! ! The purpose of the @code{gsl_error} handler is to provide a function ! where a breakpoint can be set that will catch library errors when ! running under the debugger. It is not intended for use in production ! programs, which should handle any errors using the return codes. @node Error Codes *************** *** 110,114 **** The default behavior of the GSL error handler is to print a short ! message and call @code{abort()}. When the default is in use programs will stop with a core-dump whenever a library routine reports an error. This is intended as a fail-safe default for programs which do not check --- 119,123 ---- The default behavior of the GSL error handler is to print a short ! message and call @code{abort()}. When this default is in use programs will stop with a core-dump whenever a library routine reports an error. This is intended as a fail-safe default for programs which do not check diff -x *.info* -rc2P gsl-1.2/doc/fft.texi gsl-1.3/doc/fft.texi *** gsl-1.2/doc/fft.texi Fri Oct 26 09:44:55 2001 --- gsl-1.3/doc/fft.texi Sun Dec 15 13:20:56 2002 *************** *** 801,805 **** The next table shows the output for an even-length sequence, @math{n=5} ! In the even case both the there are two values which are purely real, @example --- 801,805 ---- The next table shows the output for an even-length sequence, @math{n=5} ! In the even case there are two values which are purely real, @example diff -x *.info* -rc2P gsl-1.2/doc/fitting.texi gsl-1.3/doc/fitting.texi *** gsl-1.2/doc/fitting.texi Wed May 15 20:02:53 2002 --- gsl-1.3/doc/fitting.texi Sun Dec 15 13:13:39 2002 *************** *** 372,376 **** @noindent where the column of ones corresponds to the constant term @math{c_0}. ! The two remaining columns corresponds to the terms @math{c_1 x} and and @math{c_2 x^2}. --- 372,376 ---- @noindent where the column of ones corresponds to the constant term @math{c_0}. ! The two remaining columns corresponds to the terms @math{c_1 x} and @math{c_2 x^2}. diff -x *.info* -rc2P gsl-1.2/doc/gsl-design.texi gsl-1.3/doc/gsl-design.texi *** gsl-1.2/doc/gsl-design.texi Sat Jan 26 17:50:10 2002 --- gsl-1.3/doc/gsl-design.texi Sat Oct 5 20:12:16 2002 *************** *** 80,85 **** @ifinfo ! This file documents the @value{GSL}, a collection of numerical routines ! for scientific computing. @end ifinfo --- 80,88 ---- @ifinfo ! This file documents the design of @value{GSL}, a collection of numerical ! routines for scientific computing. ! ! More information about GSL can be found at the project homepage, ! @url{http://www.gnu.org/software/gsl/}. @end ifinfo *************** *** 210,230 **** Wolfgang Hoschek. It is under a BSD-style license. - [JT section: written by James Theiler, and not incorporated into the - above motivation] - - And we furthermore promise to try as hard as possible to document - the software: this will ideally involve discussion of why you might want - to use it, what precisely it does, how precisely to invoke it, - how more-or-less it works, and where we learned about the algorithm, - and (unless we wrote it from scratch) where we got the code. - We do not plan to write this entire package from scratch, but to cannibalize - existing mathematical freeware, just as we expect our own software to - be cannibalized. - The long-term goal will be to provide a framework to which the real ! numerical experts (or their graduate students) will contribute. Such ! contributors will have to contribute copylefted software and they cannot ! mind that evil profit-making companies (such as those which sell ! "environments") might use this software as part of their packages. @node Design, Copying, Motivation, Top --- 213,218 ---- Wolfgang Hoschek. It is under a BSD-style license. The long-term goal will be to provide a framework to which the real ! numerical experts (or their graduate students) will contribute. @node Design, Copying, Motivation, Top *************** *** 259,264 **** --- 247,254 ---- * size_t:: * Arrays vs Pointers:: + * Pointers:: * Constness:: * Pseudo-templates:: + * Arbitrary Constants:: * Test suites:: * Compilation:: *************** *** 293,350 **** sense to prioritize and write code for the most important areas first. ! @itemize @bullet ! @item Random number generators ! Includes both random number generators and routines to give various ! interesting distributions. ! @item Statistics ! @item Special Functions ! What I (jt) envision for this section is a collection of routines for ! reliable and accurate (but not necessarily fast or efficient) estimation ! of values for special functions, explicitly using Taylor series, asymptotic ! expansions, continued fraction expansions, etc. As well as these routines, ! fast approximations will also be provided, primarily based on Chebyschev ! polynomials and ratios of polynomials. In this vision, the approximations ! will be the "standard" routines for the users, and the exact (so-called) ! routines will be used for verification of the approximations. It may also ! be useful to provide various identity-checking routines as part of the ! verification suite. ! @item Curve fitting ! polynomial, special functions, spline ! @item Ordinary differential equations ! @item Partial differential equations ! @item Fourier Analysis ! @item Wavelets ! @item Matrix operations: linear equations ! @item Matrix operations: eigenvalues and spectral analysis ! @item Matrix operations: any others? ! @item Direct integration ! @item Monte carlo methods ! @item Simulated annealing ! @item Genetic algorithms ! We need to think about what kinds of algorithms are basic generally ! useful numerical algorithms, and which ones are special purpose ! research projects. We should concentrate on supplying the former. ! @item Cellular automata ! @end itemize @node What routines are not implemented, Design of Numerical Libraries, What routines are implemented, Design --- 283,340 ---- sense to prioritize and write code for the most important areas first. ! @c @itemize @bullet ! @c @item Random number generators ! @c Includes both random number generators and routines to give various ! @c interesting distributions. ! @c @item Statistics ! @c @item Special Functions ! @c What I (jt) envision for this section is a collection of routines for ! @c reliable and accurate (but not necessarily fast or efficient) estimation ! @c of values for special functions, explicitly using Taylor series, asymptotic ! @c expansions, continued fraction expansions, etc. As well as these routines, ! @c fast approximations will also be provided, primarily based on Chebyschev ! @c polynomials and ratios of polynomials. In this vision, the approximations ! @c will be the "standard" routines for the users, and the exact (so-called) ! @c routines will be used for verification of the approximations. It may also ! @c be useful to provide various identity-checking routines as part of the ! @c verification suite. ! @c @item Curve fitting ! @c polynomial, special functions, spline ! @c @item Ordinary differential equations ! @c @item Partial differential equations ! @c @item Fourier Analysis ! @c @item Wavelets ! @c @item Matrix operations: linear equations ! @c @item Matrix operations: eigenvalues and spectral analysis ! @c @item Matrix operations: any others? ! @c @item Direct integration ! @c @item Monte carlo methods ! @c @item Simulated annealing ! @c @item Genetic algorithms ! @c We need to think about what kinds of algorithms are basic generally ! @c useful numerical algorithms, and which ones are special purpose ! @c research projects. We should concentrate on supplying the former. ! @c @item Cellular automata ! @c @end itemize @node What routines are not implemented, Design of Numerical Libraries, What routines are implemented, Design *************** *** 478,481 **** --- 468,479 ---- @end itemize + Source code should be indented according to the GNU Coding Standards, + with spaces not tabs. For example, by using the @code{indent} command: + + @example + indent -gnu -nut *.c *.h + @end example + @noindent + The @code{-nut} option converts tabs into spaces. @node Background and Preparation, Documentation, Standards and conventions, Design *************** *** 535,538 **** --- 533,574 ---- programs. These should be replaced with output from GNU plotutils. + When citing references be sure to use the standard, definitive and best + reference books in the field, rather than lesser known text-books or + introductory books which happen to be available (e.g. from undergraduate + studies). For example, references concerning algorithms should be to + Knuth, references concerning statistics should be to Kendall & Stuart, + references concerning special functions should be to Abramowitz & Stegun + (Handbook of Mathematical Functions AMS-55), etc. + + The standard references have a better chance of being available in an + accessible library for the user. If they are not available and the user + decides to buy a copy in order to look up the reference then this also + gives them the best quality book which should also cover the largest + number of other references in the GSL Manual. If many different books + were to be referenced this would be an expensive and inefficient use of + resources for a user who needs to look up the details of the algorithms. + Reference books also stay in print much longer than text books, which + are often out-of-print after a few years. + + Similarly, cite original papers wherever possible. Be sure to keep + copies of these for your own reference (e.g. when dealing with bug + reports) or to pass on to future maintainers. + + If you need help in tracking down references, ask on the + @code{gsl-discuss} mailing list. There is a group of volunteers with + access to good libraries who have offered to help GSL developers get + copies of papers. + + [JT section: written by James Theiler + + And we furthermore promise to try as hard as possible to document + the software: this will ideally involve discussion of why you might want + to use it, what precisely it does, how precisely to invoke it, + how more-or-less it works, and where we learned about the algorithm, + and (unless we wrote it from scratch) where we got the code. + We do not plan to write this entire package from scratch, but to cannibalize + existing mathematical freeware, just as we expect our own software to + be cannibalized.] + @node Namespace, Header files, Documentation, Design @section Namespace *************** *** 549,552 **** --- 585,591 ---- @code{gsl-} (with a hyphen, not an underscore). + All function names, variables, etc should be in lower case. Macros and + preprocessor variables should be in upper case. + @node Header files, Target system, Namespace, Design @section Header files *************** *** 851,857 **** All objects (blocks of memory, etc) should be measured in terms of a @code{size_t} type. Therefore any iterations (e.g. @code{for(i=0; i, 1 April 1989 ! Ty Coon, President of Vice ! @end smallexample ! ! @item Obviously: don't use or translate non-free code. *************** *** 1050,1055 **** @end itemize - @end itemize - @node Non-UNIX portability, Compatibility with other libraries, Legal issues, Design @section Non-UNIX portability --- 1200,1203 ---- *************** *** 1112,1115 **** --- 1260,1266 ---- distinguish from the number @code{1}. (This seems to be a favorite in old Fortran programs). + + Final tip: one perfect routine is better than any number of routines + containing errors. @node Copying, , Design, Top diff -x *.info* -rc2P gsl-1.2/doc/gsl-ref.texi gsl-1.3/doc/gsl-ref.texi *** gsl-1.2/doc/gsl-ref.texi Mon Jul 15 19:03:08 2002 --- gsl-1.3/doc/gsl-ref.texi Wed Dec 11 21:40:31 2002 *************** *** 156,160 **** @author Gerard Jungman ! Theoretical Fluid Dynamics Group, Los Alamos National Laboratory @comment @email{jungman@@lanl.gov} @sp 1 --- 156,160 ---- @author Gerard Jungman ! Theoretical Astrophysics Group, Los Alamos National Laboratory @comment @email{jungman@@lanl.gov} @sp 1 *************** *** 249,252 **** --- 249,254 ---- @url{http://www.gnu.org/software/gsl/}. + This manual is also available as a printed book (ISBN 095416170X). + Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License. *************** *** 495,500 **** @item Gerard Jungman ! Series acceleration, ODEs, BLAS, Linear Algebra, Eigensystems, ! Hankel Transforms. @item Mike Booth --- 497,502 ---- @item Gerard Jungman ! Special Functions, Series acceleration, ODEs, BLAS, Linear Algebra, ! Eigensystems, Hankel Transforms. @item Mike Booth diff -x *.info* -rc2P gsl-1.2/doc/gsl.3 gsl-1.3/doc/gsl.3 *** gsl-1.2/doc/gsl.3 Mon Dec 10 20:14:26 2001 --- gsl-1.3/doc/gsl.3 Sat Oct 5 19:39:51 2002 *************** *** 54,58 **** (if the library is installed). .PP ! Please report any bugs to the GSL mailing list ! .B gsl-discuss@sources.redhat.com. --- 54,58 ---- (if the library is installed). .PP ! Please report any bugs to ! .B bug-gsl@gnu.org. diff -x *.info* -rc2P gsl-1.2/doc/histogram.texi gsl-1.3/doc/histogram.texi *** gsl-1.2/doc/histogram.texi Mon Feb 4 19:36:37 2002 --- gsl-1.3/doc/histogram.texi Sun Dec 15 13:17:29 2002 *************** *** 553,557 **** @deftypefun int gsl_histogram_pdf_init (gsl_histogram_pdf * @var{p}, const gsl_histogram * @var{h}) ! This function initializes the probability distribution @var{p} with with the contents of the histogram @var{h}. If any of the bins of @var{h} are negative then the error handler is invoked with an error code of --- 553,557 ---- @deftypefun int gsl_histogram_pdf_init (gsl_histogram_pdf * @var{p}, const gsl_histogram * @var{h}) ! This function initializes the probability distribution @var{p} with the contents of the histogram @var{h}. If any of the bins of @var{h} are negative then the error handler is invoked with an error code of *************** *** 1237,1241 **** a higher resolution grid we can see the original underlying histogram and also the statistical fluctuations caused by the events being ! uniformly distributed over the the area of the original bins. @iftex --- 1237,1241 ---- a higher resolution grid we can see the original underlying histogram and also the statistical fluctuations caused by the events being ! uniformly distributed over the area of the original bins. @iftex diff -x *.info* -rc2P gsl-1.2/doc/interp.texi gsl-1.3/doc/interp.texi *** gsl-1.2/doc/interp.texi Mon Feb 18 20:06:43 2002 --- gsl-1.3/doc/interp.texi Sun Dec 15 12:44:00 2002 *************** *** 18,23 **** * Interpolation Types:: * Index Look-up and Acceleration:: ! * Evaluation of interpolating functions:: ! * Higher-level interface:: * Interpolation Example programs:: * Interpolation References and Further Reading:: --- 18,23 ---- * Interpolation Types:: * Index Look-up and Acceleration:: ! * Evaluation of Interpolating Functions:: ! * Higher-level Interface:: * Interpolation Example programs:: * Interpolation References and Further Reading:: *************** *** 30,35 **** routines described in this section compute a continuous interpolating function @math{y(x)} such that @math{y_i = y(x_i)}. The interpolation ! is piecewise smooth, and its behavior at the points is determined by the ! type of interpolation used. @node Interpolation Functions --- 30,35 ---- routines described in this section compute a continuous interpolating function @math{y(x)} such that @math{y_i = y(x_i)}. The interpolation ! is piecewise smooth, and its behavior at the end-points is determined by ! the type of interpolation used. @node Interpolation Functions *************** *** 79,83 **** @deffn {Interpolation Type} gsl_interp_cspline @cindex cubic splines ! Cubic spline with natural boundary conditions @end deffn --- 79,83 ---- @deffn {Interpolation Type} gsl_interp_cspline @cindex cubic splines ! Cubic spline with natural boundary conditions. @end deffn *************** *** 88,99 **** @deffn {Interpolation Type} gsl_interp_akima @cindex Akima splines ! Akima spline with natural boundary conditions @end deffn @deffn {Interpolation Type} gsl_interp_akima_periodic ! Akima spline with periodic boundary conditions @end deffn ! The following related functions are available, @deftypefun {const char *} gsl_interp_name (const gsl_interp * @var{interp}) --- 88,99 ---- @deffn {Interpolation Type} gsl_interp_akima @cindex Akima splines ! Akima spline with natural boundary conditions. @end deffn @deffn {Interpolation Type} gsl_interp_akima_periodic ! Akima spline with periodic boundary conditions. @end deffn ! The following related functions are available: @deftypefun {const char *} gsl_interp_name (const gsl_interp * @var{interp}) *************** *** 102,106 **** @example ! printf("interp uses '%s' interpolation\n", gsl_interp_name (interp)); @end example --- 102,106 ---- @example ! printf("interp uses '%s' interpolation.\n", gsl_interp_name (interp)); @end example *************** *** 152,157 **** @end deftypefun ! @node Evaluation of interpolating functions ! @section Evaluation of interpolating functions @deftypefun double gsl_interp_eval (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{a}) --- 152,157 ---- @end deftypefun ! @node Evaluation of Interpolating Functions ! @section Evaluation of Interpolating Functions @deftypefun double gsl_interp_eval (const gsl_interp * @var{interp}, const double @var{xa}[], const double @var{ya}[], double @var{x}, gsl_interp_accel * @var{a}) *************** *** 186,191 **** @end deftypefun ! @node Higher-level interface ! @section Higher-level interface The functions described in the previous sections required the user to --- 186,191 ---- @end deftypefun ! @node Higher-level Interface ! @section Higher-level Interface The functions described in the previous sections required the user to diff -x *.info* -rc2P gsl-1.2/doc/intro.texi gsl-1.3/doc/intro.texi *** gsl-1.2/doc/intro.texi Mon Jun 3 21:08:56 2002 --- gsl-1.3/doc/intro.texi Sat Oct 5 19:40:43 2002 *************** *** 182,185 **** @end itemize @noindent ! This mailing list can be used to report bugs or to ask questions not ! covered by this manual. --- 182,185 ---- @end itemize @noindent ! This mailing list can be used to ask questions not covered by this ! manual. diff -x *.info* -rc2P gsl-1.2/doc/math.texi gsl-1.3/doc/math.texi *** gsl-1.2/doc/math.texi Thu Oct 18 10:00:09 2001 --- gsl-1.3/doc/math.texi Mon Aug 26 16:32:02 2002 *************** *** 18,21 **** --- 18,22 ---- * Testing for Odd and Even Numbers:: * Maximum and Minimum functions:: + * Approximate Comparison of Floating Point Numbers:: @end menu *************** *** 187,190 **** --- 188,208 ---- + @deftypefun double gsl_ldexp (double @var{x}, int @var{e}) + @cindex ldexp + This function computes the value of @math{x * 2^e}. It provides an + alternative to the standard math function @code{ldexp(x)}. + @end deftypefun + + @deftypefun double gsl_frexp (double @var{x}, int * @var{e}) + @cindex frexp + This function splits the number @math{x} into its normalized fraction + @math{f} and exponent @math{e}, such that @math{x = f * 2^e} and + @c{$0.5 \le f < 1$} + @math{0.5 <= f < 1}. Ihe function returns @math{f} and stores the + exponent in @math{e}. If @math{x} is zero, both @math{f} and @math{e} + are set to zero. This function provides an alternative to the standard + math function @code{frexp(x, e)}. + @end deftypefun + @node Small integer powers @section Small integer powers *************** *** 222,227 **** @end example - - @node Testing the Sign of Numbers @section Testing the Sign of Numbers --- 240,243 ---- *************** *** 247,252 **** @end defmac - - @node Maximum and Minimum functions @section Maximum and Minimum functions --- 263,266 ---- *************** *** 294,296 **** --- 308,339 ---- functions are not available the macros @code{GSL_MAX} or @code{GSL_MIN} will be automatically substituted. + @end deftypefun + + @node Approximate Comparison of Floating Point Numbers + @section Approximate Comparison of Floating Point Numbers + + It is sometimes useful to be able to compare two floating point numbers + approximately, to allow for rounding and truncation errors. The following + function implements the approximate floating-point comparison algorithm + proposed by D.E. Knuth in Section 4.2.2 of @cite{Seminumerical + Algorithms} (3rd edition). + + @deftypefun int gsl_fcmp (double @var{x}, double @var{y}, double @var{epsilon}) + @cindex approximate comparison of floating point numbers + @cindex safe comparison of floating point numbers + @cindex floating point numbers, approximate comparison + This function determines whether @math{x} and @math{y} are approximately + equal to a relative accuracy @var{epsilon}. + + The relative accuracy is measured using an interval of size @math{2 + \delta}, where @math{\delta = 2^k \epsilon} and @math{k} is the + maximimum base-2 exponent of @math{x} and @math{y} as computed by the + function @code{frexp()}. + + If @math{x} and @math{y} lie within this interval, they are considered + approximately equal and the function returns 0. Otherwise if @math{x < + y}, the function returns -1, or if @math{x > y}, the function returns + +1. + + The implementation is based on the package @code{fcmp} by T.C. Belding. @end deftypefun diff -x *.info* -rc2P gsl-1.2/doc/min.texi gsl-1.3/doc/min.texi *** gsl-1.2/doc/min.texi Sun Apr 7 14:17:47 2002 --- gsl-1.3/doc/min.texi Sun Dec 15 13:19:04 2002 *************** *** 136,140 **** @deftypefun {gsl_min_fminimizer *} gsl_min_fminimizer_alloc (const gsl_min_fminimizer_type * @var{T}) ! This function returns a pointer to a a newly allocated instance of a minimizer of type @var{T}. For example, the following code creates an instance of a golden section minimizer, --- 136,140 ---- @deftypefun {gsl_min_fminimizer *} gsl_min_fminimizer_alloc (const gsl_min_fminimizer_type * @var{T}) ! This function returns a pointer to a newly allocated instance of a minimizer of type @var{T}. For example, the following code creates an instance of a golden section minimizer, diff -x *.info* -rc2P gsl-1.2/doc/multifit.texi gsl-1.3/doc/multifit.texi *** gsl-1.2/doc/multifit.texi Tue Feb 5 19:44:10 2002 --- gsl-1.3/doc/multifit.texi Sun Dec 15 13:20:56 2002 *************** *** 79,83 **** @deftypefun {gsl_multifit_fsolver *} gsl_multifit_fsolver_alloc (const gsl_multifit_fsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) ! This function returns a pointer to a a newly allocated instance of a solver of type @var{T} for @var{n} observations and @var{p} parameters. --- 79,83 ---- @deftypefun {gsl_multifit_fsolver *} gsl_multifit_fsolver_alloc (const gsl_multifit_fsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) ! This function returns a pointer to a newly allocated instance of a solver of type @var{T} for @var{n} observations and @var{p} parameters. *************** *** 88,92 **** @deftypefun {gsl_multifit_fdfsolver *} gsl_multifit_fdfsolver_alloc (const gsl_multifit_fdfsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) ! This function returns a pointer to a a newly allocated instance of a derivative solver of type @var{T} for @var{n} observations and @var{p} parameters. For example, the following code creates an instance of a --- 88,92 ---- @deftypefun {gsl_multifit_fdfsolver *} gsl_multifit_fdfsolver_alloc (const gsl_multifit_fdfsolver_type * @var{T}, size_t @var{n}, size_t @var{p}) ! This function returns a pointer to a newly allocated instance of a derivative solver of type @var{T} for @var{n} observations and @var{p} parameters. For example, the following code creates an instance of a *************** *** 293,297 **** @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the the precise location of the minimum, @math{x}, is unimportant provided a value can be found where the gradient is small enough. --- 293,297 ---- @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the precise location of the minimum, @math{x}, is unimportant provided a value can be found where the gradient is small enough. diff -x *.info* -rc2P gsl-1.2/doc/multimin.texi gsl-1.3/doc/multimin.texi *** gsl-1.2/doc/multimin.texi Thu Mar 21 19:54:59 2002 --- gsl-1.3/doc/multimin.texi Sun Dec 15 13:19:03 2002 *************** *** 48,59 **** takes a value which is lower than at any neighboring point. For smooth functions the gradient @math{g = \nabla f} vanishes at the minimum. In ! general there are no bracketing methods available for the minimization ! of @math{n}-dimensional functions. All algorithms proceed from an ! initial guess using a search algorithm which attempts to move in a ! downhill direction. A one-dimensional line minimisation is performed ! along this direction until the lowest point is found to a suitable ! tolerance. The search direction is then updated with local information ! from the function and its derivatives, and the whole process repeated ! until the true @math{n}-dimensional minimum is found. Several minimization algorithms are available within a single --- 48,68 ---- takes a value which is lower than at any neighboring point. For smooth functions the gradient @math{g = \nabla f} vanishes at the minimum. In ! general there are no bracketing methods available for the ! minimization of @math{n}-dimensional functions. All algorithms ! proceed from an initial guess using a search algorithm which attempts ! to move in a downhill direction. ! ! All algorithms making use of the gradient of the fuction perform a ! one-dimensional line minimisation along this direction until the lowest ! point is found to a suitable tolerance. The search direction is then ! updated with local information from the function and its derivatives, ! and the whole process repeated until the true @math{n}-dimensional ! minimum is found. ! ! The Nelder-Mead Simplex algorithm applies a different strategy. It ! maintains @math{n+1} trial parameter vectors as the vertices of a ! @math{n}-dimensional simplex. In each iteration step it tries to ! improve the worst vertex by a simple geometrical transformation until ! the size of the simplex falls below a given tolerance. Several minimization algorithms are available within a single *************** *** 77,81 **** line-mimisation in the current direction or an update to the search direction itself. The state for the minimizers is held in a ! @code{gsl_multimin_fdfminimizer} struct. @node Multimin Caveats --- 86,91 ---- line-mimisation in the current direction or an update to the search direction itself. The state for the minimizers is held in a ! @code{gsl_multimin_fdfminimizer} struct or a ! @code{gsl_multimin_fminimizer} struct. @node Multimin Caveats *************** *** 102,106 **** @deftypefun {gsl_multimin_fdfminimizer *} gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type *@var{T}, size_t @var{n}) ! This function returns a pointer to a a newly allocated instance of a minimizer of type @var{T} for an @var{n}-dimension function. If there is insufficient memory to create the minimizer then the function returns --- 112,117 ---- @deftypefun {gsl_multimin_fdfminimizer *} gsl_multimin_fdfminimizer_alloc (const gsl_multimin_fdfminimizer_type *@var{T}, size_t @var{n}) ! @deftypefunx {gsl_multimin_fminimizer *} gsl_multimin_fminimizer_alloc (const gsl_multimin_fminimizer_type *@var{T}, size_t @var{n}) ! This function returns a pointer to a newly allocated instance of a minimizer of type @var{T} for an @var{n}-dimension function. If there is insufficient memory to create the minimizer then the function returns *************** *** 119,125 **** --- 130,144 ---- accuracy of @var{tol}, where @c{$p\cdot g < tol |p| |g|$} @math{dot(p,g) < tol |p| |g|}. + + @deftypefunx int gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * @var{s}, gsl_multimin_function *@var{f}, const gsl_vector * @var{x}, const gsl_vector * @var{step_size}) + This function initializes the minimizer @var{s} to minimize the function + @var{f}, starting from the initial point + @var{x}. The size of the initial trial steps is given in vector + @var{step_size}. The precise meaning of this parameter depends on the + method used. @end deftypefun @deftypefun void gsl_multimin_fdfminimizer_free (gsl_multimin_fdfminimizer *@var{s}) + @deftypefunx void gsl_multimin_fminimizer_free (gsl_multimin_fminimizer *@var{s}) This function frees all the memory associated with the minimizer @var{s}. *************** *** 127,130 **** --- 146,150 ---- @deftypefun {const char *} gsl_multimin_fdfminimizer_name (const gsl_multimin_fdfminimizer * @var{s}) + @deftypefunx {const char *} gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * @var{s}) This function returns a pointer to the name of the minimizer. For example, *************** *** 141,145 **** You must provide a parametric function of @math{n} variables for the ! minimizers to operate on. You also need to provide a routine which calculates the gradient of the function and a third routine which calculates both the function value and the gradient together. In order --- 161,165 ---- You must provide a parametric function of @math{n} variables for the ! minimizers to operate on. You may also need to provide a routine which calculates the gradient of the function and a third routine which calculates both the function value and the gradient together. In order *************** *** 179,182 **** --- 199,220 ---- @end table @end deftp + @deftp {Data Type} gsl_multimin_function + This data type defines a general function of @math{n} variables with + parameters, + + @table @code + @item double (* f) (const gsl_vector * @var{x}, void * @var{params}) + this function should return the result + @c{$f(x,\hbox{\it params})$} + @math{f(x,params)} for argument @var{x} and parameters @var{params}. + + @item size_t @var{n} + the dimension of the system, i.e. the number of components of the + vectors @var{x}. + + @item void * @var{params} + a pointer to the parameters of the function. + @end table + @end deftp @noindent The following example function defines a simple paraboloid with two *************** *** 247,250 **** --- 285,289 ---- @deftypefun int gsl_multimin_fdfminimizer_iterate (gsl_multimin_fdfminimizer *@var{s}) + @deftypefunx int gsl_multimin_fminimizer_iterate (gsl_multimin_fminimizer *@var{s}) These functions perform a single iteration of the minimizer @var{s}. If the iteration encounters an unexpected problem then an error code will *************** *** 257,265 **** @deftypefun {gsl_vector *} gsl_multimin_fdfminimizer_x (const gsl_multimin_fdfminimizer * @var{s}) @deftypefunx double gsl_multimin_fdfminimizer_minimum (const gsl_multimin_fdfminimizer * @var{s}) @deftypefunx {gsl_vector *} gsl_multimin_fdfminimizer_gradient (const gsl_multimin_fdfminimizer * @var{s}) These functions return the current best estimate of the location of the ! minimum, the value of the function at that point and its gradient, for ! the minimizer @var{s}. @end deftypefun --- 296,307 ---- @deftypefun {gsl_vector *} gsl_multimin_fdfminimizer_x (const gsl_multimin_fdfminimizer * @var{s}) + @deftypefunx {gsl_vector *} gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * @var{s}) @deftypefunx double gsl_multimin_fdfminimizer_minimum (const gsl_multimin_fdfminimizer * @var{s}) + @deftypefunx double gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * @var{s}) @deftypefunx {gsl_vector *} gsl_multimin_fdfminimizer_gradient (const gsl_multimin_fdfminimizer * @var{s}) + @deftypefunx double gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * @var{s}) These functions return the current best estimate of the location of the ! minimum, the value of the function at that point, its gradient, ! and minimizer specific characteristic size for the minimizer @var{s}. @end deftypefun *************** *** 290,294 **** below allow the user to test the precision of the current result. ! @deftypefun int gsl_multimin_test_gradient (const gsl_vector * @var{g},double @var{epsabs}) This function tests the norm of the gradient @var{g} against the absolute tolerance @var{epsabs}. The gradient of a multidimensional --- 332,336 ---- below allow the user to test the precision of the current result. ! @deftypefun int gsl_multimin_test_gradient (const gsl_vector * @var{g}, double @var{epsabs}) This function tests the norm of the gradient @var{g} against the absolute tolerance @var{epsabs}. The gradient of a multidimensional *************** *** 316,330 **** @end deftypefun @node Multimin Algorithms @section Algorithms There are several minimization methods available. The best choice of ! algorithm depends on the problem. Each of the algorithms uses the value ! of the function and its gradient at each evaluation point. @deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_fr This is the Fletcher-Reeves conjugate gradient algorithm. The conjugate gradient algorithm proceeds as a succession of line minimizations. The ! sequence of search directions to build up an approximation to the curvature of the function in the neighborhood of the minimum. An initial search direction @var{p} is chosen using the gradient and line --- 358,382 ---- @end deftypefun + @deftypefun int gsl_multimin_test_size (const double @var{size}, double @var{epsabs}) + This function tests the minimizer specific characteristic + size (if applicable to the used minimizer) against absolute tolerance @var{epsabs}. + The test returns @code{GSL_SUCCESS} if the size is smaller than tolerance, + otherwise @code{GSL_CONTINUE} is returned. + @end deftypefun + @node Multimin Algorithms @section Algorithms There are several minimization methods available. The best choice of ! algorithm depends on the problem. All of the algorithms uses the value ! of the function and most of its gradient at each evaluation point, too. @deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_fr + @cindex Fletcher-Reeves conjugate gradient algorithm, minimization + @cindex Conjugate gradient algorithm, minimization + @cindex Minimization, conjugate gradient algorithm This is the Fletcher-Reeves conjugate gradient algorithm. The conjugate gradient algorithm proceeds as a succession of line minimizations. The ! sequence of search directions is used to build up an approximation to the curvature of the function in the neighborhood of the minimum. An initial search direction @var{p} is chosen using the gradient and line *************** *** 342,345 **** --- 394,399 ---- @deffn {Minimizer} gsl_multimin_fdfminimizer_conjugate_pr + @cindex Polak-Ribiere algorithm, minimization + @cindex Minimization, Polak-Ribiere algorithm This is the Polak-Ribiere conjugate gradient algorithm. It is similar to the Fletcher-Reeves method, differing only in the choice of the *************** *** 350,354 **** @deffn {Minimizer} gsl_multimin_fdfminimizer_vector_bfgs ! This is the vector Broyden-Fletcher-Goldfarb-Shanno conjugate gradient algorithm. It is a quasi-Newton method which builds up an approximation to the second derivatives of the function @math{f} using the difference --- 404,410 ---- @deffn {Minimizer} gsl_multimin_fdfminimizer_vector_bfgs ! @cindex BFGS conjugate gradient algorithm, minimization ! @cindex Minimization, BFGS conjugate gradient algorithm ! This is the vector Broyden-Fletcher-Goldfarb-Shanno (BFGS) conjugate gradient algorithm. It is a quasi-Newton method which builds up an approximation to the second derivatives of the function @math{f} using the difference *************** *** 359,362 **** --- 415,420 ---- @deffn {Minimizer} gsl_multimin_fdfminimizer_steepest_descent + @cindex Steepest descent algorithm, minimization + @cindex Minimization, steepest descent algorithm The steepest descent algorithm follows the downhill gradient of the function at each step. When a downhill step is successful the step-size *************** *** 368,371 **** --- 426,470 ---- @end deffn + @deffn {Minimizer} gsl_multimin_fminimizer_nmsimplex + @cindex Nelder-Mead simplex algorithm for minimization + @cindex Simplex algorithm, minimization + @cindex Minimization, simplex algorithm + This is the Simplex algorithm by Nelder and Mead. It constructs + @math{n} vectors @math{p_i} from the + starting vector @var{x} as follows: + @tex + \beforedisplay + $$ + \eqalign{ + p_0 & = {x_0, x_1, \cdots , x_n} \cr + p_1 & = {x_0 + step\_size_0, x_1, \cdots , x_n} \cr + p_2 & = {x_0, x_1 + step\_size_1, \cdots , x_n} \cr + p_n & = {x_0, x_1, \cdots , x_n+step\_size_n} \cr + } + $$ + \afterdisplay + @end tex + @noindent + that form the @math{n+1} vertices of a simplex in @math{n} + dimensions. In each iteration step the algorithm tries to improve + the parameter vector @math{p_i} corresponding to the highest, i. e. + worst, function value by simple geometrical transformations. These + are reflection, reflection followed by expansion, contraction and multiple + contraction. Using these transformations the simplex moves through + the parameter space towards the minimum, where it contracts itself. + + After each iteration, the best vertex is returned. + Note, that due to the nature of the algorithm + (getting rid of the worst estimate), every + iteration doesn't necessarily improve the current best parameter vector. + Usually several iterations are required. + + The routine calculates the minimizer specific characteristic size as the + average distance from the geometrical center of the simplex to all its + vertices. This size can be used as a stopping criteria, as the simplex + contracts itself near the minimum. The size is returned by the function + @code{gsl_multimin_fminimizer_size}. + @end deffn + @node Multimin Examples @section Examples *************** *** 474,477 **** --- 573,697 ---- iterations would be needed for a more complicated function. + Here is another example using the Nelder Mead Simplex algorithm to + minimize the same example object function, as above. + + @smallexample + int + main(void) + @{ + size_t np = 2; + double par[2] = @{1.0, 2.0@}; + + const gsl_multimin_fminimizer_type *T = + gsl_multimin_fminimizer_nmsimplex; + gsl_multimin_fminimizer *s = NULL; + gsl_vector *ss, *x; + gsl_multimin_function minex_func; + + size_t iter = 0, i; + int rval = GSL_CONTINUE; + int status = GSL_SUCCESS; + double ssval; + + /* Initial vertex size vector */ + + ss = gsl_vector_alloc (np); + + if (ss == NULL) + @{ + GSL_ERROR_VAL ("failed to allocate space for ss", GSL_ENOMEM, 0); + @} + + gsl_vector_set_all (ss, 1.0); + + /* Starting point */ + + x = gsl_vector_alloc (np); + + if (x == NULL) + @{ + gsl_vector_free(ss); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + @} + + gsl_vector_set (x, 0, 5.0); + gsl_vector_set (x, 1, 7.0); + + /* Initialize method and iterate */ + + minex_func.f = &my_f; + minex_func.n = np; + minex_func.params = (void *)∥ + + s = gsl_multimin_fminimizer_alloc (T, np); + gsl_multimin_fminimizer_set (s, &minex_func, x, ss); + + while (rval == GSL_CONTINUE) + @{ + iter++; + status = gsl_multimin_fminimizer_iterate(s); + + if (status) + break; + + rval = gsl_multimin_test_size (gsl_multimin_fminimizer_size (s), + 1e-2); + ssval = gsl_multimin_fminimizer_size (s); + + if (rval == GSL_SUCCESS) + printf ("converged to minimum at\n"); + + printf("%5d ", iter); + for (i = 0; i < np; i++) + @{ + printf ("%10.3e ", gsl_vector_get (s->x, i)); + @} + printf("f() = %-10.3f ssize = %.3f\n", s->fval, ssval); + @} + + gsl_vector_free(x); + gsl_vector_free(ss); + gsl_multimin_fminimizer_free (s); + + return status; + @} + @end smallexample + @noindent + The minimum search stops when the Simplex size drops to 0.01. The output is + shown below. + + @example + 1 6.500e+00 5.000e+00 f() = 512.500 ssize = 1.082 + 2 5.250e+00 4.000e+00 f() = 290.625 ssize = 1.372 + 3 5.250e+00 4.000e+00 f() = 290.625 ssize = 1.372 + 4 5.500e+00 1.000e+00 f() = 252.500 ssize = 1.372 + 5 2.625e+00 3.500e+00 f() = 101.406 ssize = 1.823 + 6 3.469e+00 1.375e+00 f() = 98.760 ssize = 1.526 + 7 1.820e+00 3.156e+00 f() = 63.467 ssize = 1.105 + 8 1.820e+00 3.156e+00 f() = 63.467 ssize = 1.105 + 9 1.016e+00 2.812e+00 f() = 43.206 ssize = 1.105 + 10 2.041e+00 2.008e+00 f() = 40.838 ssize = 0.645 + 11 1.236e+00 1.664e+00 f() = 32.816 ssize = 0.645 + 12 1.236e+00 1.664e+00 f() = 32.816 ssize = 0.447 + 13 5.225e-01 1.980e+00 f() = 32.288 ssize = 0.447 + 14 1.103e+00 2.073e+00 f() = 30.214 ssize = 0.345 + 15 1.103e+00 2.073e+00 f() = 30.214 ssize = 0.264 + 16 1.103e+00 2.073e+00 f() = 30.214 ssize = 0.160 + 17 9.864e-01 1.934e+00 f() = 30.090 ssize = 0.132 + 18 9.190e-01 1.987e+00 f() = 30.069 ssize = 0.092 + 19 1.028e+00 2.017e+00 f() = 30.013 ssize = 0.056 + 20 1.028e+00 2.017e+00 f() = 30.013 ssize = 0.046 + 21 1.028e+00 2.017e+00 f() = 30.013 ssize = 0.033 + 22 9.874e-01 1.985e+00 f() = 30.006 ssize = 0.028 + 23 9.846e-01 1.995e+00 f() = 30.003 ssize = 0.023 + 24 1.007e+00 2.003e+00 f() = 30.001 ssize = 0.012 + converged to minimum at + 25 1.007e+00 2.003e+00 f() = 30.001 ssize = 0.010 + @end example + @noindent + The simplex size first increases, while the simplex moves towards the + minimum. After a while the size begins to decrease as the simplex + contracts around the minimum. + @node Multimin References and Further Reading @section References and Further Reading *************** *** 485,488 **** --- 705,711 ---- "Minimization Methods", p. 325---335, Springer (1997), ISBN 3-540-62057-5. + @item J.A. Nelder and R. Mead, + @cite{A simplex method for function minimization}, Computer Journal + vol. 7 (1965), 308---315. @end itemize @noindent diff -x *.info* -rc2P gsl-1.2/doc/multiroots.texi gsl-1.3/doc/multiroots.texi *** gsl-1.2/doc/multiroots.texi Wed May 1 20:39:58 2002 --- gsl-1.3/doc/multiroots.texi Sun Dec 15 13:20:56 2002 *************** *** 119,123 **** @deftypefun {gsl_multiroot_fsolver *} gsl_multiroot_fsolver_alloc (const gsl_multiroot_fsolver_type * @var{T}, size_t @var{n}) ! This function returns a pointer to a a newly allocated instance of a solver of type @var{T} for a system of @var{n} dimensions. For example, the following code creates an instance of a hybrid solver, --- 119,123 ---- @deftypefun {gsl_multiroot_fsolver *} gsl_multiroot_fsolver_alloc (const gsl_multiroot_fsolver_type * @var{T}, size_t @var{n}) ! This function returns a pointer to a newly allocated instance of a solver of type @var{T} for a system of @var{n} dimensions. For example, the following code creates an instance of a hybrid solver, *************** *** 137,141 **** @deftypefun {gsl_multiroot_fdfsolver *} gsl_multiroot_fdfsolver_alloc (const gsl_multiroot_fdfsolver_type * @var{T}, size_t @var{n}) ! This function returns a pointer to a a newly allocated instance of a derivative solver of type @var{T} for a system of @var{n} dimensions. For example, the following code creates an instance of a Newton-Raphson solver, --- 137,141 ---- @deftypefun {gsl_multiroot_fdfsolver *} gsl_multiroot_fdfsolver_alloc (const gsl_multiroot_fdfsolver_type * @var{T}, size_t @var{n}) ! This function returns a pointer to a newly allocated instance of a derivative solver of type @var{T} for a system of @var{n} dimensions. For example, the following code creates an instance of a Newton-Raphson solver, *************** *** 302,309 **** double x0 = gsl_vector_get(x,0); double x1 = gsl_vector_get(x,1); ! gsl_vector_set (J, 0, 0, A * x1) ! gsl_vector_set (J, 0, 1, A * x0) ! gsl_vector_set (J, 1, 0, -exp(-x0)) ! gsl_vector_set (J, 1, 1, -exp(-x1)) return GSL_SUCCESS @} --- 302,309 ---- double x0 = gsl_vector_get(x,0); double x1 = gsl_vector_get(x,1); ! gsl_matrix_set (J, 0, 0, A * x1) ! gsl_matrix_set (J, 0, 1, A * x0) ! gsl_matrix_set (J, 1, 0, -exp(-x0)) ! gsl_matrix_set (J, 1, 1, -exp(-x1)) return GSL_SUCCESS @} *************** *** 324,331 **** gsl_vector_set (f, 1, u0 + u1 - (1 + 1/A)) ! gsl_vector_set (J, 0, 0, A * x1) ! gsl_vector_set (J, 0, 1, A * x0) ! gsl_vector_set (J, 1, 0, -u0) ! gsl_vector_set (J, 1, 1, -u1) return GSL_SUCCESS @} --- 324,331 ---- gsl_vector_set (f, 1, u0 + u1 - (1 + 1/A)) ! gsl_matrix_set (J, 0, 0, A * x1) ! gsl_matrix_set (J, 0, 1, A * x0) ! gsl_matrix_set (J, 1, 0, -u0) ! gsl_matrix_set (J, 1, 1, -u1) return GSL_SUCCESS @} *************** *** 456,460 **** @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the the precise location of the root, @math{x}, is unimportant provided a value can be found where the residual is small enough. --- 456,460 ---- @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the precise location of the root, @math{x}, is unimportant provided a value can be found where the residual is small enough. diff -x *.info* -rc2P gsl-1.2/doc/ode-initval.texi gsl-1.3/doc/ode-initval.texi *** gsl-1.2/doc/ode-initval.texi Mon Jun 10 12:03:20 2002 --- gsl-1.3/doc/ode-initval.texi Sun Dec 15 13:20:56 2002 *************** *** 61,65 **** @math{df_i(t,y,params)/dt} in the array @var{dfdt} and the Jacobian matrix @c{$J_{ij}$} ! @math{J_@{ij@}} in the the array @var{dfdy} regarded as a row-ordered matrix @code{J(i,j) = dfdy[i * dim + j]} where @code{dim} is the dimension of the system. --- 61,65 ---- @math{df_i(t,y,params)/dt} in the array @var{dfdt} and the Jacobian matrix @c{$J_{ij}$} ! @math{J_@{ij@}} in the array @var{dfdy} regarded as a row-ordered matrix @code{J(i,j) = dfdy[i * dim + j]} where @code{dim} is the dimension of the system. *************** *** 283,286 **** --- 283,310 ---- @end deftypefun + + @deftypefun {gsl_odeiv_control *} gsl_odeiv_control_scaled_new (double @var{eps_abs}, double @var{eps_rel}, double @var{a_y}, double @var{a_dydt}, const double @var{scale_abs}[], size_t @var{dim}) + This function creates a new control object which uses the same algorithm + as @code{gsl_odeiv_control_standard_new} but with an absolute error + which is scaled for each component by the array @var{scale_abs}. + The formula for @math{D_i} for this control object is, + + @tex + \beforedisplay + $$ + D_i = \epsilon_{abs} s_i + \epsilon_{rel} * (a_{y} |y_i| + a_{dydt} h |y'_i|) + $$ + \afterdisplay + @end tex + @ifinfo + @example + D_i = eps_abs * s_i + eps_rel * (a_y |y_i| + a_dydt h |y'_i|) + @end example + @end ifinfo + @noindent + where @math{s_i} is the @math{i}-th component of the array @var{scale_abs}. + The same error control heuristic is used by the Matlab @sc{ode} suite. + @end deftypefun + @deftypefun {gsl_odeiv_control *} gsl_odeiv_control_alloc (const gsl_odeiv_control_type * @var{T}) This function returns a pointer to a newly allocated instance of a *************** *** 581,585 **** @section References and Further Reading @noindent ! Many of the the basic Runge-Kutta formulas can be found in the Handbook of Mathematical Functions, --- 605,609 ---- @section References and Further Reading @noindent ! Many of the basic Runge-Kutta formulas can be found in the Handbook of Mathematical Functions, diff -x *.info* -rc2P gsl-1.2/doc/randist.texi gsl-1.3/doc/randist.texi *** gsl-1.2/doc/randist.texi Tue Jun 4 21:58:50 2002 --- gsl-1.3/doc/randist.texi Wed Dec 18 20:26:58 2002 *************** *** 45,52 **** * The Type-1 Gumbel Distribution:: * The Type-2 Gumbel Distribution:: * General Discrete Distributions:: * The Poisson Distribution:: * The Bernoulli Distribution:: ! * The Binomial Distribution:: * The Negative Binomial Distribution:: * The Pascal Distribution:: --- 45,54 ---- * The Type-1 Gumbel Distribution:: * The Type-2 Gumbel Distribution:: + * The Dirichlet Distribution:: * General Discrete Distributions:: * The Poisson Distribution:: * The Bernoulli Distribution:: ! * The Binomial Distribution:: ! * The Multinomial Distribution:: * The Negative Binomial Distribution:: * The Pascal Distribution:: *************** *** 261,265 **** @cindex two-sided exponential random variates @cindex Laplace distribution random variates ! This function returns a random variate from the the Laplace distribution with width @var{a}. The distribution is, --- 263,267 ---- @cindex two-sided exponential random variates @cindex Laplace distribution random variates ! This function returns a random variate from the Laplace distribution with width @var{a}. The distribution is, *************** *** 1027,1031 **** @end deftypefn ! @deftypefn Random void gsl_ran_dir_nd (const gsl_rng * @var{r}, int @var{n}, double *@var{x}) @cindex N-dimensional random direction vector @cindex direction vector, random N-dimensional --- 1029,1033 ---- @end deftypefn ! @deftypefn Random void gsl_ran_dir_nd (const gsl_rng * @var{r}, size_t @var{n}, double *@var{x}) @cindex N-dimensional random direction vector @cindex direction vector, random N-dimensional *************** *** 1157,1160 **** --- 1159,1229 ---- @page + @node The Dirichlet Distribution + @section The Dirichlet Distribution + @deftypefn Random void gsl_ran_dirichlet (const gsl_rng * @var{r}, const size_t @var{K}, const double @var{alpha}[], double @var{theta}[]) + @cindex Dirichlet distribution + This function returns an array of @var{K} random variates from a Dirichlet + distribution of order @var{K}-1. The distribution function is + + @tex + \beforedisplay + $$ + p(\theta_1,\ldots,\theta_K) \, d\theta_1 \cdots d\theta_K = + {1 \over Z} \prod_{i=1}^{K} \theta_i^{\alpha_i - 1} + \; \delta(1 -\sum_{i=1}^K \theta_i) d\theta_1 \cdots d\theta_K + $$ + \afterdisplay + @end tex + @ifinfo + @example + p(\theta_1, ..., \theta_K) d\theta_1 ... d\theta_K = + (1/Z) \prod_@{i=1@}^K \theta_i^@{\alpha_i - 1@} \delta(1 -\sum_@{i=1@}^K \theta_i) d\theta_1 ... d\theta_K + @end example + @end ifinfo + @noindent + for @c{$\theta_i \ge 0$} + @math{theta_i >= 0} + and @c{$\alpha_i \ge 0$} + @math{alpha_i >= 0}. + The normalization factor @math{Z} is + + @tex + \beforedisplay + $$ + Z = {\prod_{i=1}^K \Gamma(\alpha_i) \over \Gamma( \sum_{i=1}^K \alpha_i)} + $$ + \afterdisplay + @end tex + @ifinfo + @example + Z = @{\prod_@{i=1@}^K \Gamma(\alpha_i)@} / @{\Gamma( \sum_@{i=1@}^K \alpha_i)@} + @end example + @end ifinfo + + The random variates are generated by sampling @var{K} values + from gamma distributions with parameters + @c{$a=\alpha_i$, $b=1$} + @math{a=alpha_i, b=1}, + and renormalizing. + See A.M. Law, W.D. Kelton, @cite{Simulation Modeling and Analysis} (1991). + @end deftypefn + + @deftypefun double gsl_ran_dirichlet_pdf (const size_t @var{K}, const double @var{alpha}[], const double @var{theta}[]) + This function computes the probability density + @c{$p(\theta_1, \ldots , \theta_K)$} + @math{p(\theta_1, ... , \theta_K)} + at @var{theta}[@var{K}] for a Dirichlet distribution with parameters + @var{alpha}[@var{K}], using the formula given above. + @end deftypefun + + @deftypefun double gsl_ran_dirichlet_lnpdf (const size_t @var{K}, const double @var{alpha}[], const double @var{theta}[]) + This function computes the logarithm of the probability density + @c{$p(\theta_1, \ldots , \theta_K)$} + @math{p(\theta_1, ... , \theta_K)} + for a Dirichlet distribution with parameters + @var{alpha}[@var{K}]. + @end deftypefun + + @page @node General Discrete Distributions @section General Discrete Distributions *************** *** 1366,1369 **** --- 1435,1495 ---- \centerline{\input rand-binomial.tex} @end tex + + + @page + @node The Multinomial Distribution + @section The Multinomial Distribution + @deftypefn Random void gsl_ran_multinomial (const gsl_rng * @var{r}, const size_t @var{K}, const unsigned int @var{N}, const double @var{p}[], unsigned int @var{n}[]) + @cindex Multinomial distribution + + This function returns an array of @var{K} random variates from a + multinomial distribution. The distribution function is, + + @tex + \beforedisplay + $$ + P(n_1, n_2,\cdots, n_K) = {{ N!}\over{n_1 ! n_2 ! \cdots n_K !}} \, + p_1^{n_1} p_2^{n_2} \cdots p_K^{n_K} + $$ + \afterdisplay + @end tex + @ifinfo + @example + P(n_1, n_2, ..., n_K) = + (N!/(n_1! n_2! ... n_K!)) p_1^n_1 p_2^n_2 ... p_K^n_K + @end example + @end ifinfo + @noindent + where @c{($n_1$, $n_2$, $\ldots$, $n_K$)} + @math{(n_1, n_2, ..., n_K)} + are nonnegative integers with + @c{$\sum_{k=1}^{K} n_k =N$} + @math{sum_@{k=1,K@} n_k = N}, + and + @c{$(p_1, p_2, \ldots, p_K)$} + @math{(p_1, p_2, ..., p_K)} + is a probability distribution with @math{\sum p_i = 1}. + If the array @var{p}[@var{K}] is not normalized then its entries will be + treated as weights and normalized appropriately. + + Random variates are generated using the conditional binomial method (see + C.S. David, @cite{The computer generation of multinomial random + variates}, Comp. Stat. Data Anal. 16 (1993) 205-217 for details). + @end deftypefn + + @deftypefun double gsl_ran_multinomial_pdf (const size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[]) + This function computes the probability + @c{$P(n_1, n_2, \ldots, n_K)$} + @math{P(n_1, n_2, ..., n_K)} + of sampling @var{n}[@var{K}] from a multinomial distribution + with parameters @var{p}[@var{K}], using the formula given above. + @end deftypefun + + @deftypefun double gsl_ran_multinomial_lnpdf (const size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[]) + This function returns the logarithm of the probability for the + multinomial distribution @c{$P(n_1, n_2, \ldots, n_K)$} + @math{P(n_1, n_2, ..., n_K)} with parameters @var{p}[@var{K}]. + @end deftypefun + @page diff -x *.info* -rc2P gsl-1.2/doc/rng.texi gsl-1.3/doc/rng.texi *** gsl-1.2/doc/rng.texi Tue May 7 21:40:15 2002 --- gsl-1.3/doc/rng.texi Sun Dec 15 13:21:05 2002 *************** *** 49,53 **** A very nice review of random number generators was written by Pierre L'Ecuyer, as Chapter 4 of the book: Handbook on Simulation, Jerry Banks, ! ed. (Wiley, 1997). The chapter is available in postscript from from L'Ecuyer's ftp site (see references). Knuth's volume on Seminumerical Algorithms (originally published in 1968) devotes 170 pages to random --- 49,53 ---- A very nice review of random number generators was written by Pierre L'Ecuyer, as Chapter 4 of the book: Handbook on Simulation, Jerry Banks, ! ed. (Wiley, 1997). The chapter is available in postscript from L'Ecuyer's ftp site (see references). Knuth's volume on Seminumerical Algorithms (originally published in 1968) devotes 170 pages to random *************** *** 674,678 **** random as can be measured, using the author's test. ! This implementation uses the values suggested the the example on p392 of Ziff's article: @math{A=471}, @math{B=1586}, @math{C=6988}, @math{D=9689}. --- 674,678 ---- random as can be measured, using the author's test. ! This implementation uses the values suggested the example on p392 of Ziff's article: @math{A=471}, @math{B=1586}, @math{C=6988}, @math{D=9689}. diff -x *.info* -rc2P gsl-1.2/doc/roots.texi gsl-1.3/doc/roots.texi *** gsl-1.2/doc/roots.texi Wed Jan 9 18:52:14 2002 --- gsl-1.3/doc/roots.texi Sun Dec 15 13:20:56 2002 *************** *** 117,121 **** @deftypefun {gsl_root_fsolver *} gsl_root_fsolver_alloc (const gsl_root_fsolver_type * @var{T}) ! This function returns a pointer to a a newly allocated instance of a solver of type @var{T}. For example, the following code creates an instance of a bisection solver, --- 117,121 ---- @deftypefun {gsl_root_fsolver *} gsl_root_fsolver_alloc (const gsl_root_fsolver_type * @var{T}) ! This function returns a pointer to a newly allocated instance of a solver of type @var{T}. For example, the following code creates an instance of a bisection solver, *************** *** 134,138 **** @deftypefun {gsl_root_fdfsolver *} gsl_root_fdfsolver_alloc (const gsl_root_fdfsolver_type * @var{T}) ! This function returns a pointer to a a newly allocated instance of a derivative-based solver of type @var{T}. For example, the following code creates an instance of a Newton-Raphson solver, --- 134,138 ---- @deftypefun {gsl_root_fdfsolver *} gsl_root_fdfsolver_alloc (const gsl_root_fdfsolver_type * @var{T}) ! This function returns a pointer to a newly allocated instance of a derivative-based solver of type @var{T}. For example, the following code creates an instance of a Newton-Raphson solver, *************** *** 518,522 **** @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the the precise location of the root, @math{x}, is unimportant provided a value can be found where the residual, @math{|f(x)|}, is small enough. --- 518,522 ---- @noindent and returns @code{GSL_CONTINUE} otherwise. This criterion is suitable ! for situations where the precise location of the root, @math{x}, is unimportant provided a value can be found where the residual, @math{|f(x)|}, is small enough. diff -x *.info* -rc2P gsl-1.2/doc/siman.texi gsl-1.3/doc/siman.texi *** gsl-1.2/doc/siman.texi Thu Jun 13 20:01:06 2002 --- gsl-1.3/doc/siman.texi Sun Jul 21 13:09:09 2002 *************** *** 98,105 **** @code{memcpy} and @code{free}. The function pointers @var{copyfunc}, @var{copy_constructor} and @var{destructor} should be null pointers in ! fixed-size mode. In the variable-size mode the functions @var{copyfunc} ! , @var{copy_constructor} and @var{destructor} are used to create, copy ! and destroy configurations internally. The variable @var{element_size} ! should be zero in the variable-size mode. The @var{params} structure (described below) controls the run by --- 98,105 ---- @code{memcpy} and @code{free}. The function pointers @var{copyfunc}, @var{copy_constructor} and @var{destructor} should be null pointers in ! fixed-size mode. In the variable-size mode the functions ! @var{copyfunc}, @var{copy_constructor} and @var{destructor} are used to ! create, copy and destroy configurations internally. The variable ! @var{element_size} should be zero in the variable-size mode. The @var{params} structure (described below) controls the run by diff -x *.info* -rc2P gsl-1.2/doc/sort.texi gsl-1.3/doc/sort.texi *** gsl-1.2/doc/sort.texi Thu Dec 6 20:47:19 2001 --- gsl-1.3/doc/sort.texi Sun Dec 15 13:20:56 2002 *************** *** 112,116 **** There are no functions for sorting complex arrays or vectors, since the ordering of complex numbers is not uniquely defined. To sort a complex ! vector by magnitude compute a real vector containing the the magnitudes of the complex elements, and sort this vector indirectly. The resulting index gives the appropriate ordering of the original complex vector. --- 112,116 ---- There are no functions for sorting complex arrays or vectors, since the ordering of complex numbers is not uniquely defined. To sort a complex ! vector by magnitude compute a real vector containing the magnitudes of the complex elements, and sort this vector indirectly. The resulting index gives the appropriate ordering of the original complex vector. *************** *** 231,235 **** @noindent This can be computed directly from the function ! @code{gsl_permutation_invert(rank,p)}. The following function will print the rank of each element of the vector --- 231,235 ---- @noindent This can be computed directly from the function ! @code{gsl_permutation_inverse(rank,p)}. The following function will print the rank of each element of the vector *************** *** 246,250 **** gsl_sort_vector_index (perm, v); ! gsl_permutation_invert (rank, perm); for (i = 0; i < n; i++) --- 246,250 ---- gsl_sort_vector_index (perm, v); ! gsl_permutation_inverse (rank, perm); for (i = 0; i < n; i++) diff -x *.info* -rc2P gsl-1.2/doc/specfunc-coupling.texi gsl-1.3/doc/specfunc-coupling.texi *** gsl-1.2/doc/specfunc-coupling.texi Thu Oct 18 10:38:09 2001 --- gsl-1.3/doc/specfunc-coupling.texi Fri Dec 13 16:31:46 2002 *************** *** 58,63 **** \beforedisplay $$ ! \pmatrix{ja & jb & jc\cr ! jd & je & jf\cr} $$ \afterdisplay --- 58,63 ---- \beforedisplay $$ ! \left\{\matrix{ja & jb & jc\cr ! jd & je & jf\cr}\right\} $$ \afterdisplay *************** *** 65,70 **** @ifinfo @example ! (ja jb jc ! jd je jf) @end example @end ifinfo --- 65,70 ---- @ifinfo @example ! @{ja jb jc ! jd je jf@} @end example @end ifinfo *************** *** 86,92 **** \beforedisplay $$ ! \pmatrix{ja & jb & jc\cr ! jd & je & jf\cr ! jg & jh & ji\cr} $$ \afterdisplay --- 86,92 ---- \beforedisplay $$ ! \left\{\matrix{ja & jb & jc\cr ! jd & je & jf\cr ! jg & jh & ji\cr}\right\} $$ \afterdisplay *************** *** 94,100 **** @ifinfo @example ! (ja jb jc jd je jf ! jg jh ji) @end example @end ifinfo --- 94,100 ---- @ifinfo @example ! @{ja jb jc jd je jf ! jg jh ji@} @end example @end ifinfo diff -x *.info* -rc2P gsl-1.2/doc/specfunc-expint.texi gsl-1.3/doc/specfunc-expint.texi *** gsl-1.2/doc/specfunc-expint.texi Fri Oct 19 14:37:36 2001 --- gsl-1.3/doc/specfunc-expint.texi Sun Nov 3 15:03:02 2002 *************** *** 67,71 **** \beforedisplay $$ ! Ei(x) := PV(\int_{-x}^\infty dt \exp(-t)/t) $$ \afterdisplay --- 67,71 ---- \beforedisplay $$ ! Ei(x) := - PV(\int_{-x}^\infty dt \exp(-t)/t) $$ \afterdisplay *************** *** 73,77 **** @ifinfo @example ! Ei(x) := PV(\int_@{-x@}^\infty dt \exp(-t)/t) @end example @end ifinfo --- 73,77 ---- @ifinfo @example ! Ei(x) := - PV(\int_@{-x@}^\infty dt \exp(-t)/t) @end example @end ifinfo diff -x *.info* -rc2P gsl-1.2/doc/specfunc-gamma.texi gsl-1.3/doc/specfunc-gamma.texi *** gsl-1.2/doc/specfunc-gamma.texi Thu Oct 18 10:52:36 2001 --- gsl-1.3/doc/specfunc-gamma.texi Sun Dec 15 13:13:11 2002 *************** *** 205,210 **** @cindex incomplete Gamma function These routines compute the normalized incomplete Gamma Function ! @c{$P(a,x) = 1/\Gamma(a) \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{P(a,x) = 1/\Gamma(a) \int_x\infty dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} @math{x >= 0}. --- 205,210 ---- @cindex incomplete Gamma function These routines compute the normalized incomplete Gamma Function ! @c{$Q(a,x) = 1/\Gamma(a) \int_x^\infty dt\, t^{(a-1)} \exp(-t)$} ! @math{Q(a,x) = 1/\Gamma(a) \int_x\infty dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} @math{x >= 0}. *************** *** 219,223 **** @math{P(a,x) = 1/\Gamma(a) \int_0^x dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} ! @math{x >= 0}. @comment exceptions: GSL_EDOM @end deftypefun --- 219,226 ---- @math{P(a,x) = 1/\Gamma(a) \int_0^x dt t^@{a-1@} \exp(-t)} for @math{a > 0}, @c{$x \ge 0$} ! @math{x >= 0}. ! ! Note that Abramowitz & Stegun call @math{P(a,x)} the incomplete gamma ! function (section 6.5). @comment exceptions: GSL_EDOM @end deftypefun diff -x *.info* -rc2P gsl-1.2/doc/stamp-vti gsl-1.3/doc/stamp-vti *** gsl-1.2/doc/stamp-vti Fri Jul 19 20:51:30 2002 --- gsl-1.3/doc/stamp-vti Mon Dec 16 19:55:07 2002 *************** *** 1,3 **** ! @set UPDATED 15 July 2002 ! @set EDITION 1.2 ! @set VERSION 1.2 --- 1,3 ---- ! @set UPDATED 11 December 2002 ! @set EDITION 1.3 ! @set VERSION 1.3 diff -x *.info* -rc2P gsl-1.2/doc/statistics.texi gsl-1.3/doc/statistics.texi *** gsl-1.2/doc/statistics.texi Fri Mar 15 23:31:31 2002 --- gsl-1.3/doc/statistics.texi Sun Dec 15 13:21:42 2002 *************** *** 145,149 **** @deftypefn Statistics double gsl_stats_sd_with_fixed_mean (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) ! This function calculates the standard deviation of @var{data} for a a fixed population mean @var{mean}. The result is the square root of the corresponding variance function. --- 145,149 ---- @deftypefn Statistics double gsl_stats_sd_with_fixed_mean (const double @var{data}[], size_t @var{stride}, size_t @var{n}, double @var{mean}) ! This function calculates the standard deviation of @var{data} for a fixed population mean @var{mean}. The result is the square root of the corresponding variance function. diff -x *.info* -rc2P gsl-1.2/doc/vectors.texi gsl-1.3/doc/vectors.texi *** gsl-1.2/doc/vectors.texi Thu Jun 6 21:04:06 2002 --- gsl-1.3/doc/vectors.texi Sun Dec 15 13:22:00 2002 *************** *** 302,306 **** @code{GSL_RANGE_CHECK_OFF}. Provided your compiler supports inline functions the effect of turning off range checking is to replace calls ! to @code{gsl_vector_get(v,i)} by @code{v->data[i*v->stride]} and and calls to @code{gsl_vector_set(v,i,x)} by @code{v->data[i*v->stride]=x}. Thus there should be no performance penalty for using the range checking --- 302,306 ---- @code{GSL_RANGE_CHECK_OFF}. Provided your compiler supports inline functions the effect of turning off range checking is to replace calls ! to @code{gsl_vector_get(v,i)} by @code{v->data[i*v->stride]} and calls to @code{gsl_vector_set(v,i,x)} by @code{v->data[i*v->stride]=x}. Thus there should be no performance penalty for using the range checking diff -x *.info* -rc2P gsl-1.2/doc/version-ref.texi gsl-1.3/doc/version-ref.texi *** gsl-1.2/doc/version-ref.texi Mon Jul 15 19:03:32 2002 --- gsl-1.3/doc/version-ref.texi Mon Dec 16 19:55:07 2002 *************** *** 1,3 **** ! @set UPDATED 15 July 2002 ! @set EDITION 1.2 ! @set VERSION 1.2 --- 1,3 ---- ! @set UPDATED 11 December 2002 ! @set EDITION 1.3 ! @set VERSION 1.3 diff -x *.info* -rc2P gsl-1.2/eigen/ChangeLog gsl-1.3/eigen/ChangeLog *** gsl-1.2/eigen/ChangeLog Thu Aug 2 19:08:16 2001 --- gsl-1.3/eigen/ChangeLog Sat Nov 16 19:06:01 2002 *************** *** 1,2 **** --- 1,22 ---- + 2002-11-16 Brian Gough + + * symm.c (gsl_eigen_symm): prevent infinite loop for NaNs + + * herm.c (gsl_eigen_herm): prevent infinite loop for NaNs + + * symmv.c (gsl_eigen_symmv): prevent infinite loop for NaNs + + * hermv.c (gsl_eigen_hermv): prevent infinite loop for NaNs + + Fri Oct 18 17:58:35 2002 Brian Gough + + * test.c (main): added test cases to catch division by zero + (beta_r=0) in householdercomplex.c + + Wed Aug 28 19:05:54 2002 Brian Gough + + * Makefile.am (test_LDADD): fix link order to have libgslsys near + end + Thu Aug 2 18:17:58 2001 Brian Gough diff -x *.info* -rc2P gsl-1.2/eigen/Makefile.am gsl-1.3/eigen/Makefile.am *** gsl-1.2/eigen/Makefile.am Wed Jun 6 17:58:24 2001 --- gsl-1.3/eigen/Makefile.am Wed Aug 28 18:05:45 2002 *************** *** 11,15 **** TESTS = test ! test_LDADD = libgsleigen.la ../sys/libgslsys.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../utils/libutils.la test_SOURCES = test.c --- 11,15 ---- TESTS = test ! test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la test_SOURCES = test.c diff -x *.info* -rc2P gsl-1.2/eigen/Makefile.in gsl-1.3/eigen/Makefile.in *** gsl-1.2/eigen/Makefile.in Sat Jul 20 20:29:02 2002 --- gsl-1.3/eigen/Makefile.in Wed Dec 18 22:38:18 2002 *************** *** 97,101 **** TESTS = test ! test_LDADD = libgsleigen.la ../sys/libgslsys.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../utils/libutils.la test_SOURCES = test.c --- 97,101 ---- TESTS = test ! test_LDADD = libgsleigen.la ../test/libgsltest.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../utils/libutils.la test_SOURCES = test.c *************** *** 116,124 **** check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) ! test_DEPENDENCIES = libgsleigen.la ../sys/libgslsys.la \ ! ../test/libgsltest.la ../linalg/libgsllinalg.la ../blas/libgslblas.la \ ! ../cblas/libgslcblas.la ../matrix/libgslmatrix.la \ ! ../vector/libgslvector.la ../block/libgslblock.la \ ! ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la \ ../err/libgslerr.la ../utils/libutils.la test_LDFLAGS = --- 116,124 ---- check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) ! test_DEPENDENCIES = libgsleigen.la ../test/libgsltest.la \ ! ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la \ ! ../matrix/libgslmatrix.la ../vector/libgslvector.la \ ! ../block/libgslblock.la ../complex/libgslcomplex.la \ ! ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la \ ../err/libgslerr.la ../utils/libutils.la test_LDFLAGS = diff -x *.info* -rc2P gsl-1.2/eigen/herm.c gsl-1.3/eigen/herm.c *** gsl-1.2/eigen/herm.c Mon Nov 19 21:39:35 2001 --- gsl-1.3/eigen/herm.c Sat Nov 16 19:06:01 2002 *************** *** 134,138 **** while (b > 0) { ! if (sd[b - 1] == 0.0) { b--; --- 134,138 ---- while (b > 0) { ! if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1])) { b--; diff -x *.info* -rc2P gsl-1.2/eigen/hermv.c gsl-1.3/eigen/hermv.c *** gsl-1.2/eigen/hermv.c Mon Nov 19 21:39:35 2001 --- gsl-1.3/eigen/hermv.c Sat Nov 16 19:06:01 2002 *************** *** 174,178 **** while (b > 0) { ! if (sd[b - 1] == 0.0) { b--; --- 174,178 ---- while (b > 0) { ! if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1])) { b--; diff -x *.info* -rc2P gsl-1.2/eigen/symm.c gsl-1.3/eigen/symm.c *** gsl-1.2/eigen/symm.c Mon Nov 19 21:39:35 2001 --- gsl-1.3/eigen/symm.c Sat Nov 16 19:06:01 2002 *************** *** 134,138 **** while (b > 0) { ! if (sd[b - 1] == 0.0) { b--; --- 134,138 ---- while (b > 0) { ! if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1])) { b--; diff -x *.info* -rc2P gsl-1.2/eigen/symmv.c gsl-1.3/eigen/symmv.c *** gsl-1.2/eigen/symmv.c Mon Nov 19 21:39:34 2001 --- gsl-1.3/eigen/symmv.c Sat Nov 16 19:06:01 2002 *************** *** 151,155 **** while (b > 0) { ! if (sd[b - 1] == 0.0) { b--; --- 151,155 ---- while (b > 0) { ! if (sd[b - 1] == 0.0 || gsl_isnan(sd[b - 1])) { b--; diff -x *.info* -rc2P gsl-1.2/eigen/test.c gsl-1.3/eigen/test.c *** gsl-1.2/eigen/test.c Mon Nov 19 21:39:34 2001 --- gsl-1.3/eigen/test.c Fri Oct 18 16:58:30 2002 *************** *** 354,380 **** int main() { - gsl_matrix *rs10 = create_random_symm_matrix (10); - gsl_matrix_complex *rh10 = create_random_herm_matrix (10); - - double r[] = { 0, 0, -1, 0, - 0, 1, 0, 1, - -1, 0, 0, 0, - 0, 1, 0, 0 }; - - double c[] = { 0,0, 0,0, -1,0, 0,0, - 0,0, 1,0, 0,0, 1,0, - -1,0, 0,0, 0,0, 0,0, - 0,0, 1,0, 0,0, 0,0 }; - - gsl_matrix_view s4 = gsl_matrix_view_array (r, 4, 4); - gsl_matrix_complex_view h4 = gsl_matrix_complex_view_array (c, 4, 4); - gsl_ieee_env_setup (); ! test_eigen_symm("symm(4)", &s4.matrix); ! test_eigen_herm("herm(4)", &h4.matrix); ! ! test_eigen_symm("symm(10)", rs10); ! test_eigen_herm("herm(10)", rh10); /* gsl_matrix *h5 = create_hilbert_matrix (5); */ --- 354,412 ---- int main() { gsl_ieee_env_setup (); ! { ! double r[] = { 0, 0, -1, 0, ! 0, 1, 0, 1, ! -1, 0, 0, 0, ! 0, 1, 0, 0 }; ! gsl_matrix_view s4 = gsl_matrix_view_array (r, 4, 4); ! ! test_eigen_symm("symm(4)", &s4.matrix); ! } ! ! { ! double c[] = { 0,0, 0,0, -1,0, 0,0, ! 0,0, 1,0, 0,0, 1,0, ! -1,0, 0,0, 0,0, 0,0, ! 0,0, 1,0, 0,0, 0,0 }; ! ! gsl_matrix_complex_view h4 = gsl_matrix_complex_view_array (c, 4, 4); ! ! test_eigen_herm("herm(4)", &h4.matrix); ! } ! ! { ! double r[] = { 1, 0, 0, 0, ! 0, 2, 0, 0, ! 0, 0, 3, 0, ! 0, 0, 0, 4 }; ! gsl_matrix_view s4 = gsl_matrix_view_array (r, 4, 4); ! ! test_eigen_symm("symm(4) diag", &s4.matrix); ! } ! ! { ! double c[] = { 1,0, 0,0, 0,0, 0,0, ! 0,0, 2,0, 0,0, 0,0, ! 0,0, 0,0, 3,0, 0,0, ! 0,0, 0,0, 0,0, 4,0 }; ! ! gsl_matrix_complex_view h4 = gsl_matrix_complex_view_array (c, 4, 4); ! ! test_eigen_herm("herm(4) diag", &h4.matrix); ! } ! ! { ! gsl_matrix *rs10 = create_random_symm_matrix (10); ! test_eigen_symm("symm(10)", rs10); ! gsl_matrix_free (rs10); ! } ! ! { ! gsl_matrix_complex *rh10 = create_random_herm_matrix (10); ! test_eigen_herm("herm(10)", rh10); ! gsl_matrix_complex_free (rh10); ! } /* gsl_matrix *h5 = create_hilbert_matrix (5); */ *************** *** 382,388 **** /* test_invert_jacobi(); */ /* gsl_matrix_free (h5); */ - - gsl_matrix_complex_free (rh10); - gsl_matrix_free (rs10); exit (gsl_test_summary()); --- 414,417 ---- diff -x *.info* -rc2P gsl-1.2/err/Makefile.in gsl-1.3/err/Makefile.in *** gsl-1.2/err/Makefile.in Sat Jul 20 20:27:41 2002 --- gsl-1.3/err/Makefile.in Wed Dec 18 22:36:45 2002 *************** *** 123,127 **** HEADERS = $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in --- 123,127 ---- HEADERS = $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in TODO diff -x *.info* -rc2P gsl-1.2/err/TODO gsl-1.3/err/TODO *** gsl-1.2/err/TODO Thu Jan 1 00:00:00 1970 --- gsl-1.3/err/TODO Fri Jul 26 17:46:53 2002 *************** *** 0 **** --- 1,3 ---- + * Add a GSL_ERROR_MODE environment variable for choosing error + behavior at runtime (???). + diff -x *.info* -rc2P gsl-1.2/gsl.spec.in gsl-1.3/gsl.spec.in *** gsl-1.2/gsl.spec.in Sun Jul 14 21:01:00 2002 --- gsl-1.3/gsl.spec.in Fri Dec 13 16:56:18 2002 *************** *** 59,63 **** %files ! %doc %{name}-%{version}/{NEWS,ChangeLog,INSTALL,README,AUTHORS,THANKS} %doc /usr/info/gsl-ref* /usr/bin/gsl-config --- 59,63 ---- %files ! %doc %{name}-%{version}/{NEWS,ChangeLog,INSTALL,README,AUTHORS,THANKS,BUGS} %doc /usr/info/gsl-ref* /usr/bin/gsl-config diff -x *.info* -rc2P gsl-1.2/gsl_version.h gsl-1.3/gsl_version.h *** gsl-1.2/gsl_version.h Fri Jul 19 21:00:44 2002 --- gsl-1.3/gsl_version.h Wed Dec 18 22:33:59 2002 *************** *** 16,20 **** ! #define GSL_VERSION "1.2" GSL_VAR const char * gsl_version; --- 16,20 ---- ! #define GSL_VERSION "1.3" GSL_VAR const char * gsl_version; diff -x *.info* -rc2P gsl-1.2/histogram/ChangeLog gsl-1.3/histogram/ChangeLog *** gsl-1.2/histogram/ChangeLog Wed Mar 6 22:33:39 2002 --- gsl-1.3/histogram/ChangeLog Tue Aug 27 18:37:14 2002 *************** *** 1,2 **** --- 1,10 ---- + Tue Aug 27 19:36:43 2002 Brian Gough + + * test2d.c (main): changed test output format from %g to %e for + portability + + * test.c (main): changed test output format from %g to %e for + portability + Wed Mar 6 22:03:35 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/histogram/Makefile.in gsl-1.3/histogram/Makefile.in *** gsl-1.2/histogram/Makefile.in Sat Jul 20 20:30:25 2002 --- gsl-1.3/histogram/Makefile.in Wed Dec 18 22:40:04 2002 *************** *** 170,174 **** HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in --- 170,174 ---- HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in TODO diff -x *.info* -rc2P gsl-1.2/histogram/TODO gsl-1.3/histogram/TODO *** gsl-1.2/histogram/TODO Thu Jan 1 00:00:00 1970 --- gsl-1.3/histogram/TODO Fri Jul 26 17:46:53 2002 *************** *** 0 **** --- 1,3 ---- + * Implement N-d histograms (Simone Piccardi is + working on something here). + diff -x *.info* -rc2P gsl-1.2/histogram/test.c gsl-1.3/histogram/test.c *** gsl-1.2/histogram/test.c Fri Jan 18 21:42:19 2002 --- gsl-1.3/histogram/test.c Sun Dec 15 19:10:43 2002 *************** *** 64,68 **** }; ! gsl_test (status, "gsl_histogram_calloc_range creates range correctly"); } --- 64,68 ---- }; ! gsl_test (status, "gsl_histogram_calloc_range creates range"); } *************** *** 83,87 **** }; ! gsl_test (status, "gsl_histogram_set_range sets range correctly"); } --- 83,87 ---- }; ! gsl_test (status, "gsl_histogram_set_range sets range"); } *************** *** 103,107 **** }; ! gsl_test (status, "gsl_histogram_accumulate writes into array correctly"); } --- 103,107 ---- }; ! gsl_test (status, "gsl_histogram_accumulate writes into array"); } *************** *** 115,119 **** status = 1; }; ! gsl_test (status, "gsl_histogram_get reads from array correctly"); } --- 115,119 ---- status = 1; }; ! gsl_test (status, "gsl_histogram_get reads from array"); } *************** *** 132,136 **** status = 1; }; ! gsl_test (status, "gsl_histogram_memcpy copies bin ranges correctly"); } --- 132,136 ---- status = 1; }; ! gsl_test (status, "gsl_histogram_memcpy copies bin ranges"); } *************** *** 142,146 **** status = 1; }; ! gsl_test (status, "gsl_histogram_memcpy copies bin values correctly"); } --- 142,146 ---- status = 1; }; ! gsl_test (status, "gsl_histogram_memcpy copies bin values"); } *************** *** 156,160 **** status = 1; }; ! gsl_test (status, "gsl_histogram_clone copies bin ranges correctly"); } --- 156,160 ---- status = 1; }; ! gsl_test (status, "gsl_histogram_clone copies bin ranges"); } *************** *** 166,170 **** status = 1; }; ! gsl_test (status, "gsl_histogram_clone copies bin values correctly"); } --- 166,170 ---- status = 1; }; ! gsl_test (status, "gsl_histogram_clone copies bin values"); } *************** *** 179,183 **** status = 1; } ! gsl_test (status, "gsl_histogram_reset zeros array correctly"); } --- 179,183 ---- status = 1; } ! gsl_test (status, "gsl_histogram_reset zeros array"); } *************** *** 207,211 **** } ! gsl_test (status, "gsl_histogram_increment works correctly"); } --- 207,211 ---- } ! gsl_test (status, "gsl_histogram_increment increases bin value"); } *************** *** 223,227 **** } } ! gsl_test (status, "gsl_histogram_getbinrange works correctly"); } --- 223,227 ---- } } ! gsl_test (status, "gsl_histogram_getbinrange returns bin range"); } *************** *** 230,234 **** if (gsl_histogram_max (h) != N) status = 1; ! gsl_test (status, "gsl_histogram_max works correctly"); } --- 230,234 ---- if (gsl_histogram_max (h) != N) status = 1; ! gsl_test (status, "gsl_histogram_max returns maximum"); } *************** *** 237,241 **** if (gsl_histogram_min (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram_min works correctly"); } --- 237,241 ---- if (gsl_histogram_min (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram_min returns minimum"); } *************** *** 244,248 **** if (gsl_histogram_bins (h) != N) status = 1; ! gsl_test (status, "gsl_histogram_bins works correctly"); } --- 244,248 ---- if (gsl_histogram_bins (h) != N) status = 1; ! gsl_test (status, "gsl_histogram_bins returns number of bins"); } *************** *** 278,282 **** { double sum=gsl_histogram_sum (h); ! gsl_test(sum != N*27+((N-1)*N)/2, "gsl_histogram_sum sum all bin values"); } --- 278,282 ---- { double sum=gsl_histogram_sum (h); ! gsl_test(sum != N*27+((N-1)*N)/2, "gsl_histogram_sum sums all bin values"); } *************** *** 291,295 **** status = 1; } ! gsl_test (status, "gsl_histogram_add works correctly"); } --- 291,295 ---- status = 1; } ! gsl_test (status, "gsl_histogram_add histogram addition"); } *************** *** 304,308 **** status = 1; } ! gsl_test (status, "gsl_histogram_sub works correctly"); } --- 304,308 ---- status = 1; } ! gsl_test (status, "gsl_histogram_sub histogram subtraction"); } *************** *** 318,324 **** status = 1; } ! gsl_test (status, "gsl_histogram_mul works correctly"); } gsl_histogram_memcpy (h1, g); gsl_histogram_div (h1, h); --- 318,325 ---- status = 1; } ! gsl_test (status, "gsl_histogram_mul histogram multiplication"); } + gsl_histogram_memcpy (h1, g); gsl_histogram_div (h1, h); *************** *** 331,335 **** status = 1; } ! gsl_test (status, "gsl_histogram_div works correctly"); } --- 332,336 ---- status = 1; } ! gsl_test (status, "gsl_histogram_div histogram division"); } *************** *** 344,348 **** status = 1; } ! gsl_test (status, "gsl_histogram_scale works correctly"); } --- 345,349 ---- status = 1; } ! gsl_test (status, "gsl_histogram_scale histogram scaling"); } *************** *** 357,361 **** status = 1; } ! gsl_test (status, "gsl_histogram_shift works correctly"); } --- 358,362 ---- status = 1; } ! gsl_test (status, "gsl_histogram_shift histogram shift"); } *************** *** 414,418 **** } ! gsl_test (status, "gsl_histogram_find works correctly"); } --- 415,419 ---- } ! gsl_test (status, "gsl_histogram_find returns index"); } *************** *** 420,424 **** { FILE *f = fopen ("test.txt", "w"); ! gsl_histogram_fprintf (f, h, "%.19g", "%.19g"); fclose (f); } --- 421,425 ---- { FILE *f = fopen ("test.txt", "w"); ! gsl_histogram_fprintf (f, h, "%.19e", "%.19e"); fclose (f); } *************** *** 441,445 **** status = 1; ! gsl_test (status, "gsl_histogram_fprintf and fscanf work correctly"); gsl_histogram_free (hh); --- 442,446 ---- status = 1; ! gsl_test (status, "gsl_histogram_fprintf and fscanf"); gsl_histogram_free (hh); *************** *** 470,474 **** status = 1; ! gsl_test (status, "gsl_histogram_fwrite and fread work correctly"); gsl_histogram_free (hh); --- 471,475 ---- status = 1; ! gsl_test (status, "gsl_histogram_fwrite and fread"); gsl_histogram_free (hh); diff -x *.info* -rc2P gsl-1.2/histogram/test2d.c gsl-1.3/histogram/test2d.c *** gsl-1.2/histogram/test2d.c Sat Mar 9 16:01:24 2002 --- gsl-1.3/histogram/test2d.c Sun Dec 15 19:17:09 2002 *************** *** 84,88 **** gsl_test (status, ! "gsl_histogram2d_calloc_range creates xrange correctly"); } --- 84,88 ---- gsl_test (status, ! "gsl_histogram2d_calloc_range creates xrange"); } *************** *** 98,102 **** gsl_test (status, ! "gsl_histogram2d_calloc_range creates yrange correctly"); } --- 98,102 ---- gsl_test (status, ! "gsl_histogram2d_calloc_range creates yrange"); } *************** *** 122,126 **** }; ! gsl_test (status, "gsl_histogram2d_set_ranges sets xrange correctly"); } --- 122,126 ---- }; ! gsl_test (status, "gsl_histogram2d_set_ranges sets xrange"); } *************** *** 135,139 **** }; ! gsl_test (status, "gsl_histogram2d_set_ranges sets yrange correctly"); } --- 135,139 ---- }; ! gsl_test (status, "gsl_histogram2d_set_ranges sets yrange"); } *************** *** 164,168 **** } gsl_test (status, ! "gsl_histogram2d_accumulate writes into array correctly"); } --- 164,168 ---- } gsl_test (status, ! "gsl_histogram2d_accumulate writes into array"); } *************** *** 179,183 **** }; } ! gsl_test (status, "gsl_histogram2d_get reads from array correctly"); } --- 179,183 ---- }; } ! gsl_test (status, "gsl_histogram2d_get reads from array"); } *************** *** 201,205 **** status = 1; }; ! gsl_test (status, "gsl_histogram2d_memcpy copies bin xranges correctly"); } --- 201,205 ---- status = 1; }; ! gsl_test (status, "gsl_histogram2d_memcpy copies bin xranges"); } *************** *** 211,215 **** status = 1; }; ! gsl_test (status, "gsl_histogram2d_memcpy copies bin yranges correctly"); } --- 211,215 ---- status = 1; }; ! gsl_test (status, "gsl_histogram2d_memcpy copies bin yranges"); } *************** *** 225,229 **** } } ! gsl_test (status, "gsl_histogram2d_memcpy copies bin values correctly"); } --- 225,229 ---- } } ! gsl_test (status, "gsl_histogram2d_memcpy copies bin values"); } *************** *** 239,243 **** status = 1; }; ! gsl_test (status, "gsl_histogram2d_clone copies bin xranges correctly"); } --- 239,243 ---- status = 1; }; ! gsl_test (status, "gsl_histogram2d_clone copies bin xranges"); } *************** *** 249,253 **** status = 1; }; ! gsl_test (status, "gsl_histogram2d_clone copies bin yranges correctly"); } --- 249,253 ---- status = 1; }; ! gsl_test (status, "gsl_histogram2d_clone copies bin yranges"); } *************** *** 263,267 **** } } ! gsl_test (status, "gsl_histogram2d_clone copies bin values correctly"); } --- 263,267 ---- } } ! gsl_test (status, "gsl_histogram2d_clone copies bin values"); } *************** *** 277,281 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_reset zeros array correctly"); } --- 277,281 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_reset zeros array"); } *************** *** 310,314 **** } } ! gsl_test (status, "gsl_histogram2d_increment works correctly"); } --- 310,314 ---- } } ! gsl_test (status, "gsl_histogram2d_increment increases bin value"); } *************** *** 329,333 **** } gsl_test (status, ! "gsl_histogram2d_get_xlowerlimit and xupperlimit works correctly"); } --- 329,333 ---- } gsl_test (status, ! "gsl_histogram2d_get_xlowerlimit and xupperlimit"); } *************** *** 346,350 **** } gsl_test (status, ! "gsl_histogram2d_get_ylowerlimit and yupperlimit works correctly"); } --- 346,350 ---- } gsl_test (status, ! "gsl_histogram2d_get_ylowerlimit and yupperlimit"); } *************** *** 354,358 **** if (gsl_histogram2d_xmax (h) != M) status = 1; ! gsl_test (status, "gsl_histogram2d_xmax works correctly"); } --- 354,358 ---- if (gsl_histogram2d_xmax (h) != M) status = 1; ! gsl_test (status, "gsl_histogram2d_xmax"); } *************** *** 361,365 **** if (gsl_histogram2d_xmin (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram2d_xmin works correctly"); } --- 361,365 ---- if (gsl_histogram2d_xmin (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram2d_xmin"); } *************** *** 368,372 **** if (gsl_histogram2d_nx (h) != M) status = 1; ! gsl_test (status, "gsl_histogram2d_nx works correctly"); } --- 368,372 ---- if (gsl_histogram2d_nx (h) != M) status = 1; ! gsl_test (status, "gsl_histogram2d_nx"); } *************** *** 375,379 **** if (gsl_histogram2d_ymax (h) != N) status = 1; ! gsl_test (status, "gsl_histogram2d_ymax works correctly"); } --- 375,379 ---- if (gsl_histogram2d_ymax (h) != N) status = 1; ! gsl_test (status, "gsl_histogram2d_ymax"); } *************** *** 382,386 **** if (gsl_histogram2d_ymin (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram2d_ymin works correctly"); } --- 382,386 ---- if (gsl_histogram2d_ymin (h) != 0) status = 1; ! gsl_test (status, "gsl_histogram2d_ymin"); } *************** *** 389,393 **** if (gsl_histogram2d_ny (h) != N) status = 1; ! gsl_test (status, "gsl_histogram2d_ny works correctly"); } --- 389,393 ---- if (gsl_histogram2d_ny (h) != N) status = 1; ! gsl_test (status, "gsl_histogram2d_ny"); } *************** *** 430,434 **** 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"); } --- 430,434 ---- 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"); } *************** *** 452,458 **** 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); --- 452,458 ---- 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"); gsl_test_abs (ymean, expected_ymean, 100.0 * GSL_DBL_EPSILON, ! "gsl_histogram2d_ymean"); }; gsl_histogram2d_free (h3); *************** *** 494,507 **** 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); --- 494,507 ---- gsl_test_abs (gsl_histogram2d_xmean (h3), xmean, 2.0/M, ! "gsl_histogram2d_xmean histogram mean(x)"); gsl_test_abs (gsl_histogram2d_ymean (h3), ymean, 2.0/N, ! "gsl_histogram2d_ymean histogram mean(y)"); gsl_test_abs (xs, xsigma, 2.0/M, ! "gsl_histogram2d_xsigma histogram stdev(x)"); gsl_test_abs (ys, ysigma, 2.0/N, ! "gsl_histogram2d_ysigma histogram stdev(y)"); gsl_test_abs (gsl_histogram2d_cov (h3) / xs / ys, correl, 2.0/((M < N) ? M : N), ! "gsl_histogram2d_cov histogram covariance"); } gsl_histogram2d_free (h3); *************** *** 518,522 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_add works correctly"); } --- 518,522 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_add histogram addition"); } *************** *** 531,535 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_sub works correctly"); } --- 531,535 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_sub histogram subtraction"); } *************** *** 545,549 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_mul works correctly"); } --- 545,549 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_mul histogram multiplication"); } *************** *** 558,562 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_div works correctly"); } --- 558,562 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_div histogram division"); } *************** *** 571,575 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_scale works correctly"); } --- 571,575 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_scale histogram scaling"); } *************** *** 584,588 **** status = 1; } ! gsl_test (status, "gsl_histogram2d_shift works correctly"); } --- 584,588 ---- status = 1; } ! gsl_test (status, "gsl_histogram2d_shift histogram shift"); } *************** *** 646,655 **** } } ! gsl_test (status, "gsl_histogram2d_find works correctly"); } { FILE *f = fopen ("test.txt", "w"); ! gsl_histogram2d_fprintf (f, h, "%.19g", "%.19g"); fclose (f); } --- 646,655 ---- } } ! gsl_test (status, "gsl_histogram2d_find returns index"); } { FILE *f = fopen ("test.txt", "w"); ! gsl_histogram2d_fprintf (f, h, "%.19e", "%.19e"); fclose (f); } *************** *** 692,696 **** } ! gsl_test (status, "gsl_histogram2d_fprintf and fscanf work correctly"); gsl_histogram2d_free (hh); --- 692,696 ---- } ! gsl_test (status, "gsl_histogram2d_fprintf and fscanf"); gsl_histogram2d_free (hh); *************** *** 741,745 **** } ! gsl_test (status, "gsl_histogram2d_fwrite and fread work correctly"); gsl_histogram2d_free (hh); --- 741,745 ---- } ! gsl_test (status, "gsl_histogram2d_fwrite and fread"); gsl_histogram2d_free (hh); diff -x *.info* -rc2P gsl-1.2/ieee-utils/ChangeLog gsl-1.3/ieee-utils/ChangeLog *** gsl-1.2/ieee-utils/ChangeLog Sat May 11 21:31:27 2002 --- gsl-1.3/ieee-utils/ChangeLog Mon Aug 26 19:57:47 2002 *************** *** 1,2 **** --- 1,6 ---- + Mon Aug 26 20:57:29 2002 Brian Gough + + * test.c: use system values for FLT_MIN, FLT_MAX, DBL_MIN, DBL_MAX + Sat May 11 22:30:43 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/ieee-utils/test.c gsl-1.3/ieee-utils/test.c *** gsl-1.2/ieee-utils/test.c Sat May 11 21:30:18 2002 --- gsl-1.3/ieee-utils/test.c Mon Aug 26 19:57:04 2002 *************** *** 34,37 **** --- 34,53 ---- #endif + #ifndef FLT_MIN + #define FLT_MIN 1.17549435e-38f + #endif + + #ifndef FLT_MAX + #define FLT_MAX 3.40282347e+38f + #endif + + #ifndef DBL_MIN + #define DBL_MIN 2.2250738585072014e-308 + #endif + + #ifndef DBL_MAX + #define DBL_MAX 1.7976931348623157e+308 + #endif + int main (void) *************** *** 138,142 **** { ! float f = 1.17549435e-38f; /* FLT_MIN (float) */ const char mantissa[] = "00000000000000000000000"; gsl_ieee_float_rep r; --- 154,158 ---- { ! float f = FLT_MIN; const char mantissa[] = "00000000000000000000000"; gsl_ieee_float_rep r; *************** *** 152,156 **** { ! float f = 3.40282347e+38f; /* FLT_MAX */ const char mantissa[] = "11111111111111111111111"; --- 168,172 ---- { ! float f = FLT_MAX; const char mantissa[] = "11111111111111111111111"; *************** *** 169,173 **** #ifdef TEST_DENORMAL { ! float f = 1.17549435e-38f; /* FLT_MIN */ char mantissa[] = "10000000000000000000000"; --- 185,189 ---- #ifdef TEST_DENORMAL { ! float f = FLT_MIN; char mantissa[] = "10000000000000000000000"; *************** *** 196,200 **** { ! float f = 3.40282347e+38f; /* FLT_MAX */ const char mantissa[] = "00000000000000000000000"; --- 212,216 ---- { ! float f = FLT_MAX; const char mantissa[] = "00000000000000000000000"; *************** *** 214,218 **** { ! float f = 3.40282347e+38f; /* FLT_MAX */ const char mantissa[] = "00000000000000000000000"; --- 230,234 ---- { ! float f = FLT_MAX; const char mantissa[] = "00000000000000000000000"; *************** *** 351,355 **** { ! double d = 2.2250738585072014e-308; /* DBL_MIN */ const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; --- 367,371 ---- { ! double d = DBL_MIN; const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; *************** *** 367,371 **** { ! double d = 1.7976931348623157e+308; /* DBL_MAX */ const char mantissa[] = "1111111111111111111111111111111111111111111111111111"; --- 383,387 ---- { ! double d = DBL_MAX; const char mantissa[] = "1111111111111111111111111111111111111111111111111111"; *************** *** 384,388 **** #ifdef TEST_DENORMAL { ! double d = 2.2250738585072014e-308; /* DBL_MIN */ char mantissa[] = "1000000000000000000000000000000000000000000000000000"; --- 400,404 ---- #ifdef TEST_DENORMAL { ! double d = DBL_MIN; char mantissa[] = "1000000000000000000000000000000000000000000000000000"; *************** *** 411,415 **** { ! double d = 1.7976931348623157e+308; /* DBL_MAX */ const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; --- 427,431 ---- { ! double d = DBL_MAX; const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; *************** *** 429,433 **** { ! double d = 1.7976931348623157e+308; /* DBL_MAX */ const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; --- 445,449 ---- { ! double d = DBL_MAX; const char mantissa[] = "0000000000000000000000000000000000000000000000000000"; diff -x *.info* -rc2P gsl-1.2/interpolation/TODO gsl-1.3/interpolation/TODO *** gsl-1.2/interpolation/TODO Tue Nov 17 23:56:58 1998 --- gsl-1.3/interpolation/TODO Sun Dec 15 12:45:03 2002 *************** *** 1 **** --- 1,7 ---- 1. need to add a test for the akima splines + + 2. [DOCUMENTATION] From: Conrad Curry + + I would suggest adding more about cspline and Akima similiar to what + is given for 'polynomial', particularly under what conditions one + would be prefered over the other. diff -x *.info* -rc2P gsl-1.2/interpolation/cspline.c gsl-1.3/interpolation/cspline.c *** gsl-1.2/interpolation/cspline.c Sat Apr 27 19:50:59 2002 --- gsl-1.3/interpolation/cspline.c Wed Nov 6 23:01:57 2002 *************** *** 1,5 **** /* interpolation/cspline.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* interpolation/cspline.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 101,110 **** size_t i; size_t num_points = size; ! size_t max_index = num_points - 1; /* Engeln-Mullges + Uhlig "n" */ ! size_t sys_size = max_index - 1; /* linear system is sys_size x sys_size */ ! state->c[0] = 0.0; state->c[max_index] = 0.0; ! for (i = 0; i < sys_size; i++) { --- 101,110 ---- size_t i; size_t num_points = size; ! size_t max_index = num_points - 1; /* Engeln-Mullges + Uhlig "n" */ ! size_t sys_size = max_index - 1; /* linear system is sys_size x sys_size */ ! state->c[0] = 0.0; state->c[max_index] = 0.0; ! for (i = 0; i < sys_size; i++) { *************** *** 117,121 **** state->g[i] = 3.0 * (ydiff_ip1 / h_ip1 - ydiff_i / h_i); } ! { gsl_vector_view g_vec = gsl_vector_view_array(state->g, sys_size); --- 117,121 ---- state->g[i] = 3.0 * (ydiff_ip1 / h_ip1 - ydiff_i / h_i); } ! { gsl_vector_view g_vec = gsl_vector_view_array(state->g, sys_size); *************** *** 123,131 **** gsl_vector_view offdiag_vec = gsl_vector_view_array(state->offdiag, sys_size); gsl_vector_view solution_vec = gsl_vector_view_array ((state->c) + 1, sys_size); ! int status = gsl_linalg_solve_symm_tridiag(&diag_vec.vector, &offdiag_vec.vector, &g_vec.vector, ! &solution_vec.vector); return status; } --- 123,131 ---- gsl_vector_view offdiag_vec = gsl_vector_view_array(state->offdiag, sys_size); gsl_vector_view solution_vec = gsl_vector_view_array ((state->c) + 1, sys_size); ! int status = gsl_linalg_solve_symm_tridiag(&diag_vec.vector, &offdiag_vec.vector, &g_vec.vector, ! &solution_vec.vector); return status; } *************** *** 434,438 **** { "cspline", ! 2, &cspline_alloc, &cspline_init, --- 434,438 ---- { "cspline", ! 3, &cspline_alloc, &cspline_init, diff -x *.info* -rc2P gsl-1.2/linalg/ChangeLog gsl-1.3/linalg/ChangeLog *** gsl-1.2/linalg/ChangeLog Sun Jun 16 10:58:19 2002 --- gsl-1.3/linalg/ChangeLog Fri Oct 18 16:46:57 2002 *************** *** 1,2 **** --- 1,13 ---- + Fri Oct 18 17:46:30 2002 Brian Gough + + * householdercomplex.c (gsl_linalg_complex_householder_transform): + return tau = 0 to prevent division by zero for beta_r = 0 + + Mon Aug 12 20:12:55 2002 Brian Gough + + * bidiag.c (gsl_linalg_bidiag_unpack_B): fixed to copy + superdiagonal and not subdiagonal, as was incorrectly done + previously. + Sun Jun 16 11:57:00 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/linalg/bidiag.c gsl-1.3/linalg/bidiag.c *** gsl-1.2/linalg/bidiag.c Mon Nov 19 21:39:33 2001 --- gsl-1.3/linalg/bidiag.c Mon Aug 12 19:12:49 2002 *************** *** 352,356 **** for (i = 0; i < K - 1; i++) { ! double Aij = gsl_matrix_get (A, i+1, i); gsl_vector_set (superdiag, i, Aij); } --- 352,356 ---- for (i = 0; i < K - 1; i++) { ! double Aij = gsl_matrix_get (A, i, i+1); gsl_vector_set (superdiag, i, Aij); } diff -x *.info* -rc2P gsl-1.2/linalg/householdercomplex.c gsl-1.3/linalg/householdercomplex.c *** gsl-1.2/linalg/householdercomplex.c Mon Nov 19 21:39:33 2001 --- gsl-1.3/linalg/householdercomplex.c Thu Oct 17 15:16:05 2002 *************** *** 43,53 **** gsl_complex tau; - GSL_REAL(tau) = (beta_r - GSL_REAL(alpha)) / beta_r ; - GSL_IMAG(tau) = - GSL_IMAG(alpha) / beta_r ; ! { ! gsl_complex beta = gsl_complex_rect (beta_r, 0.0); ! gsl_vector_complex_set (v, 0, beta) ; ! } return tau; --- 43,62 ---- gsl_complex tau; ! if (beta_r == 0.0) ! { ! GSL_REAL(tau) = 0.0; ! GSL_IMAG(tau) = 0.0; ! } ! else ! { ! GSL_REAL(tau) = (beta_r - GSL_REAL(alpha)) / beta_r ; ! GSL_IMAG(tau) = - GSL_IMAG(alpha) / beta_r ; ! ! { ! gsl_complex beta = gsl_complex_rect (beta_r, 0.0); ! gsl_vector_complex_set (v, 0, beta) ; ! } ! } return tau; Only in gsl-1.2: ltconfig diff -x *.info* -rc2P gsl-1.2/ltmain.sh gsl-1.3/ltmain.sh *** gsl-1.2/ltmain.sh Thu Sep 6 08:39:15 2001 --- gsl-1.3/ltmain.sh Sun Dec 15 18:39:47 2002 *************** *** 50,54 **** # The name of this program. ! progname=`$echo "$0" | sed 's%^.*/%%'` modename="$progname" --- 50,54 ---- # The name of this program. ! progname=`$echo "$0" | ${SED} 's%^.*/%%'` modename="$progname" *************** *** 56,61 **** PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=1.4.1 ! TIMESTAMP=" (1.922.2.34 2001/09/03 01:22:13)" default_mode= --- 56,61 ---- PROGRAM=ltmain.sh PACKAGE=libtool ! VERSION=1.4.3 ! TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)" default_mode= *************** *** 68,75 **** # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' ! SP2NL='tr \040 \012' ! NL2SP='tr \015\012 \040\040' # NLS nuisances. --- 68,84 ---- # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' ! # test EBCDIC or ASCII ! case `echo A|od -x` in ! *[Cc]1*) # EBCDIC based system ! SP2NL="tr '\100' '\n'" ! NL2SP="tr '\r\n' '\100\100'" ! ;; ! *) # Assume ASCII based system ! SP2NL="tr '\040' '\012'" ! NL2SP="tr '\015\012' '\040\040'" ! ;; ! esac # NLS nuisances. *************** *** 85,88 **** --- 94,100 ---- fi + # Make sure IFS has a sensible default + : ${IFS=" "} + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then echo "$modename: not configured to build any kind of library" 1>&2 *************** *** 142,146 **** --config) ! sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --- 154,158 ---- --config) ! ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; *************** *** 175,178 **** --- 187,192 ---- --mode=*) mode="$optarg" ;; + --preserve-dup-deps) duplicate_deps="yes" ;; + --quiet | --silent) show=: *************** *** 213,217 **** if test -z "$mode"; then case $nonopt in ! *cc | *++ | gcc* | *-gcc*) mode=link for arg --- 227,231 ---- if test -z "$mode"; then case $nonopt in ! *cc | *++ | gcc* | *-gcc* | xlc*) mode=link for arg *************** *** 335,339 **** args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" --- 349,353 ---- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= ! save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" *************** *** 465,469 **** ;; esac ! if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default --- 479,483 ---- ;; esac ! if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default *************** *** 990,994 **** -L[A-Z][A-Z]*:*) case $with_gcc/$host in ! no/*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" --- 1004,1008 ---- -L[A-Z][A-Z]*:*) case $with_gcc/$host in ! no/*-*-irix* | no/*-*-nonstopux*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" *************** *** 1041,1053 **** test "X$arg" = "X-lc" && continue ;; ! *-*-openbsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac ! fi ! if test "X$arg" = "X-lc_r"; then case $host in ! *-*-openbsd*) # Do not include libc_r directly, use -pthread flag. continue --- 1055,1066 ---- test "X$arg" = "X-lc" && continue ;; ! *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; esac ! elif test "X$arg" = "X-lc_r"; then case $host in ! *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue *************** *** 1144,1148 **** args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" --- 1157,1161 ---- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= ! save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" *************** *** 1162,1166 **** args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" --- 1175,1179 ---- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= ! save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" *************** *** 1329,1335 **** # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do ! case "$libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac libs="$libs $deplib" done --- 1342,1350 ---- # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi libs="$libs $deplib" done *************** *** 1460,1467 **** if test "$deplibs_check_method" != pass_all; then echo ! echo "*** Warning: This library needs some functionality provided by $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." else echo --- 1475,1484 ---- if test "$deplibs_check_method" != pass_all; then echo ! echo "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have" ! echo "*** because the file extensions .$libext of this argument makes me believe" ! echo "*** that it is just a static archive that I should not used here." else echo *************** *** 1507,1511 **** # Check to see that this really is a libtool archive. ! if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 --- 1524,1528 ---- # Check to see that this really is a libtool archive. ! if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 *************** *** 1554,1560 **** for deplib in $dependency_libs; do deplibs="$deplib $deplibs" ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac tmp_libs="$tmp_libs $deplib" done --- 1571,1579 ---- for deplib in $dependency_libs; do deplibs="$deplib $deplibs" ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done *************** *** 1679,1685 **** newdependency_libs="$deplib $newdependency_libs" fi ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac tmp_libs="$tmp_libs $deplib" done # for deplib --- 1698,1706 ---- newdependency_libs="$deplib $newdependency_libs" fi ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done # for deplib *************** *** 1765,1770 **** # Make a new name for the extract_expsyms_cmds to use soroot="$soname" ! soname=`echo $soroot | sed -e 's/^.*\///'` ! newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now --- 1786,1791 ---- # Make a new name for the extract_expsyms_cmds to use soroot="$soname" ! soname=`echo $soroot | ${SED} -e 's/^.*\///'` ! newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now *************** *** 1772,1776 **** else $show "extracting exported symbol list from \`$soname'" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do --- 1793,1797 ---- else $show "extracting exported symbol list from \`$soname'" ! save_ifs="$IFS"; IFS='~' eval cmds=\"$extract_expsyms_cmds\" for cmd in $cmds; do *************** *** 1785,1789 **** if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do --- 1806,1810 ---- if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" ! save_ifs="$IFS"; IFS='~' eval cmds=\"$old_archive_from_expsyms_cmds\" for cmd in $cmds; do *************** *** 1925,1935 **** # that the program can be linked against the static library. echo ! echo "*** Warning: This library needs some functionality provided by $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then ! echo "*** Therefore, libtool will create a static module, that should work " ! echo "*** as long as the dlopening application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo --- 1946,1957 ---- # that the program can be linked against the static library. echo ! echo "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then ! echo "*** But as you try to build a module library, libtool will still create " ! echo "*** a static module, that should work as long as the dlopening application" ! echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo *************** *** 1980,1986 **** for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac tmp_libs="$tmp_libs $deplib" done --- 2002,2010 ---- for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" ! if test "X$duplicate_deps" = "Xyes" ; then ! case "$tmp_libs " in ! *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; ! esac ! fi tmp_libs="$tmp_libs $deplib" done *************** *** 2008,2012 **** path="-L$absdir/$objdir" else ! eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 --- 2032,2036 ---- path="-L$absdir/$objdir" else ! eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 *************** *** 2197,2201 **** # Parse the version information argument. ! IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" --- 2221,2225 ---- # Parse the version information argument. ! save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" *************** *** 2272,2278 **** ;; ! irix) major=`expr $current - $age + 1` ! verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. --- 2296,2307 ---- ;; ! irix | nonstopux) major=`expr $current - $age + 1` ! ! case $version_type in ! nonstopux) verstring_prefix=nonstopux ;; ! *) verstring_prefix=sgi ;; ! esac ! verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. *************** *** 2281,2285 **** iface=`expr $revision - $loop` loop=`expr $loop - 1` ! verstring="sgi$major.$iface:$verstring" done --- 2310,2314 ---- iface=`expr $revision - $loop` loop=`expr $loop - 1` ! verstring="$verstring_prefix$major.$iface:$verstring" done *************** *** 2295,2299 **** osf) ! major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" --- 2324,2328 ---- osf) ! major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" *************** *** 2387,2393 **** # Eliminate all temporary directories. for path in $notinst_path; do ! lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` ! deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` ! dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` done --- 2416,2422 ---- # Eliminate all temporary directories. for path in $notinst_path; do ! lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'` ! deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'` ! dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done *************** *** 2440,2444 **** # Don't link with libc until the a.out ld.so is fixed. ;; ! *-*-openbsd*) # Do not include libc due to us having libc/libc_r. ;; --- 2469,2473 ---- # Don't link with libc until the a.out ld.so is fixed. ;; ! *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. ;; *************** *** 2501,2508 **** droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." fi else --- 2530,2539 ---- droppeddeps=yes echo ! echo "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which I believe you do not have" ! echo "*** because a test_compile did reveal that the linker did not use it for" ! echo "*** its dynamic dependency list that programs get resolved with at runtime." fi else *************** *** 2511,2516 **** done else ! # Error occured in the first compile. Let's try to salvage the situation: ! # Compile a seperate program for each library. for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" --- 2542,2547 ---- done else ! # Error occured in the first compile. Let's try to salvage ! # the situation: Compile a separate program for each library. for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" *************** *** 2531,2538 **** droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." fi else --- 2562,2571 ---- droppeddeps=yes echo ! echo "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have" ! echo "*** because a test_compile did reveal that the linker did not use this one" ! echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi else *************** *** 2573,2577 **** potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do ! potliblink=`ls -ld $potlib | sed 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; --- 2606,2610 ---- potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do ! potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *************** *** 2580,2584 **** done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ ! | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" --- 2613,2617 ---- done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ ! | ${SED} 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" *************** *** 2591,2598 **** droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." fi else --- 2624,2638 ---- droppeddeps=yes echo ! echo "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have" ! echo "*** because I did check the linker path looking for a file starting" ! if test -z "$potlib" ; then ! echo "*** with $libname but no candidates were found. (...for file magic test)" ! else ! echo "*** with $libname and none of the candidates passed a file format test" ! echo "*** using a file magic. Last file checked: $potlib" ! fi fi else *************** *** 2613,2618 **** potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do if eval echo \"$potent_lib\" 2>/dev/null \ ! | sed 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" --- 2653,2659 ---- potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check below in file_magic test if eval echo \"$potent_lib\" 2>/dev/null \ ! | ${SED} 10q \ | egrep "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" *************** *** 2625,2632 **** droppeddeps=yes echo ! echo "*** Warning: This library needs some functionality provided by $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have." fi else --- 2666,2680 ---- droppeddeps=yes echo ! echo "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" ! echo "*** shared version of the library, which you do not appear to have" ! echo "*** because I did check the linker path looking for a file starting" ! if test -z "$potlib" ; then ! echo "*** with $libname but no candidates were found. (...for regex pattern test)" ! else ! echo "*** with $libname and none of the candidates passed a file format test" ! echo "*** using a regex pattern. Last file checked: $potlib" ! fi fi else *************** *** 2819,2823 **** $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 2867,2871 ---- $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 2893,2899 **** eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 2941,2958 ---- eval cmds=\"$archive_expsym_cmds\" else + save_deplibs="$deplibs" + for conv in $convenience; do + tmp_deplibs= + for test_deplib in $deplibs; do + if test "$test_deplib" != "$conv"; then + tmp_deplibs="$tmp_deplibs $test_deplib" + fi + done + deplibs="$tmp_deplibs" + done eval cmds=\"$archive_cmds\" + deplibs="$save_deplibs" fi ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 3023,3027 **** output="$obj" eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 3082,3086 ---- output="$obj" eval cmds=\"$reload_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 3059,3063 **** output="$libobj" eval cmds=\"$reload_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 3118,3122 ---- output="$libobj" eval cmds=\"$reload_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 3092,3096 **** prog) case $host in ! *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then --- 3151,3155 ---- prog) case $host in ! *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then *************** *** 3114,3117 **** --- 3173,3183 ---- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + ;; + esac ;; esac *************** *** 3280,3286 **** export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols ! $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else ! $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' --- 3346,3352 ---- export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols ! $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else ! $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' *************** *** 3290,3294 **** for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" ! name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" --- 3356,3360 ---- for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" ! name=`echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" *************** *** 3305,3309 **** # Try sorting and uniquifying the output. ! if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then : else --- 3371,3381 ---- # Try sorting and uniquifying the output. ! if grep -v "^: " < "$nlist" | ! if sort -k 3 /dev/null 2>&1; then ! sort -k 3 ! else ! sort +2 ! fi | ! uniq > "$nlist"S; then : else *************** *** 3527,3531 **** fi done ! relink_command="cd `pwd`; $relink_command" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi --- 3599,3603 ---- fi done ! relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi *************** *** 3547,3551 **** # a .exe suffix, so we strip it off here. case $output in ! *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions --- 3619,3623 ---- # a .exe suffix, so we strip it off here. case $output in ! *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions *************** *** 3571,3575 **** # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' --- 3643,3647 ---- # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. ! Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='$sed_quote_subst' *************** *** 3609,3613 **** # Follow symbolic links until we get to the real thisdir. ! file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` --- 3681,3685 ---- # Follow symbolic links until we get to the real thisdir. ! file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` *************** *** 3622,3626 **** file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ! file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` done --- 3694,3698 ---- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` ! file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done *************** *** 3636,3640 **** if test ! -f \"\$progdir/\$program\" || \\ ! { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then --- 3708,3712 ---- if test ! -f \"\$progdir/\$program\" || \\ ! { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then *************** *** 3682,3686 **** # Some systems cannot cope with colon-terminated $shlibpath_var ! # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` --- 3754,3758 ---- # Some systems cannot cope with colon-terminated $shlibpath_var ! # The second colon is a workaround for a bug in BeOS R4 ${SED} $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` *************** *** 3824,3828 **** eval cmds=\"$old_archive_cmds\" fi ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 3896,3900 ---- eval cmds=\"$old_archive_cmds\" fi ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 3857,3861 **** done # Quote the link command for shipping. ! relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` --- 3929,3933 ---- done # Quote the link command for shipping. ! relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` *************** *** 3874,3878 **** *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 --- 3946,3950 ---- *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 *************** *** 3888,3892 **** for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 --- 3960,3964 ---- for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 *************** *** 3899,3903 **** for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 --- 3971,3975 ---- for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` ! eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 *************** *** 4123,4127 **** *.la) # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 --- 4195,4199 ---- *.la) # Check to see that this really is a libtool archive. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 *************** *** 4199,4203 **** lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 4271,4275 ---- lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 4272,4276 **** # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then notinst_deplibs= relink_command= --- 4344,4356 ---- # Do a test to see if this is really a libtool program. ! case $host in ! *cygwin*|*mingw*) ! wrapper=`echo $file | ${SED} -e 's,.exe$,,'` ! ;; ! *) ! wrapper=$file ! ;; ! esac ! if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= *************** *** 4278,4288 **** # If there is no directory component, then add one. case $file in ! */* | *\\*) . $file ;; ! *) . ./$file ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then ! $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi --- 4358,4368 ---- # If there is no directory component, then add one. case $file in ! */* | *\\*) . $wrapper ;; ! *) . ./$wrapper ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then ! $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi *************** *** 4309,4314 **** # If there is no directory component, then add one. case $file in ! */* | *\\*) . $file ;; ! *) . ./$file ;; esac --- 4389,4394 ---- # If there is no directory component, then add one. case $file in ! */* | *\\*) . $wrapper ;; ! *) . ./$wrapper ;; esac *************** *** 4358,4362 **** ;; *:*.exe) ! destfile=`echo $destfile | sed -e 's,.exe$,,'` ;; esac --- 4438,4442 ---- ;; *:*.exe) ! destfile=`echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac *************** *** 4386,4390 **** # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 4466,4470 ---- # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 4424,4428 **** # Do each command in the finish commands. eval cmds=\"$finish_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 4504,4508 ---- # Do each command in the finish commands. eval cmds=\"$finish_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 4506,4510 **** *.la) # Check to see that this really is a libtool archive. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 --- 4586,4590 ---- *.la) # Check to see that this really is a libtool archive. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 *************** *** 4577,4581 **** *) # Do a test to see if this is really a libtool program. ! if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in --- 4657,4661 ---- *) # Do a test to see if this is really a libtool program. ! if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in *************** *** 4609,4613 **** # Now prepare to actually exec the command. ! exec_cmd='"$cmd"$args' else # Display what would be done. --- 4689,4693 ---- # Now prepare to actually exec the command. ! exec_cmd="\$cmd$args" else # Display what would be done. *************** *** 4686,4690 **** *.la) # Possibly a libtool archive, so verify it. ! if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name --- 4766,4770 ---- *.la) # Possibly a libtool archive, so verify it. ! if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name *************** *** 4700,4704 **** # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 4780,4784 ---- # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 4715,4719 **** # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" ! IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" --- 4795,4799 ---- # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" ! save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" *************** *** 4741,4745 **** # Do a test to see if this is a libtool program. if test $mode = clean && ! (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file --- 4821,4825 ---- # Do a test to see if this is a libtool program. if test $mode = clean && ! (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$file diff -x *.info* -rc2P gsl-1.2/matrix/ChangeLog gsl-1.3/matrix/ChangeLog *** gsl-1.2/matrix/ChangeLog Mon Jun 17 21:31:58 2002 --- gsl-1.3/matrix/ChangeLog Sun Nov 24 14:53:21 2002 *************** *** 1,2 **** --- 1,7 ---- + 2002-11-24 Brian Gough + + * Makefile.am: added libgslsys.a to link, to provide gsl_hypot for + complex division + Mon Jun 17 22:31:33 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/matrix/Makefile.am gsl-1.3/matrix/Makefile.am *** gsl-1.2/matrix/Makefile.am Sat May 11 21:29:24 2002 --- gsl-1.3/matrix/Makefile.am Sun Nov 24 14:53:21 2002 *************** *** 9,14 **** TESTS = test test_static ! test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ! test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_SOURCES = test.c --- 9,14 ---- TESTS = test test_static ! test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ! test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_SOURCES = test.c diff -x *.info* -rc2P gsl-1.2/matrix/Makefile.in gsl-1.3/matrix/Makefile.in *** gsl-1.2/matrix/Makefile.in Sat Jul 20 20:28:13 2002 --- gsl-1.3/matrix/Makefile.in Wed Dec 18 22:37:22 2002 *************** *** 95,100 **** TESTS = test test_static ! test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ! test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_SOURCES = test.c --- 95,100 ---- TESTS = test test_static ! test_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la ! test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_SOURCES = test.c *************** *** 125,134 **** test_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ ! ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_LDFLAGS = test_static_OBJECTS = test_static.$(OBJEXT) test_static_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ ! ../err/libgslerr.la ../test/libgsltest.la ../utils/libutils.la test_static_LDFLAGS = CFLAGS = @CFLAGS@ --- 125,136 ---- test_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ ! ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la \ ! ../utils/libutils.la test_LDFLAGS = test_static_OBJECTS = test_static.$(OBJEXT) test_static_DEPENDENCIES = libgslmatrix.la ../vector/libgslvector.la \ ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la \ ! ../sys/libgslsys.la ../err/libgslerr.la ../test/libgsltest.la \ ! ../utils/libutils.la test_static_LDFLAGS = CFLAGS = @CFLAGS@ diff -x *.info* -rc2P gsl-1.2/matrix/test_complex_source.c gsl-1.3/matrix/test_complex_source.c *** gsl-1.2/matrix/test_complex_source.c Mon Jun 17 21:35:52 2002 --- gsl-1.3/matrix/test_complex_source.c Sun Dec 15 19:17:09 2002 *************** *** 63,67 **** } ! gsl_test (status, NAME (gsl_matrix) "_set writes into array correctly"); status = 0; --- 63,67 ---- } ! gsl_test (status, NAME (gsl_matrix) "_set writes into array"); status = 0; *************** *** 77,81 **** } } ! gsl_test (status, NAME (gsl_matrix) "_get reads from array correctly"); FUNCTION (gsl_matrix, free) (m); /* free whatever is in m */ --- 77,81 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_get reads from array"); FUNCTION (gsl_matrix, free) (m); /* free whatever is in m */ *************** *** 130,134 **** } ! gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf work correctly"); fclose (f); --- 130,134 ---- } ! gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); fclose (f); *************** *** 186,190 **** } ! gsl_test (status, NAME (gsl_matrix) "_write and read work correctly"); fclose (f); --- 186,190 ---- } ! gsl_test (status, NAME (gsl_matrix) "_write and read"); fclose (f); *************** *** 339,343 **** } } ! gsl_test (status, NAME (gsl_matrix) "_add sums correctly"); } --- 339,343 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_add matrix addition"); } *************** *** 361,365 **** } } ! gsl_test (status, NAME (gsl_matrix) "_sub subtracts correctly"); } --- 361,365 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_sub matrix subtraction"); } *************** *** 395,399 **** } } ! gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplies correctly"); } --- 395,399 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplication"); } *************** *** 431,435 **** } } ! gsl_test (status, NAME (gsl_matrix) "_div_elements divides correctly"); } --- 431,435 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_div_elements division"); } diff -x *.info* -rc2P gsl-1.2/matrix/test_source.c gsl-1.3/matrix/test_source.c *** gsl-1.2/matrix/test_source.c Wed Apr 18 21:52:31 2001 --- gsl-1.3/matrix/test_source.c Sun Dec 15 19:17:09 2002 *************** *** 60,64 **** }; ! gsl_test (status, NAME (gsl_matrix) "_set writes into array correctly"); } --- 60,64 ---- }; ! gsl_test (status, NAME (gsl_matrix) "_set writes into array"); } *************** *** 75,79 **** }; }; ! gsl_test (status, NAME (gsl_matrix) "_get reads from array correctly"); } --- 75,79 ---- }; }; ! gsl_test (status, NAME (gsl_matrix) "_get reads from array"); } *************** *** 109,113 **** } ! gsl_test (status, NAME (gsl_matrix) "_get_row extracts row correctly"); } --- 109,113 ---- } ! gsl_test (status, NAME (gsl_matrix) "_get_row extracts row"); } *************** *** 216,220 **** } } ! gsl_test (status, NAME (gsl_matrix) "_add adds correctly"); } --- 216,220 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_add matrix addition"); } *************** *** 238,242 **** } } ! gsl_test (status, NAME (gsl_matrix) "_sub subtracts correctly"); } --- 238,242 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_sub matrix subtraction"); } *************** *** 259,263 **** } } ! gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplies correctly"); } --- 259,263 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_mul_elements multiplication"); } *************** *** 280,284 **** } } ! gsl_test (status, NAME (gsl_matrix) "_div_elements divides correctly"); } --- 280,284 ---- } } ! gsl_test (status, NAME (gsl_matrix) "_div_elements division"); } *************** *** 335,339 **** } ! gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf work correctly"); fclose (f); --- 335,339 ---- } ! gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); fclose (f); *************** *** 386,390 **** } ! gsl_test (status, NAME (gsl_matrix) "_write and read work correctly"); fclose (f); --- 386,390 ---- } ! gsl_test (status, NAME (gsl_matrix) "_write and read"); fclose (f); diff -x *.info* -rc2P gsl-1.2/multifit/ChangeLog gsl-1.3/multifit/ChangeLog *** gsl-1.2/multifit/ChangeLog Thu Feb 28 20:23:03 2002 --- gsl-1.3/multifit/ChangeLog Tue Nov 12 22:18:37 2002 *************** *** 1,2 **** --- 1,7 ---- + Tue Nov 12 22:18:14 2002 Brian Gough + + * lmder.c (lmder_alloc): use GSL_ERROR instead of GSL_ERROR_VAL + for internal alloc functions which return int + Thu Feb 28 20:15:33 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/multifit/lmder.c gsl-1.3/multifit/lmder.c *** gsl-1.2/multifit/lmder.c Wed Jun 20 12:10:39 2001 --- gsl-1.3/multifit/lmder.c Tue Nov 12 22:18:39 2002 *************** *** 86,90 **** if (q == 0) { ! GSL_ERROR_VAL ("failed to allocate space for q", GSL_ENOMEM, 0); } --- 86,90 ---- if (q == 0) { ! GSL_ERROR ("failed to allocate space for q", GSL_ENOMEM); } *************** *** 97,101 **** gsl_matrix_free (q); ! GSL_ERROR_VAL ("failed to allocate space for r", GSL_ENOMEM, 0); } --- 97,101 ---- gsl_matrix_free (q); ! GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); } *************** *** 109,113 **** gsl_matrix_free (r); ! GSL_ERROR_VAL ("failed to allocate space for tau", GSL_ENOMEM, 0); } --- 109,113 ---- gsl_matrix_free (r); ! GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); } *************** *** 122,126 **** gsl_vector_free (tau); ! GSL_ERROR_VAL ("failed to allocate space for diag", GSL_ENOMEM, 0); } --- 122,126 ---- gsl_vector_free (tau); ! GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); } *************** *** 136,140 **** gsl_vector_free (diag); ! GSL_ERROR_VAL ("failed to allocate space for qtf", GSL_ENOMEM, 0); } --- 136,140 ---- gsl_vector_free (diag); ! GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); } *************** *** 151,155 **** gsl_vector_free (qtf); ! GSL_ERROR_VAL ("failed to allocate space for newton", GSL_ENOMEM, 0); } --- 151,155 ---- gsl_vector_free (qtf); ! GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); } *************** *** 167,171 **** gsl_vector_free (newton); ! GSL_ERROR_VAL ("failed to allocate space for gradient", GSL_ENOMEM, 0); } --- 167,171 ---- gsl_vector_free (newton); ! GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); } *************** *** 184,188 **** gsl_vector_free (gradient); ! GSL_ERROR_VAL ("failed to allocate space for x_trial", GSL_ENOMEM, 0); } --- 184,188 ---- gsl_vector_free (gradient); ! GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); } *************** *** 202,206 **** gsl_vector_free (x_trial); ! GSL_ERROR_VAL ("failed to allocate space for f_trial", GSL_ENOMEM, 0); } --- 202,206 ---- gsl_vector_free (x_trial); ! GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); } *************** *** 221,225 **** gsl_vector_free (f_trial); ! GSL_ERROR_VAL ("failed to allocate space for df", GSL_ENOMEM, 0); } --- 221,225 ---- gsl_vector_free (f_trial); ! GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); } *************** *** 241,245 **** gsl_vector_free (df); ! GSL_ERROR_VAL ("failed to allocate space for sdiag", GSL_ENOMEM, 0); } --- 241,245 ---- gsl_vector_free (df); ! GSL_ERROR ("failed to allocate space for sdiag", GSL_ENOMEM); } *************** *** 263,267 **** gsl_vector_free (sdiag); ! GSL_ERROR_VAL ("failed to allocate space for rptdx", GSL_ENOMEM, 0); } --- 263,267 ---- gsl_vector_free (sdiag); ! GSL_ERROR ("failed to allocate space for rptdx", GSL_ENOMEM); } *************** *** 285,289 **** gsl_vector_free (rptdx); ! GSL_ERROR_VAL ("failed to allocate space for w", GSL_ENOMEM, 0); } --- 285,289 ---- gsl_vector_free (rptdx); ! GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); } *************** *** 308,312 **** gsl_vector_free (w); ! GSL_ERROR_VAL ("failed to allocate space for work1", GSL_ENOMEM, 0); } --- 308,312 ---- gsl_vector_free (w); ! GSL_ERROR ("failed to allocate space for work1", GSL_ENOMEM); } *************** *** 332,336 **** gsl_vector_free (work1); ! GSL_ERROR_VAL ("failed to allocate space for perm", GSL_ENOMEM, 0); } --- 332,336 ---- gsl_vector_free (work1); ! GSL_ERROR ("failed to allocate space for perm", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multimin/ChangeLog gsl-1.3/multimin/ChangeLog *** gsl-1.2/multimin/ChangeLog Sun Feb 10 21:58:13 2002 --- gsl-1.3/multimin/ChangeLog Sun Oct 6 21:46:25 2002 *************** *** 1,2 **** --- 1,7 ---- + Sun Sep 30 20:50:00 2002 Tuomo Keskitalo + + * Added Nelder-Mead Simplex optimization algorithm and + fminimizer structure. + Sun Feb 10 21:57:36 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/multimin/Makefile.am gsl-1.3/multimin/Makefile.am *** gsl-1.2/multimin/Makefile.am Thu Jan 17 19:50:28 2002 --- gsl-1.3/multimin/Makefile.am Sun Oct 6 21:46:25 2002 *************** *** 5,9 **** INCLUDES= -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c noinst_HEADERS = directional_minimize.c --- 5,9 ---- INCLUDES= -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c fminimizer.c simplex.c noinst_HEADERS = directional_minimize.c diff -x *.info* -rc2P gsl-1.2/multimin/Makefile.in gsl-1.3/multimin/Makefile.in *** gsl-1.2/multimin/Makefile.in Sat Jul 20 20:30:54 2002 --- gsl-1.3/multimin/Makefile.in Wed Dec 18 22:40:37 2002 *************** *** 91,95 **** INCLUDES = -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c noinst_HEADERS = directional_minimize.c --- 91,95 ---- INCLUDES = -I$(top_builddir) ! libgslmultimin_la_SOURCES = fdfminimizer.c steepest_descent.c conjugate_fr.c conjugate_pr.c convergence.c diff.c vector_bfgs.c fminimizer.c simplex.c noinst_HEADERS = directional_minimize.c *************** *** 114,118 **** libgslmultimin_la_LIBADD = libgslmultimin_la_OBJECTS = fdfminimizer.lo steepest_descent.lo \ ! conjugate_fr.lo conjugate_pr.lo convergence.lo diff.lo vector_bfgs.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) --- 114,119 ---- libgslmultimin_la_LIBADD = libgslmultimin_la_OBJECTS = fdfminimizer.lo steepest_descent.lo \ ! conjugate_fr.lo conjugate_pr.lo convergence.lo diff.lo vector_bfgs.lo \ ! fminimizer.lo simplex.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) test_funcs.$(OBJEXT) *************** *** 131,135 **** HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in --- 132,136 ---- HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in TODO diff -x *.info* -rc2P gsl-1.2/multimin/TODO gsl-1.3/multimin/TODO *** gsl-1.2/multimin/TODO Thu Jan 1 00:00:00 1970 --- gsl-1.3/multimin/TODO Fri Jul 26 17:46:53 2002 *************** *** 0 **** --- 1 ---- + * Check behavior of conjugate_fr in multimin -- the demo results look odd. diff -x *.info* -rc2P gsl-1.2/multimin/convergence.c gsl-1.3/multimin/convergence.c *** gsl-1.2/multimin/convergence.c Mon Oct 22 11:37:34 2001 --- gsl-1.3/multimin/convergence.c Sun Oct 6 21:46:25 2002 *************** *** 41,42 **** --- 41,58 ---- return GSL_CONTINUE; } + + int + gsl_multimin_test_size (const double size, double epsabs) + { + if (epsabs < 0.0) + { + GSL_ERROR ("absolute tolerance is negative", GSL_EBADTOL); + } + + if (size < epsabs) + { + return GSL_SUCCESS; + } + + return GSL_CONTINUE; + } diff -x *.info* -rc2P gsl-1.2/multimin/fminimizer.c gsl-1.3/multimin/fminimizer.c *** gsl-1.2/multimin/fminimizer.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/multimin/fminimizer.c Sat Oct 5 21:35:27 2002 *************** *** 0 **** --- 1,134 ---- + /* multimin/fminimizer.c + * + * Copyright (C) 2002 Tuomo Keskitalo, Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + #include + #include + #include + + gsl_multimin_fminimizer * + gsl_multimin_fminimizer_alloc (const gsl_multimin_fminimizer_type * T, + size_t n) + { + int status; + + gsl_multimin_fminimizer *s = + (gsl_multimin_fminimizer *) malloc (sizeof (gsl_multimin_fminimizer)); + + if (s == 0) + { + GSL_ERROR_VAL ("failed to allocate space for minimizer struct", + GSL_ENOMEM, 0); + } + + s->type = T; + + s->x = gsl_vector_calloc (n); + + if (s->x == 0) + { + free (s); + GSL_ERROR_VAL ("failed to allocate space for x", GSL_ENOMEM, 0); + } + + s->state = malloc (T->size); + + if (s->state == 0) + { + gsl_vector_free (s->x); + free (s); + GSL_ERROR_VAL ("failed to allocate space for minimizer state", + GSL_ENOMEM, 0); + } + + status = (T->alloc) (s->state, n); + + if (status != GSL_SUCCESS) + { + free (s->state); + gsl_vector_free (s->x); + free (s); + + GSL_ERROR_VAL ("failed to initialize minimizer state", GSL_ENOMEM, 0); + } + + return s; + } + + int + gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * s, + gsl_multimin_function * f, + const gsl_vector * x, + const gsl_vector * step_size) + { + if (s->x->size != f->n) + { + GSL_ERROR ("function incompatible with solver size", GSL_EBADLEN); + } + + if (x->size != f->n || step_size->size != f->n) + { + GSL_ERROR ("vector length not compatible with function", GSL_EBADLEN); + } + + s->f = f; + + gsl_vector_memcpy (s->x,x); + + return (s->type->set) (s->state, s->f, s->x, &(s->size), step_size); + } + + void + gsl_multimin_fminimizer_free (gsl_multimin_fminimizer * s) + { + (s->type->free) (s->state); + free (s->state); + gsl_vector_free (s->x); + free (s); + } + + int + gsl_multimin_fminimizer_iterate (gsl_multimin_fminimizer * s) + { + return (s->type->iterate) (s->state, s->f, s->x, &(s->size), &(s->fval)); + } + + const char * + gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * s) + { + return s->type->name; + } + + + gsl_vector * + gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * s) + { + return s->x; + } + + double + gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * s) + { + return s->fval; + } + + double + gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * s) + { + return s->size; + } diff -x *.info* -rc2P gsl-1.2/multimin/gsl_multimin.h gsl-1.3/multimin/gsl_multimin.h *** gsl-1.2/multimin/gsl_multimin.h Mon Jun 10 13:11:44 2002 --- gsl-1.3/multimin/gsl_multimin.h Wed Dec 11 15:44:02 2002 *************** *** 18,21 **** --- 18,24 ---- */ + /* Modified by Tuomo Keskitalo to include fminimizer and + Nelder Mead related lines */ + #ifndef __GSL_MULTIMIN_H__ #define __GSL_MULTIMIN_H__ *************** *** 73,76 **** --- 76,149 ---- const gsl_vector * x, gsl_vector * g); + /* minimization of non-differentiable functions */ + + typedef struct + { + const char *name; + size_t size; + int (*alloc) (void *state, size_t n); + int (*set) (void *state, gsl_multimin_function * f, + const gsl_vector * x, + double * size, + const gsl_vector * step_size); + int (*iterate) (void *state, gsl_multimin_function * f, + gsl_vector * x, + double * size, + double * fval); + void (*free) (void *state); + } + gsl_multimin_fminimizer_type; + + typedef struct + { + /* multi dimensional part */ + const gsl_multimin_fminimizer_type *type; + gsl_multimin_function *f; + + double fval; + gsl_vector * x; + + double size; + + void *state; + } + gsl_multimin_fminimizer; + + gsl_multimin_fminimizer * + gsl_multimin_fminimizer_alloc(const gsl_multimin_fminimizer_type *T, + size_t n); + + int + gsl_multimin_fminimizer_set (gsl_multimin_fminimizer * s, + gsl_multimin_function * f, + const gsl_vector * x, + const gsl_vector * step_size); + + void + gsl_multimin_fminimizer_free(gsl_multimin_fminimizer *s); + + const char * + gsl_multimin_fminimizer_name (const gsl_multimin_fminimizer * s); + + int + gsl_multimin_fminimizer_iterate(gsl_multimin_fminimizer *s); + + gsl_vector * + gsl_multimin_fminimizer_x (const gsl_multimin_fminimizer * s); + + double + gsl_multimin_fminimizer_minimum (const gsl_multimin_fminimizer * s); + + double + gsl_multimin_fminimizer_size (const gsl_multimin_fminimizer * s); + + /* Convergence test functions */ + + int + gsl_multimin_test_gradient(const gsl_vector * g,double epsabs); + + int + gsl_multimin_test_size(const double size ,double epsabs); + /* minimisation of differentiable functions */ *************** *** 128,134 **** gsl_multimin_fdfminimizer_restart(gsl_multimin_fdfminimizer *s); - int - gsl_multimin_test_gradient(const gsl_vector * g,double epsabs); - gsl_vector * gsl_multimin_fdfminimizer_x (gsl_multimin_fdfminimizer * s); --- 201,204 ---- *************** *** 147,150 **** --- 217,221 ---- GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_conjugate_fr; GSL_VAR const gsl_multimin_fdfminimizer_type *gsl_multimin_fdfminimizer_vector_bfgs; + GSL_VAR const gsl_multimin_fminimizer_type *gsl_multimin_fminimizer_nmsimplex; diff -x *.info* -rc2P gsl-1.2/multimin/simplex.c gsl-1.3/multimin/simplex.c *** gsl-1.2/multimin/simplex.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/multimin/simplex.c Sat Oct 5 21:35:27 2002 *************** *** 0 **** --- 1,409 ---- + /* multimin/simplex.c + * + * Copyright (C) 2002 Tuomo Keskitalo, Ivo Alxneit + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + /* + - Originally written by Tuomo Keskitalo + - Corrections to nmsimplex_iterate and other functions + by Ivo Alxneit + - Additional help by Brian Gough + */ + + /* The Simplex method of Nelder and Mead, + also known as the polytope search alogorithm. Ref: + Nelder, J.A., Mead, R., Computer Journal 7 (1965) pp. 308-313. + + This implementation uses n+1 corner points in the simplex. + */ + + #include + #include + #include + #include + + typedef struct + { + gsl_matrix *x1; /* simplex corner points */ + gsl_vector *y1; /* function value at corner points */ + gsl_vector *ws1; /* workspace 1 for algorithm */ + gsl_vector *ws2; /* workspace 2 for algorithm */ + } + nmsimplex_state_t; + + static double + nmsimplex_move_corner (const double coeff, const nmsimplex_state_t * state, + size_t corner, gsl_vector * xc, + const gsl_multimin_function * f) + { + /* moves a simplex corner scaled by coeff (negative value represents + mirroring by the middle point of the "other" corner points) + and gives new corner in xc and function value at xc as a + return value + */ + + gsl_matrix *x1 = state->x1; + + size_t i, j; + double newval, mp; + + if (x1->size1 < 2) + { + GSL_ERROR ("simplex cannot have less than two corners!", GSL_EFAILED); + } + + for (j = 0; j < x1->size2; j++) + { + mp = 0.0; + for (i = 0; i < x1->size1; i++) + { + if (i != corner) + { + mp += (gsl_matrix_get (x1, i, j)); + } + } + mp /= (double) (x1->size1 - 1); + newval = mp - coeff * (mp - gsl_matrix_get (x1, corner, j)); + gsl_vector_set (xc, j, newval); + } + + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + + return newval; + } + + static int + nmsimplex_contract_by_best (nmsimplex_state_t * state, size_t best, + gsl_vector * xc, gsl_multimin_function * f) + { + + /* Function contracts the simplex in respect to + best valued corner. That is, all corners besides the + best corner are moved. */ + + /* the xc vector is simply work space here */ + + gsl_matrix *x1 = state->x1; + gsl_vector *y1 = state->y1; + + size_t i, j; + double newval; + + for (i = 0; i < x1->size1; i++) + { + if (i != best) + { + for (j = 0; j < x1->size2; j++) + { + newval = 0.5 * (gsl_matrix_get (x1, i, j) + + gsl_matrix_get (x1, best, j)); + gsl_matrix_set (x1, i, j, newval); + } + + /* evaluate function in the new point */ + + gsl_matrix_get_row (xc, x1, i); + newval = GSL_MULTIMIN_FN_EVAL (f, xc); + gsl_vector_set (y1, i, newval); + } + } + + return GSL_SUCCESS; + } + + static int + nmsimplex_calc_center (const nmsimplex_state_t * state, gsl_vector * mp) + { + /* calculates the center of the simplex to mp */ + + gsl_matrix *x1 = state->x1; + + size_t i, j; + double val; + + for (j = 0; j < x1->size2; j++) + { + val = 0.0; + for (i = 0; i < x1->size1; i++) + { + val += gsl_matrix_get (x1, i, j); + } + val /= x1->size1; + gsl_vector_set (mp, j, val); + } + + return GSL_SUCCESS; + } + + double + gsl_multimin_nmsimplex_size (nmsimplex_state_t * state) + { + /* calculates simplex size as average sum of length of vectors + from simplex center to corner points: + + ( sum ( || y - y_middlepoint || ) ) / n + */ + + gsl_vector *s = state->ws1; + gsl_vector *mp = state->ws2; + + gsl_matrix *x1 = state->x1; + size_t i; + + double ss = 0.0; + + /* Calculate middle point */ + nmsimplex_calc_center (state, mp); + + for (i = 0; i < x1->size1; i++) + { + gsl_matrix_get_row (s, x1, i); + gsl_blas_daxpy (-1.0, mp, s); + ss += gsl_blas_dnrm2 (s); + } + + return ss / (double) (x1->size1); + } + + static int + nmsimplex_alloc (void *vstate, size_t n) + { + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + state->x1 = gsl_matrix_alloc (n + 1, n); + + if (state->x1 == NULL) + { + GSL_ERROR ("failed to allocate space for x1", GSL_ENOMEM); + } + + state->y1 = gsl_vector_alloc (n + 1); + + if (state->y1 == NULL) + { + GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); + } + + state->ws1 = gsl_vector_alloc (n); + + if (state->ws1 == NULL) + { + GSL_ERROR ("failed to allocate space for ws1", GSL_ENOMEM); + } + + state->ws2 = gsl_vector_alloc (n); + + if (state->ws2 == NULL) + { + GSL_ERROR ("failed to allocate space for ws2", GSL_ENOMEM); + } + + return GSL_SUCCESS; + } + + static int + nmsimplex_set (void *vstate, gsl_multimin_function * f, + const gsl_vector * x, + double *size, const gsl_vector * step_size) + { + int i, status; + double val; + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_vector *xtemp = state->ws1; + + /* first point is the original x0 */ + + val = GSL_MULTIMIN_FN_EVAL (f, x); + gsl_matrix_set_row (state->x1, 0, x); + gsl_vector_set (state->y1, 0, val); + + /* following points are initialized to x0 + step_size */ + + for (i = 0; i < x->size; i++) + { + status = gsl_vector_memcpy (xtemp, x); + + if (status != 0) + { + GSL_ERROR ("vector memcopy failed", GSL_EFAILED); + } + + val = gsl_vector_get (xtemp, i) + gsl_vector_get (step_size, i); + gsl_vector_set (xtemp, i, val); + val = GSL_MULTIMIN_FN_EVAL (f, xtemp); + gsl_matrix_set_row (state->x1, i + 1, xtemp); + gsl_vector_set (state->y1, i + 1, val); + } + + /* Initialize simplex size */ + + *size = gsl_multimin_nmsimplex_size (state); + + return GSL_SUCCESS; + } + + static void + nmsimplex_free (void *vstate) + { + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + gsl_matrix_free (state->x1); + gsl_vector_free (state->y1); + gsl_vector_free (state->ws1); + gsl_vector_free (state->ws2); + } + + static int + nmsimplex_iterate (void *vstate, gsl_multimin_function * f, + gsl_vector * x, double *size, double *fval) + { + + /* Simplex iteration tries to minimize function f value */ + /* Includes corrections from Ivo Alxneit */ + + nmsimplex_state_t *state = (nmsimplex_state_t *) vstate; + + /* xc and xc2 vectors store tried corner point coordinates */ + + gsl_vector *xc = state->ws1; + gsl_vector *xc2 = state->ws2; + gsl_vector *y1 = state->y1; + gsl_matrix *x1 = state->x1; + + size_t n = y1->size; + size_t i; + size_t hi = 0, s_hi = 0, lo = 0; + double dhi, dlo; + int status; + double val, val2; + + /* get index of highest, second highest and lowest point */ + + dhi = gsl_vector_get (y1, 0); + dlo = dhi; + + for (i = 1; i < n; i++) + { + val = (gsl_vector_get (y1, i)); + if (val < dlo) + { + dlo = val; + lo = i; + } + else if (val > dhi) + { + s_hi = hi; + dhi = val; + hi = i; + } + } + + /* reflect the highest value */ + + val = nmsimplex_move_corner (-1.0, state, hi, xc, f); + + if (val < gsl_vector_get (y1, lo)) + { + + /* reflected point becomes lowest point, try expansion */ + + val2 = nmsimplex_move_corner (-2.0, state, hi, xc2, f); + + if (val2 < gsl_vector_get (y1, lo)) + { + gsl_matrix_set_row (x1, hi, xc2); + gsl_vector_set (y1, hi, val2); + } + else + { + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + } + + /* reflection does not improve things enough */ + + else if (val > gsl_vector_get (y1, s_hi)) + { + if (val <= gsl_vector_get (y1, hi)) + { + + /* if trial point is better than highest point, replace + highest point */ + + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + + /* try one dimensional contraction */ + + val2 = nmsimplex_move_corner (0.5, state, hi, xc2, f); + + if (val2 <= gsl_vector_get (y1, hi)) + { + gsl_matrix_set_row (state->x1, hi, xc2); + gsl_vector_set (y1, hi, val2); + } + + else + { + + /* contract the whole simplex in respect to the best point */ + + status = nmsimplex_contract_by_best (state, lo, xc, f); + if (status != 0) + { + GSL_ERROR ("nmsimplex_contract_by_best failed", GSL_EFAILED); + } + } + } + else + { + + /* trial point is better than second highest point. + Replace highest point by it */ + + gsl_matrix_set_row (x1, hi, xc); + gsl_vector_set (y1, hi, val); + } + + /* return lowest point of simplex as x */ + + lo = gsl_vector_min_index (y1); + gsl_matrix_get_row (x, x1, lo); + *fval = gsl_vector_get (y1, lo); + + /* Update simplex size */ + + *size = gsl_multimin_nmsimplex_size (state); + + return GSL_SUCCESS; + } + + static const gsl_multimin_fminimizer_type nmsimplex_type = + { "nmsimplex", /* name */ + sizeof (nmsimplex_state_t), + &nmsimplex_alloc, + &nmsimplex_set, + &nmsimplex_iterate, + &nmsimplex_free + }; + + const gsl_multimin_fminimizer_type + * gsl_multimin_fminimizer_nmsimplex = &nmsimplex_type; diff -x *.info* -rc2P gsl-1.2/multimin/test.c gsl-1.3/multimin/test.c *** gsl-1.2/multimin/test.c Thu Oct 25 11:21:29 2001 --- gsl-1.3/multimin/test.c Sun Oct 6 21:46:26 2002 *************** *** 18,21 **** --- 18,23 ---- */ + /* Modified by Tuomo Keskitalo to add Nelder Mead Simplex test suite */ + #include #include *************** *** 28,33 **** int ! test_fdf(const char * desc, gsl_multimin_function_fdf *f, initpt_function initpt, const gsl_multimin_fdfminimizer_type *T); int --- 30,38 ---- int ! test_fdf(const char * desc, gsl_multimin_function_fdf *f, ! initpt_function initpt, const gsl_multimin_fdfminimizer_type *T); + int + test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt); int *************** *** 55,58 **** --- 60,67 ---- } + test_f("Roth", &roth_fmin, roth_initpt); + test_f("Wood", &wood_fmin, wood_initpt); + test_f("Rosenbrock", &rosenbrock_fmin, rosenbrock_initpt); + T = fdfminimizers; *************** *** 120,123 **** --- 129,190 ---- gsl_multimin_fdfminimizer_free(s); gsl_vector_free(x); + + return status; + } + + int + test_f(const char * desc, gsl_multimin_function *f, initpt_function initpt) + { + /* currently this function tests only nmsimplex */ + + int status, i; + size_t iter = 0; + const gsl_multimin_fminimizer_type *T = gsl_multimin_fminimizer_nmsimplex; + + gsl_vector *x = gsl_vector_alloc (f->n); + + gsl_vector *step_size = gsl_vector_alloc (f->n); + + gsl_multimin_fminimizer *s; + + (*initpt) (x); + + for (i = 0; i < f->n; i++) + gsl_vector_set (step_size, i, 1); + + s = gsl_multimin_fminimizer_alloc(T, f->n); + + gsl_multimin_fminimizer_set (s, f, x, step_size); + + #ifdef DEBUG + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); + #endif + + do + { + iter++; + status = gsl_multimin_fminimizer_iterate(s); + + #ifdef DEBUG + printf("%i: \n",iter); + printf("x "); gsl_vector_fprintf (stdout, s->x, "%g"); + printf("f(x) %g\n", gsl_multimin_fminimizer_minimum (s)); + printf("size: %g\n", gsl_multimin_fminimizer_size (s)); + printf("\n"); + #endif + + status = gsl_multimin_test_size (gsl_multimin_fminimizer_size (s), + 1e-3); + } + while (iter < 5000 && status == GSL_CONTINUE); + + status |= (fabs(s->fval) > 1e-5); + + gsl_test(status, "%s, on %s: %i iterations, f(x)=%g", + gsl_multimin_fminimizer_name(s),desc, iter, s->fval); + + gsl_multimin_fminimizer_free(s); + gsl_vector_free(x); + gsl_vector_free(step_size); return status; diff -x *.info* -rc2P gsl-1.2/multimin/test_funcs.c gsl-1.3/multimin/test_funcs.c *** gsl-1.2/multimin/test_funcs.c Thu Oct 18 20:20:52 2001 --- gsl-1.3/multimin/test_funcs.c Sun Oct 6 21:46:26 2002 *************** *** 29,32 **** --- 29,36 ---- 2, 0}; + gsl_multimin_function rosenbrock_fmin = + {&rosenbrock_f, + 2, 0}; + void rosenbrock_initpt (gsl_vector * x) { *************** *** 74,77 **** --- 78,85 ---- 2, 0}; + gsl_multimin_function roth_fmin = + {&roth_f, + 2, 0}; + void roth_initpt (gsl_vector * x) { *************** *** 114,117 **** --- 122,129 ---- &wood_df, &wood_fdf, + 4, 0}; + + gsl_multimin_function wood_fmin = + {&wood_f, 4, 0}; diff -x *.info* -rc2P gsl-1.2/multimin/test_funcs.h gsl-1.3/multimin/test_funcs.h *** gsl-1.2/multimin/test_funcs.h Thu Oct 18 20:20:52 2001 --- gsl-1.3/multimin/test_funcs.h Sun Oct 6 21:46:26 2002 *************** *** 22,25 **** --- 22,26 ---- extern gsl_multimin_function_fdf rosenbrock; + extern gsl_multimin_function rosenbrock_fmin; void rosenbrock_initpt (gsl_vector * x); double rosenbrock_f (const gsl_vector * x, void *params); *************** *** 28,31 **** --- 29,33 ---- extern gsl_multimin_function_fdf wood; + extern gsl_multimin_function wood_fmin; void wood_initpt (gsl_vector * x); double wood_f (const gsl_vector * x, void *params); *************** *** 34,37 **** --- 36,40 ---- extern gsl_multimin_function_fdf roth; + extern gsl_multimin_function roth_fmin; void roth_initpt (gsl_vector * x); double roth_f (const gsl_vector * x, void *params); diff -x *.info* -rc2P gsl-1.2/multiroots/ChangeLog gsl-1.3/multiroots/ChangeLog *** gsl-1.2/multiroots/ChangeLog Wed May 1 20:41:29 2002 --- gsl-1.3/multiroots/ChangeLog Tue Nov 12 22:28:33 2002 *************** *** 1,2 **** --- 1,16 ---- + Tue Nov 12 22:26:40 2002 Brian Gough + + * newton.c (newton_alloc): return error code, not null + + * hybridj.c (hybridj_alloc): return error code, not null + + * hybrid.c (hybrid_alloc): return error code, not null + + * gnewton.c (gnewton_alloc): return error code, not null + + * dnewton.c (dnewton_alloc): return error code, not null + + * broyden.c (broyden_alloc): return error code, not null + Wed May 1 21:40:55 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/multiroots/broyden.c gsl-1.3/multiroots/broyden.c *** gsl-1.2/multiroots/broyden.c Wed Apr 18 21:52:33 2001 --- gsl-1.3/multiroots/broyden.c Tue Nov 12 22:21:59 2002 *************** *** 75,79 **** if (m == 0) { ! GSL_ERROR_VAL ("failed to allocate space for lu", GSL_ENOMEM, 0); } --- 75,79 ---- if (m == 0) { ! GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); } *************** *** 86,90 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for permutation", GSL_ENOMEM, 0); } --- 86,90 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); } *************** *** 98,102 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for d", GSL_ENOMEM, 0); } --- 98,102 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); } *************** *** 111,115 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for v", GSL_ENOMEM, 0); } --- 111,115 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); } *************** *** 125,129 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for w", GSL_ENOMEM, 0); } --- 125,129 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); } *************** *** 140,144 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for y", GSL_ENOMEM, 0); } --- 140,144 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for y", GSL_ENOMEM); } *************** *** 156,160 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for fnew", GSL_ENOMEM, 0); } --- 156,160 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for fnew", GSL_ENOMEM); } *************** *** 173,177 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for x_trial", GSL_ENOMEM, 0); } --- 173,177 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); } *************** *** 191,195 **** gsl_matrix_free (m); ! GSL_ERROR_VAL ("failed to allocate space for p", GSL_ENOMEM, 0); } --- 191,195 ---- gsl_matrix_free (m); ! GSL_ERROR ("failed to allocate space for p", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multiroots/dnewton.c gsl-1.3/multiroots/dnewton.c *** gsl-1.2/multiroots/dnewton.c Thu Jan 10 19:24:48 2002 --- gsl-1.3/multiroots/dnewton.c Tue Nov 12 22:22:25 2002 *************** *** 62,66 **** if (m == 0) { ! GSL_ERROR_VAL ("failed to allocate space for lu", GSL_ENOMEM, 0); } --- 62,66 ---- if (m == 0) { ! GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); } *************** *** 73,77 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for permutation", GSL_ENOMEM, 0); } --- 73,77 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); } *************** *** 85,89 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for d", GSL_ENOMEM, 0); } --- 85,89 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multiroots/gnewton.c gsl-1.3/multiroots/gnewton.c *** gsl-1.2/multiroots/gnewton.c Wed Apr 18 21:52:33 2001 --- gsl-1.3/multiroots/gnewton.c Tue Nov 12 22:22:54 2002 *************** *** 62,66 **** if (m == 0) { ! GSL_ERROR_VAL ("failed to allocate space for lu", GSL_ENOMEM, 0); } --- 62,66 ---- if (m == 0) { ! GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); } *************** *** 73,77 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for permutation", GSL_ENOMEM, 0); } --- 73,77 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); } *************** *** 85,89 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for d", GSL_ENOMEM, 0); } --- 85,89 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for d", GSL_ENOMEM); } *************** *** 98,102 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for x_trial", GSL_ENOMEM, 0); } --- 98,102 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multiroots/hybrid.c gsl-1.3/multiroots/hybrid.c *** gsl-1.2/multiroots/hybrid.c Sat Jan 26 17:11:19 2002 --- gsl-1.3/multiroots/hybrid.c Tue Nov 12 22:24:09 2002 *************** *** 86,90 **** if (J == 0) { ! GSL_ERROR_VAL ("failed to allocate space for J", GSL_ENOMEM, 0); } --- 86,90 ---- if (J == 0) { ! GSL_ERROR ("failed to allocate space for J", GSL_ENOMEM); } *************** *** 97,101 **** gsl_matrix_free (J); ! GSL_ERROR_VAL ("failed to allocate space for q", GSL_ENOMEM, 0); } --- 97,101 ---- gsl_matrix_free (J); ! GSL_ERROR ("failed to allocate space for q", GSL_ENOMEM); } *************** *** 109,113 **** gsl_matrix_free (q); ! GSL_ERROR_VAL ("failed to allocate space for r", GSL_ENOMEM, 0); } --- 109,113 ---- gsl_matrix_free (q); ! GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); } *************** *** 122,126 **** gsl_matrix_free (r); ! GSL_ERROR_VAL ("failed to allocate space for tau", GSL_ENOMEM, 0); } --- 122,126 ---- gsl_matrix_free (r); ! GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); } *************** *** 136,140 **** gsl_vector_free (tau); ! GSL_ERROR_VAL ("failed to allocate space for diag", GSL_ENOMEM, 0); } --- 136,140 ---- gsl_vector_free (tau); ! GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); } *************** *** 151,155 **** gsl_vector_free (diag); ! GSL_ERROR_VAL ("failed to allocate space for qtf", GSL_ENOMEM, 0); } --- 151,155 ---- gsl_vector_free (diag); ! GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); } *************** *** 167,171 **** gsl_vector_free (qtf); ! GSL_ERROR_VAL ("failed to allocate space for newton", GSL_ENOMEM, 0); } --- 167,171 ---- gsl_vector_free (qtf); ! GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); } *************** *** 184,188 **** gsl_vector_free (newton); ! GSL_ERROR_VAL ("failed to allocate space for gradient", GSL_ENOMEM, 0); } --- 184,188 ---- gsl_vector_free (newton); ! GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); } *************** *** 202,206 **** gsl_vector_free (gradient); ! GSL_ERROR_VAL ("failed to allocate space for x_trial", GSL_ENOMEM, 0); } --- 202,206 ---- gsl_vector_free (gradient); ! GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); } *************** *** 221,225 **** gsl_vector_free (x_trial); ! GSL_ERROR_VAL ("failed to allocate space for f_trial", GSL_ENOMEM, 0); } --- 221,225 ---- gsl_vector_free (x_trial); ! GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); } *************** *** 241,245 **** gsl_vector_free (f_trial); ! GSL_ERROR_VAL ("failed to allocate space for df", GSL_ENOMEM, 0); } --- 241,245 ---- gsl_vector_free (f_trial); ! GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); } *************** *** 262,266 **** gsl_vector_free (df); ! GSL_ERROR_VAL ("failed to allocate space for qtdf", GSL_ENOMEM, 0); } --- 262,266 ---- gsl_vector_free (df); ! GSL_ERROR ("failed to allocate space for qtdf", GSL_ENOMEM); } *************** *** 285,289 **** gsl_vector_free (qtdf); ! GSL_ERROR_VAL ("failed to allocate space for rdx", GSL_ENOMEM, 0); } --- 285,289 ---- gsl_vector_free (qtdf); ! GSL_ERROR ("failed to allocate space for rdx", GSL_ENOMEM); } *************** *** 308,312 **** gsl_vector_free (rdx); ! GSL_ERROR_VAL ("failed to allocate space for w", GSL_ENOMEM, 0); } --- 308,312 ---- gsl_vector_free (rdx); ! GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); } *************** *** 332,336 **** gsl_vector_free (w); ! GSL_ERROR_VAL ("failed to allocate space for v", GSL_ENOMEM, 0); } --- 332,336 ---- gsl_vector_free (w); ! GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multiroots/hybridj.c gsl-1.3/multiroots/hybridj.c *** gsl-1.2/multiroots/hybridj.c Tue Jun 19 22:40:08 2001 --- gsl-1.3/multiroots/hybridj.c Tue Nov 12 22:25:52 2002 *************** *** 79,83 **** if (q == 0) { ! GSL_ERROR_VAL ("failed to allocate space for q", GSL_ENOMEM, 0); } --- 79,83 ---- if (q == 0) { ! GSL_ERROR ("failed to allocate space for q", GSL_ENOMEM); } *************** *** 90,94 **** gsl_matrix_free (q); ! GSL_ERROR_VAL ("failed to allocate space for r", GSL_ENOMEM, 0); } --- 90,94 ---- gsl_matrix_free (q); ! GSL_ERROR ("failed to allocate space for r", GSL_ENOMEM); } *************** *** 102,106 **** gsl_matrix_free (r); ! GSL_ERROR_VAL ("failed to allocate space for tau", GSL_ENOMEM, 0); } --- 102,106 ---- gsl_matrix_free (r); ! GSL_ERROR ("failed to allocate space for tau", GSL_ENOMEM); } *************** *** 115,119 **** gsl_vector_free (tau); ! GSL_ERROR_VAL ("failed to allocate space for diag", GSL_ENOMEM, 0); } --- 115,119 ---- gsl_vector_free (tau); ! GSL_ERROR ("failed to allocate space for diag", GSL_ENOMEM); } *************** *** 129,133 **** gsl_vector_free (diag); ! GSL_ERROR_VAL ("failed to allocate space for qtf", GSL_ENOMEM, 0); } --- 129,133 ---- gsl_vector_free (diag); ! GSL_ERROR ("failed to allocate space for qtf", GSL_ENOMEM); } *************** *** 144,148 **** gsl_vector_free (qtf); ! GSL_ERROR_VAL ("failed to allocate space for newton", GSL_ENOMEM, 0); } --- 144,148 ---- gsl_vector_free (qtf); ! GSL_ERROR ("failed to allocate space for newton", GSL_ENOMEM); } *************** *** 160,164 **** gsl_vector_free (newton); ! GSL_ERROR_VAL ("failed to allocate space for gradient", GSL_ENOMEM, 0); } --- 160,164 ---- gsl_vector_free (newton); ! GSL_ERROR ("failed to allocate space for gradient", GSL_ENOMEM); } *************** *** 177,181 **** gsl_vector_free (gradient); ! GSL_ERROR_VAL ("failed to allocate space for x_trial", GSL_ENOMEM, 0); } --- 177,181 ---- gsl_vector_free (gradient); ! GSL_ERROR ("failed to allocate space for x_trial", GSL_ENOMEM); } *************** *** 195,199 **** gsl_vector_free (x_trial); ! GSL_ERROR_VAL ("failed to allocate space for f_trial", GSL_ENOMEM, 0); } --- 195,199 ---- gsl_vector_free (x_trial); ! GSL_ERROR ("failed to allocate space for f_trial", GSL_ENOMEM); } *************** *** 214,218 **** gsl_vector_free (f_trial); ! GSL_ERROR_VAL ("failed to allocate space for df", GSL_ENOMEM, 0); } --- 214,218 ---- gsl_vector_free (f_trial); ! GSL_ERROR ("failed to allocate space for df", GSL_ENOMEM); } *************** *** 234,238 **** gsl_vector_free (df); ! GSL_ERROR_VAL ("failed to allocate space for qtdf", GSL_ENOMEM, 0); } --- 234,238 ---- gsl_vector_free (df); ! GSL_ERROR ("failed to allocate space for qtdf", GSL_ENOMEM); } *************** *** 256,260 **** gsl_vector_free (qtdf); ! GSL_ERROR_VAL ("failed to allocate space for rdx", GSL_ENOMEM, 0); } --- 256,260 ---- gsl_vector_free (qtdf); ! GSL_ERROR ("failed to allocate space for rdx", GSL_ENOMEM); } *************** *** 278,282 **** gsl_vector_free (rdx); ! GSL_ERROR_VAL ("failed to allocate space for w", GSL_ENOMEM, 0); } --- 278,282 ---- gsl_vector_free (rdx); ! GSL_ERROR ("failed to allocate space for w", GSL_ENOMEM); } *************** *** 301,305 **** gsl_vector_free (w); ! GSL_ERROR_VAL ("failed to allocate space for v", GSL_ENOMEM, 0); } --- 301,305 ---- gsl_vector_free (w); ! GSL_ERROR ("failed to allocate space for v", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/multiroots/newton.c gsl-1.3/multiroots/newton.c *** gsl-1.2/multiroots/newton.c Fri Oct 19 19:01:43 2001 --- gsl-1.3/multiroots/newton.c Tue Nov 12 22:26:14 2002 *************** *** 54,58 **** if (m == 0) { ! GSL_ERROR_VAL ("failed to allocate space for lu", GSL_ENOMEM, 0); } --- 54,58 ---- if (m == 0) { ! GSL_ERROR ("failed to allocate space for lu", GSL_ENOMEM); } *************** *** 65,69 **** gsl_matrix_free(m); ! GSL_ERROR_VAL ("failed to allocate space for permutation", GSL_ENOMEM, 0); } --- 65,69 ---- gsl_matrix_free(m); ! GSL_ERROR ("failed to allocate space for permutation", GSL_ENOMEM); } diff -x *.info* -rc2P gsl-1.2/ode-initval/ChangeLog gsl-1.3/ode-initval/ChangeLog *** gsl-1.2/ode-initval/ChangeLog Wed Oct 3 19:17:36 2001 --- gsl-1.3/ode-initval/ChangeLog Sat Aug 3 18:03:04 2002 *************** *** 1,2 **** --- 1,7 ---- + Sat Aug 3 19:02:37 2002 Brian Gough + + * cscal.c (struct): use matlab style error control, with scalar + relative error and vector absolute error + Wed Oct 3 13:19:28 2001 Brian Gough diff -x *.info* -rc2P gsl-1.2/ode-initval/Makefile.am gsl-1.3/ode-initval/Makefile.am *** gsl-1.2/ode-initval/Makefile.am Tue Jun 12 10:00:36 2001 --- gsl-1.3/ode-initval/Makefile.am Sat Aug 3 18:03:16 2002 *************** *** 5,9 **** INCLUDES= -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h --- 5,9 ---- INCLUDES= -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h diff -x *.info* -rc2P gsl-1.2/ode-initval/Makefile.in gsl-1.3/ode-initval/Makefile.in *** gsl-1.2/ode-initval/Makefile.in Sat Jul 20 20:30:30 2002 --- gsl-1.3/ode-initval/Makefile.in Wed Dec 18 22:40:11 2002 *************** *** 91,95 **** INCLUDES = -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h --- 91,95 ---- INCLUDES = -I$(top_builddir) ! libgslodeiv_la_SOURCES = control.c cstd.c cscal.c evolve.c step.c rk2.c rk2imp.c rk4.c rk4imp.c rkf45.c rk8pd.c rkck.c bsimp.c gear1.c gear2.c noinst_HEADERS = odeiv_util.h *************** *** 114,120 **** libgslodeiv_la_LDFLAGS = libgslodeiv_la_LIBADD = ! libgslodeiv_la_OBJECTS = control.lo cstd.lo evolve.lo step.lo rk2.lo \ ! rk2imp.lo rk4.lo rk4imp.lo rkf45.lo rk8pd.lo rkck.lo bsimp.lo gear1.lo \ ! gear2.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) --- 114,120 ---- libgslodeiv_la_LDFLAGS = libgslodeiv_la_LIBADD = ! libgslodeiv_la_OBJECTS = control.lo cstd.lo cscal.lo evolve.lo step.lo \ ! rk2.lo rk2imp.lo rk4.lo rk4imp.lo rkf45.lo rk8pd.lo rkck.lo bsimp.lo \ ! gear1.lo gear2.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) diff -x *.info* -rc2P gsl-1.2/ode-initval/cscal.c gsl-1.3/ode-initval/cscal.c *** gsl-1.2/ode-initval/cscal.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/ode-initval/cscal.c Fri Jul 26 22:08:29 2002 *************** *** 0 **** --- 1,192 ---- + /* ode-initval/cscal.c + * + * Copyright (C) 2002 Brian Gough + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + #include + #include + #include + #include + #include + #include + + typedef struct + { + double eps_abs; + double eps_rel; + double a_y; + double a_dydt; + double * scale_abs; + } + sc_control_state_t; + + static void * + sc_control_alloc (void) + { + sc_control_state_t * s = + (sc_control_state_t *) malloc (sizeof(sc_control_state_t)); + + if (s == 0) + { + GSL_ERROR_NULL ("failed to allocate space for sc_control_state", + GSL_ENOMEM); + } + + return s; + } + + static int + sc_control_init (void * vstate, + double eps_abs, double eps_rel, double a_y, double a_dydt) + { + sc_control_state_t * s = (sc_control_state_t *) vstate; + + if (eps_abs < 0) + { + GSL_ERROR ("eps_abs is negative", GSL_EINVAL); + } + else if (eps_rel < 0) + { + GSL_ERROR ("eps_rel is negative", GSL_EINVAL); + } + else if (a_y < 0) + { + GSL_ERROR ("a_y is negative", GSL_EINVAL); + } + else if (a_dydt < 0) + { + GSL_ERROR ("a_dydt is negative", GSL_EINVAL); + } + + s->eps_rel = eps_rel; + s->eps_abs = eps_abs; + s->a_y = a_y; + s->a_dydt = a_dydt; + + return GSL_SUCCESS; + } + + static int + sc_control_hadjust(void * vstate, size_t dim, unsigned int ord, const double y[], const double yerr[], const double yp[], double * h) + { + sc_control_state_t *state = (sc_control_state_t *) vstate; + + const double eps_abs = state->eps_abs; + const double eps_rel = state->eps_rel; + const double a_y = state->a_y; + const double a_dydt = state->a_dydt; + const double * scale_abs = state->scale_abs; + + const double S = 0.9; + const double h_old = *h; + + double rmax = DBL_MIN; + size_t i; + + for(i=0; i 1.1) { + /* decrease step, no more than factor of 5, but a fraction S more + than scaling suggests (for better accuracy) */ + double r = S / pow(rmax, 1.0/ord); + + if (r < 0.2) + r = 0.2; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_DEC; + } + else if(rmax < 0.5) { + /* increase step, no more than factor of 5 */ + double r = S / pow(rmax, 1.0/(ord+1.0)); + + if (r > 5.0) + r = 5.0; + + if (r < 1.0) /* don't allow any decrease caused by S<1 */ + r = 1.0; + + *h = r * h_old; + + return GSL_ODEIV_HADJ_INC; + } + else { + /* no change */ + return GSL_ODEIV_HADJ_NIL; + } + } + + + static void + sc_control_free (void * vstate) + { + sc_control_state_t *state = (sc_control_state_t *) vstate; + free (state->scale_abs); + free (state); + } + + static const gsl_odeiv_control_type sc_control_type = + {"scaled", /* name */ + &sc_control_alloc, + &sc_control_init, + &sc_control_hadjust, + &sc_control_free}; + + const gsl_odeiv_control_type *gsl_odeiv_control_scaled = &sc_control_type; + + + gsl_odeiv_control * + gsl_odeiv_control_scaled_new(double eps_abs, double eps_rel, + double a_y, double a_dydt, + const double scale_abs[], + size_t dim) + { + gsl_odeiv_control * c = + gsl_odeiv_control_alloc (gsl_odeiv_control_scaled); + + int status = gsl_odeiv_control_init (c, eps_abs, eps_rel, a_y, a_dydt); + + if (status != GSL_SUCCESS) + { + gsl_odeiv_control_free (c); + GSL_ERROR_NULL ("error trying to initialize control", status); + } + + { + sc_control_state_t * s = (sc_control_state_t *) c->state; + + s->scale_abs = malloc(dim * sizeof(double)); + + if (s->scale_abs == 0) + { + free (s); + GSL_ERROR_NULL ("failed to allocate space for scale_abs", + GSL_ENOMEM); + } + + memcpy(s->scale_abs, scale_abs, dim * sizeof(double)); + } + + return c; + } diff -x *.info* -rc2P gsl-1.2/ode-initval/gsl_odeiv.h gsl-1.3/ode-initval/gsl_odeiv.h *** gsl-1.2/ode-initval/gsl_odeiv.h Mon Jun 10 13:12:16 2002 --- gsl-1.3/ode-initval/gsl_odeiv.h Sun Aug 11 21:31:05 2002 *************** *** 196,199 **** --- 196,205 ---- gsl_odeiv_control * gsl_odeiv_control_yp_new(double eps_abs, double eps_rel); + /* This controller computes errors using different absolute errors for + * each component + * + * D0 = eps_abs * scale_abs[i] + eps_rel * (a_y |y| + a_dydt h |y'|) + */ + gsl_odeiv_control * gsl_odeiv_control_scaled_new(double eps_abs, double eps_rel, double a_y, double a_dydt, const double scale_abs[], size_t dim); /* General evolution object. diff -x *.info* -rc2P gsl-1.2/qrng/ChangeLog gsl-1.3/qrng/ChangeLog *** gsl-1.2/qrng/ChangeLog Mon Apr 22 18:25:47 2002 --- gsl-1.3/qrng/ChangeLog Sat Nov 16 19:06:01 2002 *************** *** 1,2 **** --- 1,6 ---- + 2002-11-16 Brian Gough + + * niederreiter-2.c (calculate_cj): clear uninitialized memory + Mon Apr 22 19:20:05 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/qrng/Makefile.in gsl-1.3/qrng/Makefile.in *** gsl-1.2/qrng/Makefile.in Sat Jul 20 20:29:19 2002 --- gsl-1.3/qrng/Makefile.in Wed Dec 18 22:38:39 2002 *************** *** 123,127 **** HEADERS = $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in --- 123,127 ---- HEADERS = $(pkginclude_HEADERS) ! DIST_COMMON = ChangeLog Makefile.am Makefile.in TODO diff -x *.info* -rc2P gsl-1.2/qrng/TODO gsl-1.3/qrng/TODO *** gsl-1.2/qrng/TODO Thu Jan 1 00:00:00 1970 --- gsl-1.3/qrng/TODO Fri Oct 18 17:13:35 2002 *************** *** 0 **** --- 1,10 ---- + * Sort out "const" in prototypes, it looks odd since there are consts + for many functions which modify the state. (Applies to both qrng and rng) + + * It would be useful to include functions to generate quasi-random + number distributions (at least the Gaussian distribution)? obviously + the Box-Mueller algorithm cannot be used to maintain the low + discrepancy characteristics of the sequence, there are several + methods suggested in the literature but it isn't at all my field so + I'm not sure which is to be preferred. (DENISON Francis + ) diff -x *.info* -rc2P gsl-1.2/qrng/niederreiter-2.c gsl-1.3/qrng/niederreiter-2.c *** gsl-1.2/qrng/niederreiter-2.c Mon Nov 19 21:39:31 2001 --- gsl-1.3/qrng/niederreiter-2.c Sat Nov 16 19:06:01 2002 *************** *** 252,255 **** --- 252,261 ---- pb[k] = 0; } + + for (;k + + * multinomial.c (gsl_ran_multinomial): added multinomial + distribution + + * dirichlet.c (gsl_ran_dirichlet_lnpdf): added logpdf function for + accuracy + + Tue Aug 27 19:08:33 2002 Brian Gough + + * dirichlet.c: added dirichlet distribution + Sat Aug 18 22:21:07 2001 Brian Gough diff -x *.info* -rc2P gsl-1.2/randist/Makefile.am gsl-1.3/randist/Makefile.am *** gsl-1.2/randist/Makefile.am Sat Aug 18 20:08:50 2001 --- gsl-1.3/randist/Makefile.am Wed Dec 11 11:52:30 2002 *************** *** 5,9 **** INCLUDES= -I$(top_builddir) ! libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c TESTS = test --- 5,9 ---- INCLUDES= -I$(top_builddir) ! libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c TESTS = test diff -x *.info* -rc2P gsl-1.2/randist/Makefile.in gsl-1.3/randist/Makefile.in *** gsl-1.2/randist/Makefile.in Sat Jul 20 20:29:31 2002 --- gsl-1.3/randist/Makefile.in Wed Dec 18 22:38:53 2002 *************** *** 91,95 **** INCLUDES = -I$(top_builddir) ! libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c TESTS = test --- 91,95 ---- INCLUDES = -I$(top_builddir) ! libgslrandist_la_SOURCES = bernoulli.c beta.c bigauss.c binomial.c cauchy.c chisq.c dirichlet.c discrete.c erlang.c exponential.c exppow.c fdist.c flat.c gamma.c gauss.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c TESTS = test *************** *** 112,120 **** libgslrandist_la_LIBADD = libgslrandist_la_OBJECTS = bernoulli.lo beta.lo bigauss.lo binomial.lo \ ! cauchy.lo chisq.lo discrete.lo erlang.lo exponential.lo exppow.lo \ ! fdist.lo flat.lo gamma.lo gauss.lo gausstail.lo geometric.lo gumbel.lo \ ! hyperg.lo laplace.lo levy.lo logarithmic.lo logistic.lo lognormal.lo \ ! nbinomial.lo pareto.lo pascal.lo poisson.lo rayleigh.lo shuffle.lo \ ! sphere.lo tdist.lo weibull.lo landau.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) --- 112,120 ---- libgslrandist_la_LIBADD = libgslrandist_la_OBJECTS = bernoulli.lo beta.lo bigauss.lo binomial.lo \ ! cauchy.lo chisq.lo dirichlet.lo discrete.lo erlang.lo exponential.lo \ ! exppow.lo fdist.lo flat.lo gamma.lo gauss.lo gausstail.lo geometric.lo \ ! gumbel.lo hyperg.lo laplace.lo levy.lo logarithmic.lo logistic.lo \ ! lognormal.lo multinomial.lo nbinomial.lo pareto.lo pascal.lo poisson.lo \ ! rayleigh.lo shuffle.lo sphere.lo tdist.lo weibull.lo landau.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) diff -x *.info* -rc2P gsl-1.2/randist/dirichlet.c gsl-1.3/randist/dirichlet.c *** gsl-1.2/randist/dirichlet.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/randist/dirichlet.c Tue Dec 10 19:56:30 2002 *************** *** 0 **** --- 1,103 ---- + /* randist/dirichlet.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + #include + #include + #include + #include + #include + #include + + + /* The Dirichlet probability distribution of order K-1 is + + p(\theta_1,...,\theta_K) d\theta_1 ... d\theta_K = + (1/Z) \prod_i=1,K \theta_i^{alpha_i - 1} \delta(1 -\sum_i=1,K \theta_i) + + The normalization factor Z can be expressed in terms of gamma functions: + + Z = {\prod_i=1,K \Gamma(\alpha_i)} / {\Gamma( \sum_i=1,K \alpha_i)} + + The K constants, \alpha_1,...,\alpha_K, must be positive. The K parameters, + \theta_1,...,\theta_K are nonnegative and sum to 1. + + The random variates are generated by sampling K values from gamma + distributions with parameters a=\alpha_i, b=1, and renormalizing. + See A.M. Law, W.D. Kelton, Simulation Modeling and Analysis (1991). + + Gavin E. Crooks (2002) + */ + + void + gsl_ran_dirichlet (const gsl_rng * r, const size_t K, + const double alpha[], double theta[]) + { + size_t i; + double norm = 0.0; + + for (i = 0; i < K; i++) + { + theta[i] = gsl_ran_gamma (r, alpha[i], 1.0); + } + + for (i = 0; i < K; i++) + { + norm += theta[i]; + } + + for (i = 0; i < K; i++) + { + theta[i] /= norm; + } + } + + + double + gsl_ran_dirichlet_pdf (const size_t K, + const double alpha[], const double theta[]) + { + return exp (gsl_ran_dirichlet_lnpdf (K, alpha, theta)); + } + + double + gsl_ran_dirichlet_lnpdf (const size_t K, + const double alpha[], const double theta[]) + { + /*We calculate the log of the pdf to minimize the possibility of overflow */ + size_t i; + double log_p = 0.0; + double sum_alpha = 0.0; + + for (i = 0; i < K; i++) + { + log_p += (alpha[i] - 1.0) * log (theta[i]); + } + + for (i = 0; i < K; i++) + { + sum_alpha += alpha[i]; + } + + log_p += gsl_sf_lngamma (sum_alpha); + + for (i = 0; i < K; i++) + { + log_p -= gsl_sf_lngamma (alpha[i]); + } + + return log_p; + } diff -x *.info* -rc2P gsl-1.2/randist/gsl_randist.h gsl-1.3/randist/gsl_randist.h *** gsl-1.2/randist/gsl_randist.h Mon Jun 10 13:04:38 2002 --- gsl-1.3/randist/gsl_randist.h Tue Dec 10 19:56:30 2002 *************** *** 55,58 **** --- 55,62 ---- double gsl_ran_chisq_pdf (const double x, const double nu); + void gsl_ran_dirichlet (const gsl_rng * r, const size_t K, const double alpha[], double theta[]); + double gsl_ran_dirichlet_pdf (const size_t K, const double alpha[], const double theta[]); + double gsl_ran_dirichlet_lnpdf (const size_t K, const double alpha[], const double theta[]); + double gsl_ran_erlang (const gsl_rng * r, const double a, const double n); double gsl_ran_erlang_pdf (const double x, const double a, const double n); *************** *** 108,111 **** --- 112,124 ---- unsigned int gsl_ran_logarithmic (const gsl_rng * r, const double p); double gsl_ran_logarithmic_pdf (const unsigned int k, const double p); + + void gsl_ran_multinomial (const gsl_rng * r, const size_t K, + const unsigned int N, const double p[], + unsigned int n[] ); + double gsl_ran_multinomial_pdf (const size_t K, + const double p[], const unsigned int n[] ); + double gsl_ran_multinomial_lnpdf (const size_t K, + const double p[], const unsigned int n[] ); + unsigned int gsl_ran_negative_binomial (const gsl_rng * r, double p, double n); diff -x *.info* -rc2P gsl-1.2/randist/multinomial.c gsl-1.3/randist/multinomial.c *** gsl-1.2/randist/multinomial.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/randist/multinomial.c Tue Dec 10 19:06:58 2002 *************** *** 0 **** --- 1,122 ---- + /* randist/multinomial.c + * + * Copyright (C) 2002 Gavin E. Crooks + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + #include + #include + #include + #include + #include + + /* The multinomial distribution has the form + + N! n_1 n_2 n_K + prob(n_1, n_2, ... n_K) = -------------------- p_1 p_2 ... p_K + (n_1! n_2! ... n_K!) + + where n_1, n_2, ... n_K are nonnegative integers, sum_{k=1,K} n_k = N, + and p = (p_1, p_2, ..., p_K) is a probability distribution. + + Random variates are generated using the conditional binomial method. + This scales well with N and does not require a setup step. + + Ref: + C.S. David, The computer generation of multinomial random variates, + Comp. Stat. Data Anal. 16 (1993) 205-217 + */ + + void + gsl_ran_multinomial (const gsl_rng * r, const size_t K, + const unsigned int N, const double p[], unsigned int n[]) + { + size_t k; + double norm = 0.0; + double sum_p = 0.0; + + unsigned int sum_n = 0; + + /* p[k] may contain non-negative weights that do not sum to 1.0. + * Even a probability distribution will not exactly sum to 1.0 + * due to rounding errors. + */ + + for (k = 0; k < K; k++) + { + norm += p[k]; + } + + for (k = 0; k < K; k++) + { + if (p[k] > 0.0) + { + n[k] = gsl_ran_binomial (r, p[k] / (norm - sum_p), N - sum_n); + } + else + { + n[k] = 0; + } + + sum_p += p[k]; + sum_n += n[k]; + } + + } + + + double + gsl_ran_multinomial_pdf (const size_t K, + const double p[], const unsigned int n[]) + { + return exp (gsl_ran_multinomial_lnpdf (K, p, n)); + } + + + double + gsl_ran_multinomial_lnpdf (const size_t K, + const double p[], const unsigned int n[]) + { + size_t k; + unsigned int N = 0; + double log_pdf = 0.0; + double norm = 0.0; + + for (k = 0; k < K; k++) + { + N += n[k]; + } + + for (k = 0; k < K; k++) + { + norm += p[k]; + } + + /* Note: n! == gamma(n+1) */ + log_pdf = gsl_sf_lngamma (N + 1); + + for (k = 0; k < K; k++) + { + log_pdf -= gsl_sf_lngamma (n[k] + 1); + } + + for (k = 0; k < K; k++) + { + log_pdf += log (p[k] / norm) * n[k]; + } + + return log_pdf; + } diff -x *.info* -rc2P gsl-1.2/randist/test.c gsl-1.3/randist/test.c *** gsl-1.2/randist/test.c Wed Jul 18 10:46:17 2001 --- gsl-1.3/randist/test.c Tue Dec 10 19:56:30 2002 *************** *** 29,37 **** #define N 100000 void testMoments (double (*f) (void), const char *name, ! double a, double b, double p); ! void testPDF (double (*f) (void), double (*pdf)(double), const char *name); ! void testDiscretePDF (double (*f) (void), double (*pdf)(unsigned int), ! const char *name); void test_shuffle (void); --- 29,42 ---- #define N 100000 + + /* Convient test dimension for multivariant distributions */ + #define MULTI_DIM 10 + + void testMoments (double (*f) (void), const char *name, ! double a, double b, double p); ! void testPDF (double (*f) (void), double (*pdf) (double), const char *name); ! void testDiscretePDF (double (*f) (void), double (*pdf) (unsigned int), ! const char *name); void test_shuffle (void); *************** *** 49,52 **** --- 54,60 ---- double test_chisq (void); double test_chisq_pdf (double x); + double test_dirichlet (void); + double test_dirichlet_pdf (double x); + void test_dirichlet_moments (void); double test_discrete1 (void); double test_discrete1_pdf (unsigned int n); *************** *** 151,154 **** --- 159,167 ---- double test_logarithmic (void); double test_logarithmic_pdf (unsigned int n); + double test_multinomial (void); + double test_multinomial_pdf (unsigned int n); + double test_multinomial_large (void); + double test_multinomial_large_pdf (unsigned int n); + void test_multinomial_moments (void); double test_negative_binomial (void); double test_negative_binomial_pdf (unsigned int n); *************** *** 193,197 **** gsl_ieee_env_setup (); ! gsl_rng_env_setup() ; r_global = gsl_rng_alloc (gsl_rng_default); --- 206,210 ---- gsl_ieee_env_setup (); ! gsl_rng_env_setup (); r_global = gsl_rng_alloc (gsl_rng_default); *************** *** 199,298 **** #define FUNC2(x) test_ ## x, test_ ## x ## _pdf, "test gsl_ran_" #x ! test_shuffle() ; ! test_choose() ; testMoments (FUNC (ugaussian), 0.0, 100.0, 0.5); testMoments (FUNC (ugaussian), -1.0, 1.0, 0.6826895); testMoments (FUNC (ugaussian), 3.0, 3.5, 0.0011172689); ! testMoments (FUNC (ugaussian_tail), 3.0, 3.5, 0.0011172689/0.0013498981); ! testMoments (FUNC (exponential), 0.0, 1.0, 1- exp(-0.5)); testMoments (FUNC (cauchy), 0.0, 10000.0, 0.5); ! testMoments (FUNC (discrete1), -0.5, 0.5, 0.59 ); ! testMoments (FUNC (discrete1), 0.5, 1.5, 0.40 ); ! testMoments (FUNC (discrete1), 1.5, 3.5, 0.01 ); ! ! testPDF (FUNC2(beta)); ! testPDF (FUNC2(cauchy)); ! testPDF (FUNC2(chisq)); ! testPDF (FUNC2(erlang)); ! testPDF (FUNC2(exponential)); ! ! testPDF (FUNC2(exppow0)); ! testPDF (FUNC2(exppow1)); ! testPDF (FUNC2(exppow1a)); ! testPDF (FUNC2(exppow2)); ! testPDF (FUNC2(exppow2a)); ! ! testPDF (FUNC2(fdist)); ! testPDF (FUNC2(flat)); ! testPDF (FUNC2(gamma)); ! testPDF (FUNC2(gamma1)); ! testPDF (FUNC2(gamma_int)); ! testPDF (FUNC2(gamma_large)); ! testPDF (FUNC2(gaussian)); ! testPDF (FUNC2(gaussian_ratio_method)); ! testPDF (FUNC2(ugaussian)); ! testPDF (FUNC2(ugaussian_ratio_method)); ! testPDF (FUNC2(gaussian_tail)); ! testPDF (FUNC2(gaussian_tail1)); ! testPDF (FUNC2(gaussian_tail2)); ! testPDF (FUNC2(ugaussian_tail)); ! ! testPDF (FUNC2(bivariate_gaussian1)); ! testPDF (FUNC2(bivariate_gaussian2)); ! testPDF (FUNC2(bivariate_gaussian3)); ! testPDF (FUNC2(bivariate_gaussian4)); ! ! testPDF (FUNC2(gumbel1)); ! testPDF (FUNC2(gumbel2)); ! testPDF (FUNC2(landau)); ! testPDF (FUNC2(levy1)); ! testPDF (FUNC2(levy2)); ! testPDF (FUNC2(levy1a)); ! testPDF (FUNC2(levy2a)); ! testPDF (FUNC2(levy_skew1)); ! testPDF (FUNC2(levy_skew2)); ! testPDF (FUNC2(levy_skew1a)); ! testPDF (FUNC2(levy_skew2a)); ! testPDF (FUNC2(levy_skew1b)); ! testPDF (FUNC2(levy_skew2b)); ! testPDF (FUNC2(logistic)); ! testPDF (FUNC2(lognormal)); ! testPDF (FUNC2(pareto)); ! testPDF (FUNC2(rayleigh)); ! testPDF (FUNC2(rayleigh_tail)); ! testPDF (FUNC2(tdist1)); ! testPDF (FUNC2(tdist2)); ! testPDF (FUNC2(laplace)); ! testPDF (FUNC2(weibull)); ! testPDF (FUNC2(weibull1)); ! ! testPDF (FUNC2(dir2d)); ! testPDF (FUNC2(dir2d_trig_method)); ! testPDF (FUNC2(dir3dxy)); ! testPDF (FUNC2(dir3dyz)); ! testPDF (FUNC2(dir3dzx)); ! ! testDiscretePDF (FUNC2(discrete1)); ! testDiscretePDF (FUNC2(discrete2)); ! testDiscretePDF (FUNC2(poisson)); ! testDiscretePDF (FUNC2(poisson_large)); ! testDiscretePDF (FUNC2(bernoulli)); ! testDiscretePDF (FUNC2(binomial)); ! testDiscretePDF (FUNC2(binomial_large)); ! testDiscretePDF (FUNC2(geometric)); ! testDiscretePDF (FUNC2(geometric1)); ! testDiscretePDF (FUNC2(hypergeometric1)); ! testDiscretePDF (FUNC2(hypergeometric2)); ! testDiscretePDF (FUNC2(hypergeometric3)); ! testDiscretePDF (FUNC2(hypergeometric4)); ! testDiscretePDF (FUNC2(hypergeometric5)); ! testDiscretePDF (FUNC2(hypergeometric6)); ! testDiscretePDF (FUNC2(logarithmic)); ! testDiscretePDF (FUNC2(negative_binomial)); ! testDiscretePDF (FUNC2(pascal)); ! exit (gsl_test_summary()); } --- 212,317 ---- #define FUNC2(x) test_ ## x, test_ ## x ## _pdf, "test gsl_ran_" #x ! test_shuffle (); ! test_choose (); testMoments (FUNC (ugaussian), 0.0, 100.0, 0.5); testMoments (FUNC (ugaussian), -1.0, 1.0, 0.6826895); testMoments (FUNC (ugaussian), 3.0, 3.5, 0.0011172689); ! testMoments (FUNC (ugaussian_tail), 3.0, 3.5, 0.0011172689 / 0.0013498981); ! testMoments (FUNC (exponential), 0.0, 1.0, 1 - exp (-0.5)); testMoments (FUNC (cauchy), 0.0, 10000.0, 0.5); ! testMoments (FUNC (discrete1), -0.5, 0.5, 0.59); ! testMoments (FUNC (discrete1), 0.5, 1.5, 0.40); ! testMoments (FUNC (discrete1), 1.5, 3.5, 0.01); ! ! test_dirichlet_moments (); ! test_multinomial_moments (); ! ! testPDF (FUNC2 (beta)); ! testPDF (FUNC2 (cauchy)); ! testPDF (FUNC2 (chisq)); ! testPDF (FUNC2 (dirichlet)); ! testPDF (FUNC2 (erlang)); ! testPDF (FUNC2 (exponential)); ! ! testPDF (FUNC2 (exppow0)); ! testPDF (FUNC2 (exppow1)); ! testPDF (FUNC2 (exppow1a)); ! testPDF (FUNC2 (exppow2)); ! testPDF (FUNC2 (exppow2a)); ! ! testPDF (FUNC2 (fdist)); ! testPDF (FUNC2 (flat)); ! testPDF (FUNC2 (gamma)); ! testPDF (FUNC2 (gamma1)); ! testPDF (FUNC2 (gamma_int)); ! testPDF (FUNC2 (gamma_large)); ! testPDF (FUNC2 (gaussian)); ! testPDF (FUNC2 (gaussian_ratio_method)); ! testPDF (FUNC2 (ugaussian)); ! testPDF (FUNC2 (ugaussian_ratio_method)); ! testPDF (FUNC2 (gaussian_tail)); ! testPDF (FUNC2 (gaussian_tail1)); ! testPDF (FUNC2 (gaussian_tail2)); ! testPDF (FUNC2 (ugaussian_tail)); ! ! testPDF (FUNC2 (bivariate_gaussian1)); ! testPDF (FUNC2 (bivariate_gaussian2)); ! testPDF (FUNC2 (bivariate_gaussian3)); ! testPDF (FUNC2 (bivariate_gaussian4)); ! ! testPDF (FUNC2 (gumbel1)); ! testPDF (FUNC2 (gumbel2)); ! testPDF (FUNC2 (landau)); ! testPDF (FUNC2 (levy1)); ! testPDF (FUNC2 (levy2)); ! testPDF (FUNC2 (levy1a)); ! testPDF (FUNC2 (levy2a)); ! testPDF (FUNC2 (levy_skew1)); ! testPDF (FUNC2 (levy_skew2)); ! testPDF (FUNC2 (levy_skew1a)); ! testPDF (FUNC2 (levy_skew2a)); ! testPDF (FUNC2 (levy_skew1b)); ! testPDF (FUNC2 (levy_skew2b)); ! testPDF (FUNC2 (logistic)); ! testPDF (FUNC2 (lognormal)); ! testPDF (FUNC2 (pareto)); ! testPDF (FUNC2 (rayleigh)); ! testPDF (FUNC2 (rayleigh_tail)); ! testPDF (FUNC2 (tdist1)); ! testPDF (FUNC2 (tdist2)); ! testPDF (FUNC2 (laplace)); ! testPDF (FUNC2 (weibull)); ! testPDF (FUNC2 (weibull1)); ! ! testPDF (FUNC2 (dir2d)); ! testPDF (FUNC2 (dir2d_trig_method)); ! testPDF (FUNC2 (dir3dxy)); ! testPDF (FUNC2 (dir3dyz)); ! testPDF (FUNC2 (dir3dzx)); ! ! testDiscretePDF (FUNC2 (discrete1)); ! testDiscretePDF (FUNC2 (discrete2)); ! testDiscretePDF (FUNC2 (poisson)); ! testDiscretePDF (FUNC2 (poisson_large)); ! testDiscretePDF (FUNC2 (bernoulli)); ! testDiscretePDF (FUNC2 (binomial)); ! testDiscretePDF (FUNC2 (binomial_large)); ! testDiscretePDF (FUNC2 (geometric)); ! testDiscretePDF (FUNC2 (geometric1)); ! testDiscretePDF (FUNC2 (hypergeometric1)); ! testDiscretePDF (FUNC2 (hypergeometric2)); ! testDiscretePDF (FUNC2 (hypergeometric3)); ! testDiscretePDF (FUNC2 (hypergeometric4)); ! testDiscretePDF (FUNC2 (hypergeometric5)); ! testDiscretePDF (FUNC2 (hypergeometric6)); ! testDiscretePDF (FUNC2 (logarithmic)); ! testDiscretePDF (FUNC2 (multinomial)); ! testDiscretePDF (FUNC2 (multinomial_large)); ! testDiscretePDF (FUNC2 (negative_binomial)); ! testDiscretePDF (FUNC2 (pascal)); ! exit (gsl_test_summary ()); } *************** *** 300,305 **** test_shuffle (void) { ! double count[10][10] ; ! int x[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} ; int i, j, status = 0; --- 319,324 ---- test_shuffle (void) { ! double count[10][10]; ! int x[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int i, j, status = 0; *************** *** 308,324 **** for (j = 0; j < 10; j++) { ! count[i][j] = 0 ; } } ! for (i = 0 ; i < N; i++) { for (j = 0; j < 10; j++) ! x[j] = j ; ! gsl_ran_shuffle (r_global, x, 10, sizeof(int)) ; for (j = 0; j < 10; j++) ! count[x[j]][j] ++ ; } --- 327,343 ---- for (j = 0; j < 10; j++) { ! count[i][j] = 0; } } ! for (i = 0; i < N; i++) { for (j = 0; j < 10; j++) ! x[j] = j; ! gsl_ran_shuffle (r_global, x, 10, sizeof (int)); for (j = 0; j < 10; j++) ! count[x[j]][j]++; } *************** *** 327,344 **** for (j = 0; j < 10; j++) { ! double expected = N / 10.0 ; ! double d = fabs(count[i][j] - expected); ! double sigma = d / sqrt(expected) ; if (sigma > 5 && d > 1) { ! status = 1 ; ! gsl_test (status, ! "gsl_ran_shuffle %d,%d (%g observed vs %g expected)", ! i, j, count[i][j]/N, 0.1) ; } } } ! ! gsl_test (status, "gsl_ran_shuffle on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}") ; } --- 346,363 ---- for (j = 0; j < 10; j++) { ! double expected = N / 10.0; ! double d = fabs (count[i][j] - expected); ! double sigma = d / sqrt (expected); if (sigma > 5 && d > 1) { ! status = 1; ! gsl_test (status, ! "gsl_ran_shuffle %d,%d (%g observed vs %g expected)", ! i, j, count[i][j] / N, 0.1); } } } ! ! gsl_test (status, "gsl_ran_shuffle on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}"); } *************** *** 347,386 **** test_choose (void) { ! double count[10] ; ! int x[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} ; ! int y[3] = {0, 1, 2} ; int i, j, status = 0; for (i = 0; i < 10; i++) { ! count[i] = 0 ; } ! for (i = 0 ; i < N; i++) { for (j = 0; j < 10; j++) ! x[j] = j ; ! gsl_ran_choose (r_global, y, 3, x, 10, sizeof(int)) ; for (j = 0; j < 3; j++) ! count[y[j]]++ ; } for (i = 0; i < 10; i++) { ! double expected = 3.0 * N / 10.0 ; ! double d = fabs(count[i] - expected); ! double sigma = d / sqrt(expected) ; if (sigma > 5 && d > 1) { ! status = 1 ; ! gsl_test (status, ! "gsl_ran_choose %d (%g observed vs %g expected)", ! i, count[i]/N, 0.1) ; } } ! ! gsl_test (status, "gsl_ran_choose (3) on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}") ; } --- 366,405 ---- test_choose (void) { ! double count[10]; ! int x[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; ! int y[3] = { 0, 1, 2 }; int i, j, status = 0; for (i = 0; i < 10; i++) { ! count[i] = 0; } ! for (i = 0; i < N; i++) { for (j = 0; j < 10; j++) ! x[j] = j; ! gsl_ran_choose (r_global, y, 3, x, 10, sizeof (int)); for (j = 0; j < 3; j++) ! count[y[j]]++; } for (i = 0; i < 10; i++) { ! double expected = 3.0 * N / 10.0; ! double d = fabs (count[i] - expected); ! double sigma = d / sqrt (expected); if (sigma > 5 && d > 1) { ! status = 1; ! gsl_test (status, ! "gsl_ran_choose %d (%g observed vs %g expected)", ! i, count[i] / N, 0.1); } } ! ! gsl_test (status, "gsl_ran_choose (3) on {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}"); } *************** *** 391,395 **** void testMoments (double (*f) (void), const char *name, ! double a, double b, double p) { int i; --- 410,414 ---- void testMoments (double (*f) (void), const char *name, ! double a, double b, double p) { int i; *************** *** 416,428 **** void ! testPDF (double (*f) (void), double (*pdf)(double), const char *name) { double count[BINS], p[BINS]; ! double a = -5.0, b = +5.0 ; ! double dx = (b - a) / BINS ; ! int i,j,status = 0, status_i =0 ; for (i = 0; i < BINS; i++) ! count[i] = 0 ; for (i = 0; i < N; i++) --- 435,447 ---- void ! testPDF (double (*f) (void), double (*pdf) (double), const char *name) { double count[BINS], p[BINS]; ! double a = -5.0, b = +5.0; ! double dx = (b - a) / BINS; ! int i, j, status = 0, status_i = 0; for (i = 0; i < BINS; i++) ! count[i] = 0; for (i = 0; i < N; i++) *************** *** 430,439 **** double r = f (); if (r < b && r > a) ! { ! j = (int)((r - a)/dx) ; count[j]++; } } ! for (i = 0; i < BINS; i++) { --- 449,458 ---- double r = f (); if (r < b && r > a) ! { ! j = (int) ((r - a) / dx); count[j]++; } } ! for (i = 0; i < BINS; i++) { *************** *** 441,525 **** x+dx using Simpson's rule */ ! double x = a + i * dx ; #define STEPS 100 ! double sum = 0 ; ! ! if (fabs(x) < 1e-10) /* hit the origin exactly */ ! x = 0.0 ; ! for (j = 1; j < STEPS; j++) ! sum += pdf(x + j * dx / STEPS) ; ! p[i] = 0.5 * (pdf(x) + 2*sum + pdf(x + dx - 1e-7)) * dx / STEPS ; } for (i = 0; i < BINS; i++) { ! double x = a + i * dx ; ! double d = fabs(count[i] - N*p[i]) ; if (p[i] != 0) { ! double s = d / sqrt(N*p[i]) ; ! status_i = (s > 5) && (d > 1) ; } else { ! status_i = (count[i] != 0) ; } ! status |= status_i ; ! if (status_i) ! gsl_test (status_i, "%s [%g,%g) (%g/%d=%g observed vs %g expected)", ! name, x, x+dx, count[i],N,count[i]/N, p[i]) ; } if (status == 0) ! gsl_test (status, "%s, sampling against pdf over range [%g,%g) ", ! name, a, b) ; } void ! testDiscretePDF (double (*f) (void), double (*pdf)(unsigned int), const char *name) { double count[BINS], p[BINS]; ! unsigned int i ; ! int status = 0, status_i =0 ; for (i = 0; i < BINS; i++) ! count[i] = 0 ; for (i = 0; i < N; i++) { ! int r = (int)(f ()); ! if (r>= 0 && r < BINS) count[r]++; } ! for (i = 0; i < BINS; i++) ! p[i] = pdf(i) ; for (i = 0; i < BINS; i++) { ! double d = fabs(count[i] - N*p[i]) ; if (p[i] != 0) { ! double s = d/sqrt(N*p[i]) ; status_i = (s > 5) && (d > 1); } else { ! status_i = (count[i] != 0) ; } ! status |= status_i ; ! if (status_i) ! gsl_test (status_i, "%s i=%d (%g observed vs %g expected)", ! name, i, count[i]/N, p[i]) ; } if (status == 0) ! gsl_test (status, "%s, sampling against pdf over range [%d,%d) ", ! name, 0, BINS) ; } ! double --- 460,545 ---- x+dx using Simpson's rule */ ! double x = a + i * dx; #define STEPS 100 ! double sum = 0; ! ! if (fabs (x) < 1e-10) /* hit the origin exactly */ ! x = 0.0; ! for (j = 1; j < STEPS; j++) ! sum += pdf (x + j * dx / STEPS); ! p[i] = 0.5 * (pdf (x) + 2 * sum + pdf (x + dx - 1e-7)) * dx / STEPS; } for (i = 0; i < BINS; i++) { ! double x = a + i * dx; ! double d = fabs (count[i] - N * p[i]); if (p[i] != 0) { ! double s = d / sqrt (N * p[i]); ! status_i = (s > 5) && (d > 1); } else { ! status_i = (count[i] != 0); } ! status |= status_i; ! if (status_i) ! gsl_test (status_i, "%s [%g,%g) (%g/%d=%g observed vs %g expected)", ! name, x, x + dx, count[i], N, count[i] / N, p[i]); } if (status == 0) ! gsl_test (status, "%s, sampling against pdf over range [%g,%g) ", ! name, a, b); } void ! testDiscretePDF (double (*f) (void), double (*pdf) (unsigned int), ! const char *name) { double count[BINS], p[BINS]; ! unsigned int i; ! int status = 0, status_i = 0; for (i = 0; i < BINS; i++) ! count[i] = 0; for (i = 0; i < N; i++) { ! int r = (int) (f ()); ! if (r >= 0 && r < BINS) count[r]++; } ! for (i = 0; i < BINS; i++) ! p[i] = pdf (i); for (i = 0; i < BINS; i++) { ! double d = fabs (count[i] - N * p[i]); if (p[i] != 0) { ! double s = d / sqrt (N * p[i]); status_i = (s > 5) && (d > 1); } else { ! status_i = (count[i] != 0); } ! status |= status_i; ! if (status_i) ! gsl_test (status_i, "%s i=%d (%g observed vs %g expected)", ! name, i, count[i] / N, p[i]); } if (status == 0) ! gsl_test (status, "%s, sampling against pdf over range [%d,%d) ", ! name, 0, BINS); } ! double *************** *** 599,605 **** test_dir2d (void) { ! double x=0, y=0, theta; gsl_ran_dir_2d (r_global, &x, &y); ! theta = atan2(x,y); return theta; } --- 619,625 ---- test_dir2d (void) { ! double x = 0, y = 0, theta; gsl_ran_dir_2d (r_global, &x, &y); ! theta = atan2 (x, y); return theta; } *************** *** 610,618 **** if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI) ; } else { ! return 0 ; } } --- 630,638 ---- if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI); } else { ! return 0; } } *************** *** 621,627 **** test_dir2d_trig_method (void) { ! double x=0, y=0, theta; gsl_ran_dir_2d_trig_method (r_global, &x, &y); ! theta = atan2(x,y); return theta; } --- 641,647 ---- test_dir2d_trig_method (void) { ! double x = 0, y = 0, theta; gsl_ran_dir_2d_trig_method (r_global, &x, &y); ! theta = atan2 (x, y); return theta; } *************** *** 632,640 **** if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI) ; } else { ! return 0 ; } } --- 652,660 ---- if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI); } else { ! return 0; } } *************** *** 643,649 **** test_dir3dxy (void) { ! double x=0, y=0, z=0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2(x,y); return theta; } --- 663,669 ---- test_dir3dxy (void) { ! double x = 0, y = 0, z = 0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2 (x, y); return theta; } *************** *** 654,662 **** if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI) ; } else { ! return 0 ; } } --- 674,682 ---- if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI); } else { ! return 0; } } *************** *** 665,671 **** test_dir3dyz (void) { ! double x=0, y=0, z=0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2(y,z); return theta; } --- 685,691 ---- test_dir3dyz (void) { ! double x = 0, y = 0, z = 0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2 (y, z); return theta; } *************** *** 676,684 **** if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI) ; } else { ! return 0 ; } } --- 696,704 ---- if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI); } else { ! return 0; } } *************** *** 687,693 **** test_dir3dzx (void) { ! double x=0, y=0, z=0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2(z,x); return theta; } --- 707,713 ---- test_dir3dzx (void) { ! double x = 0, y = 0, z = 0, theta; gsl_ran_dir_3d (r_global, &x, &y, &z); ! theta = atan2 (z, x); return theta; } *************** *** 698,709 **** if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI) ; } else { ! return 0 ; } } static gsl_ran_discrete_t *g1 = NULL; static gsl_ran_discrete_t *g2 = NULL; --- 718,852 ---- if (x > -M_PI && x <= M_PI) { ! return 1 / (2 * M_PI); } else { ! return 0; ! } ! } ! ! double ! test_dirichlet (void) ! { ! /* This is a bit of a lame test, since when K=2, the Dirichlet distribution ! becomes a beta distribution */ ! size_t K = 2; ! double alpha[2] = { 2.5, 5.0 }; ! double theta[2] = { 0.0, 0.0 }; ! ! gsl_ran_dirichlet (r_global, K, alpha, theta); ! ! return theta[0]; ! } ! ! double ! test_dirichlet_pdf (double x) ! { ! size_t K = 2; ! double alpha[2] = { 2.5, 5.0 }; ! double theta[2]; ! ! if (x <= 0.0 || x >= 1.0) ! return 0.0; /* Out of range */ ! ! theta[0] = x; ! theta[1] = 1.0 - x; ! ! return gsl_ran_dirichlet_pdf (K, alpha, theta); ! } ! ! ! /* Check that the observed means of the Dirichlet variables are ! within reasonable statistical errors of their correct values. */ ! ! #define DIRICHLET_K 10 ! ! void ! test_dirichlet_moments (void) ! { ! double alpha[DIRICHLET_K]; ! double theta[DIRICHLET_K]; ! double theta_sum[DIRICHLET_K]; ! ! double alpha_sum = 0.0; ! double mean, obs_mean, sd, sigma; ! int status, k, n; ! ! for (k = 0; k < DIRICHLET_K; k++) ! { ! alpha[k] = gsl_ran_exponential (r_global, 0.1); ! alpha_sum += alpha[k]; ! theta_sum[k] = 0.0; ! } ! ! for (n = 0; n < N; n++) ! { ! gsl_ran_dirichlet (r_global, DIRICHLET_K, alpha, theta); ! for (k = 0; k < DIRICHLET_K; k++) ! theta_sum[k] += theta[k]; ! } ! ! for (k = 0; k < DIRICHLET_K; k++) ! { ! mean = alpha[k] / alpha_sum; ! sd = ! sqrt ((alpha[k] * (1. - alpha[k] / alpha_sum)) / ! (alpha_sum * (alpha_sum + 1.))); ! obs_mean = theta_sum[k] / N; ! sigma = sqrt ((double) N) * fabs (mean - obs_mean) / sd; ! ! status = (sigma > 3.0); ! ! gsl_test (status, ! "test gsl_ran_dirichlet: mean (%g observed vs %g expected)", ! obs_mean, mean); ! } ! } ! ! ! /* Check that the observed means of the multinomial variables are ! within reasonable statistical errors of their correct values. */ ! ! void ! test_multinomial_moments (void) ! { ! const unsigned int sum_n = 100; ! ! const double p[MULTI_DIM] ={ 0.2, 0.20, 0.17, 0.14, 0.12, ! 0.07, 0.05, 0.02, 0.02, 0.01 }; ! ! unsigned int x[MULTI_DIM]; ! double x_sum[MULTI_DIM]; ! ! double mean, obs_mean, sd, sigma; ! int status, k, n; ! ! for (k = 0; k < MULTI_DIM; k++) ! x_sum[k] =0.0; ! ! for (n = 0; n < N; n++) ! { ! gsl_ran_multinomial (r_global, MULTI_DIM, sum_n, p, x); ! for (k = 0; k < MULTI_DIM; k++) ! x_sum[k] += x[k]; ! } ! ! for (k = 0; k < MULTI_DIM; k++) ! { ! mean = p[k] * sum_n; ! sd = p[k] * (1.-p[k]) * sum_n; ! ! obs_mean = x_sum[k] / N; ! sigma = sqrt ((double) N) * fabs (mean - obs_mean) / sd; ! ! status = (sigma > 3.0); ! ! gsl_test (status, ! "test gsl_ran_multinomial: mean (%g observed vs %g expected)", ! obs_mean, mean); } } + static gsl_ran_discrete_t *g1 = NULL; static gsl_ran_discrete_t *g2 = NULL; *************** *** 712,724 **** test_discrete1 (void) { ! static double P[3]={0.59, 0.4, 0.01}; ! if (g1==NULL) { ! g1 = gsl_ran_discrete_preproc(3,P); } ! return gsl_ran_discrete(r_global,g1); } ! double test_discrete1_pdf (unsigned int n) { ! return gsl_ran_discrete_pdf((size_t)n,g1); } --- 855,870 ---- test_discrete1 (void) { ! static double P[3] = { 0.59, 0.4, 0.01 }; ! if (g1 == NULL) ! { ! g1 = gsl_ran_discrete_preproc (3, P); } ! return gsl_ran_discrete (r_global, g1); } ! ! double ! test_discrete1_pdf (unsigned int n) { ! return gsl_ran_discrete_pdf ((size_t) n, g1); } *************** *** 726,741 **** test_discrete2 (void) { ! static double P[10]={ 1, 9, 3, 4, 5, 8, 6, 7, 2, 0 }; ! if (g2==NULL) { ! g2 = gsl_ran_discrete_preproc(10,P); } ! return gsl_ran_discrete(r_global,g2); } ! double test_discrete2_pdf (unsigned int n) { ! return gsl_ran_discrete_pdf((size_t)n,g2); } ! double test_erlang (void) --- 872,890 ---- test_discrete2 (void) { ! static double P[10] = { 1, 9, 3, 4, 5, 8, 6, 7, 2, 0 }; ! if (g2 == NULL) ! { ! g2 = gsl_ran_discrete_preproc (10, P); } ! return gsl_ran_discrete (r_global, g2); } ! ! double ! test_discrete2_pdf (unsigned int n) { ! return gsl_ran_discrete_pdf ((size_t) n, g2); } ! double test_erlang (void) *************** *** 931,935 **** test_gaussian_tail_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, 1.7, 0.25) ; } --- 1080,1084 ---- test_gaussian_tail_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, 1.7, 0.25); } *************** *** 943,947 **** test_gaussian_tail1_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, -1.7, 5.0) ; } --- 1092,1096 ---- test_gaussian_tail1_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, -1.7, 5.0); } *************** *** 955,959 **** test_gaussian_tail2_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, 0.1, 2.0) ; } --- 1104,1108 ---- test_gaussian_tail2_pdf (double x) { ! return gsl_ran_gaussian_tail_pdf (x, 0.1, 2.0); } *************** *** 992,996 **** test_ugaussian_tail_pdf (double x) { ! return gsl_ran_ugaussian_tail_pdf (x, 3.0) ; } --- 1141,1145 ---- test_ugaussian_tail_pdf (double x) { ! return gsl_ran_ugaussian_tail_pdf (x, 3.0); } *************** *** 1000,1004 **** double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return x ; } --- 1149,1153 ---- double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return x; } *************** *** 1014,1018 **** double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return y ; } --- 1163,1167 ---- double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return y; } *************** *** 1020,1032 **** test_bivariate_gaussian2_pdf (double y) { ! int i, n = 10 ; ! double sum = 0 ; ! double a = -10, b = 10, dx = (b - a)/n ; ! for (i = 0; i < n ; i++) { ! double x = a + i * dx ; ! sum += gsl_ran_bivariate_gaussian_pdf (x, y, 3.0, 2.0, 0.3) * dx ; } ! return sum ; } --- 1169,1181 ---- test_bivariate_gaussian2_pdf (double y) { ! int i, n = 10; ! double sum = 0; ! double a = -10, b = 10, dx = (b - a) / n; ! for (i = 0; i < n; i++) { ! double x = a + i * dx; ! sum += gsl_ran_bivariate_gaussian_pdf (x, y, 3.0, 2.0, 0.3) * dx; } ! return sum; } *************** *** 1037,1041 **** double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return x + y ; } --- 1186,1190 ---- double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, 0.3, &x, &y); ! return x + y; } *************** *** 1044,1051 **** { double sx = 3.0, sy = 2.0, r = 0.3; ! double su = (sx+r*sy) ; ! double sv = sy*sqrt(1-r*r) ; ! double sigma = sqrt(su*su + sv*sv) ; ! return gsl_ran_gaussian_pdf (x, sigma); } --- 1193,1200 ---- { double sx = 3.0, sy = 2.0, r = 0.3; ! double su = (sx + r * sy); ! double sv = sy * sqrt (1 - r * r); ! double sigma = sqrt (su * su + sv * sv); ! return gsl_ran_gaussian_pdf (x, sigma); } *************** *** 1056,1060 **** double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, -0.5, &x, &y); ! return x + y ; } --- 1205,1209 ---- double x = 0, y = 0; gsl_ran_bivariate_gaussian (r_global, 3.0, 2.0, -0.5, &x, &y); ! return x + y; } *************** *** 1063,1070 **** { double sx = 3.0, sy = 2.0, r = -0.5; ! double su = (sx+r*sy) ; ! double sv = sy*sqrt(1-r*r) ; ! double sigma = sqrt(su*su + sv*sv) ; ! return gsl_ran_gaussian_pdf (x, sigma); } --- 1212,1219 ---- { double sx = 3.0, sy = 2.0, r = -0.5; ! double su = (sx + r * sy); ! double sv = sy * sqrt (1 - r * r); ! double sigma = sqrt (su * su + sv * sv); ! return gsl_ran_gaussian_pdf (x, sigma); } *************** *** 1229,1233 **** test_levy2_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt(2.0) * 5.0 ); } --- 1378,1382 ---- test_levy2_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); } *************** *** 1253,1257 **** test_levy2a_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt(2.0) * 5.0 ); } --- 1402,1406 ---- test_levy2a_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); } *************** *** 1278,1282 **** test_levy_skew2_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt(2.0) * 5.0 ); } --- 1427,1431 ---- test_levy_skew2_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); } *************** *** 1302,1306 **** test_levy_skew2a_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt(2.0) * 5.0 ); } --- 1451,1455 ---- test_levy_skew2a_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); } *************** *** 1326,1330 **** test_levy_skew2b_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt(2.0) * 5.0 ); } --- 1475,1479 ---- test_levy_skew2b_pdf (double x) { ! return gsl_ran_gaussian_pdf (x, sqrt (2.0) * 5.0); } *************** *** 1365,1368 **** --- 1514,1567 ---- { return gsl_ran_lognormal_pdf (x, 2.7, 1.3); + } + + double + test_multinomial (void) + { + const size_t K = 3; + const unsigned int sum_n = BINS; + unsigned int n[3]; + /* Test use of weights instead of probabilities. */ + const double p[] = { 2., 7., 1.}; + + gsl_ran_multinomial ( r_global, K, sum_n, p, n); + + return n[0]; + } + + double + test_multinomial_pdf (unsigned int n_0) + { + /* The margional distribution of just 1 variate is binomial. */ + size_t K = 2; + /* Test use of weights instead of probabilities */ + double p[] = { 0.4, 1.6}; + const unsigned int sum_n = BINS; + unsigned int n[2]; + + n[0] = n_0; + n[1] =sum_n - n_0; + + return gsl_ran_multinomial_pdf (K, p, n); + } + + + double + test_multinomial_large (void) + { + const unsigned int sum_n = BINS; + unsigned int n[MULTI_DIM]; + const double p[MULTI_DIM] = { 0.2, 0.20, 0.17, 0.14, 0.12, + 0.07, 0.05, 0.04, 0.01, 0.00 }; + + gsl_ran_multinomial ( r_global, MULTI_DIM, sum_n, p, n); + + return n[0]; + } + + double + test_multinomial_large_pdf (unsigned int n_0) + { + return test_multinomial_pdf(n_0); } diff -x *.info* -rc2P gsl-1.2/rng/ChangeLog gsl-1.3/rng/ChangeLog *** gsl-1.2/rng/ChangeLog Mon Jun 17 20:04:32 2002 --- gsl-1.3/rng/ChangeLog Mon Nov 25 19:27:34 2002 *************** *** 1,2 **** --- 1,11 ---- + Mon Nov 25 19:27:10 2002 Brian Gough + + * taus.c (taus2_set): fixed bug in seeding for s3 (test should be + for s3<16, not s3<8) + + Sun Nov 3 14:40:43 2002 Brian Gough + + * taus.c (taus2_set): fixed bug in seeding for s2 < 8 + Mon Jun 17 21:04:10 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/rng/TODO gsl-1.3/rng/TODO *** gsl-1.2/rng/TODO Tue Dec 4 21:33:15 2001 --- gsl-1.3/rng/TODO Fri Jul 26 17:46:53 2002 *************** *** 1,2 **** --- 1,5 ---- + * Sort out "const" in prototypes, it looks odd since there are consts + for many functions which modify the state. (Applies to both qrng and rng) + * New 64 bit generators in "Tables of 64-bit Mersenne Twisters", Takuji Nishimura, ACM Transactions on Modeling and Computer diff -x *.info* -rc2P gsl-1.2/rng/taus.c gsl-1.3/rng/taus.c *** gsl-1.2/rng/taus.c Fri Apr 26 20:15:07 2002 --- gsl-1.3/rng/taus.c Mon Nov 25 19:27:05 2002 *************** *** 72,75 **** --- 72,82 ---- The generator taus2 has been added to satisfy this requirement. The original taus generator is unchanged. + + Update: November 2002 + + There was a bug in the correction to the seeding procedure for s2. + It affected the following seeds 254679140 1264751179 1519430319 + 2274823218 2529502358 3284895257 3539574397 (s2 < 8). + */ *************** *** 140,146 **** if (state->s1 < 2) state->s1 += 2UL; state->s2 = LCG (state->s1); ! if (state->s2 < 8) state->s1 += 8UL; state->s3 = LCG (state->s2); ! if (state->s3 < 8) state->s3 += 16UL; /* "warm it up" */ --- 147,153 ---- if (state->s1 < 2) state->s1 += 2UL; state->s2 = LCG (state->s1); ! if (state->s2 < 8) state->s2 += 8UL; state->s3 = LCG (state->s2); ! if (state->s3 < 16) state->s3 += 16UL; /* "warm it up" */ diff -x *.info* -rc2P gsl-1.2/siman/ChangeLog gsl-1.3/siman/ChangeLog *** gsl-1.2/siman/ChangeLog Fri Jun 14 21:03:15 2002 --- gsl-1.3/siman/ChangeLog Sat Aug 3 19:33:09 2002 *************** *** 1,2 **** --- 1,7 ---- + Sat Aug 3 20:32:38 2002 Brian Gough + + * siman.c (gsl_siman_solve): fix acceptance criterion to match + documentation (Peter S. Christopher) + Thu Jun 13 20:57:00 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/siman/TODO gsl-1.3/siman/TODO *** gsl-1.2/siman/TODO Mon May 8 10:39:38 2000 --- gsl-1.3/siman/TODO Fri Jul 26 17:46:53 2002 *************** *** 1,2 **** --- 1,4 ---- + * Reorganize siman interfaces to allow iterative use. + * Maybe the routines can be made to work with pointers instead of structs so that only pointer manipulation is done by the siman algorithm and diff -x *.info* -rc2P gsl-1.2/siman/siman.c gsl-1.3/siman/siman.c *** gsl-1.2/siman/siman.c Fri Jun 14 21:03:15 2002 --- gsl-1.3/siman/siman.c Sat Aug 3 19:23:11 2002 *************** *** 113,118 **** E = new_E; ++n_eless; ! } else if (exp (-(E - new_E)/(params.k * T)) ! * gsl_rng_uniform(r) < 0.5) { /* yay! take a step */ if (copyfunc) { --- 113,117 ---- E = new_E; ++n_eless; ! } else if (gsl_rng_uniform(r) < exp (-(new_E - E)/(params.k * T)) ) { /* yay! take a step */ if (copyfunc) { diff -x *.info* -rc2P gsl-1.2/specfunc/ChangeLog gsl-1.3/specfunc/ChangeLog *** gsl-1.2/specfunc/ChangeLog Sat Jul 13 22:12:23 2002 --- gsl-1.3/specfunc/ChangeLog Sat Sep 7 14:56:43 2002 *************** *** 1,2 **** --- 1,12 ---- + Sat Sep 7 15:56:15 2002 Brian Gough + + * test_sf.h (TEST_FACTOR): include an overall factor in the test + tolerances, otherwise there are too many bug reports for minor + failures. + + Sun Sep 1 17:34:27 2002 Brian Gough + + * test_legendre.c (test_legendre): increased tolerance on test + Sat Jul 13 23:11:37 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/specfunc/TODO gsl-1.3/specfunc/TODO *** gsl-1.2/specfunc/TODO Sat May 29 19:12:27 1999 --- gsl-1.3/specfunc/TODO Wed Nov 6 23:01:58 2002 *************** *** 1,4 **** ! *-text-*- ! RCS: $Id: TODO,v 1.21 1999/05/16 16:58:43 jungman Exp $ --- 1,39 ---- ! * add Fresnel Integrals to specfunc. See TOMS 723 + 2 subsequent ! errata. ! ! * make mode variables consistent in specfunc -- some seem to be ! unnecessary from performance point of view since the speed difference ! is negligible. ! ! * From: "Alexander Babansky" ! To: "Brian Gough" ! Subject: Re: gsl-1.2 ! Date: Sun, 3 Nov 2002 14:15:15 -0500 ! ! Hi Brian, ! May I suggest you to add another function to gsl-1.2 ? ! It's a modified Ei(x) function: ! ! Em(x)=exp(-x)*Ei(x); ! ! As u might know, Ei(x) raises as e^x on the negative interval. ! Therefore, Ei(100) is very very large. ! But Ei(100)*exp(-100) = 0.010; ! ! Unfortunately, if u try x=800 u'll get overflow in Ei(800). ! but Ei(800)*exp(-800) should be around 0.0001; ! ! Modified function Em(x) is used in cos, sin integrals such as: ! int_0^\infinity dx sin(bx)/(x^2+z^2)=(1/2z)*(Em(bz)-Em(-bz)); ! ! int_0^\infinity dx x cos(bx)/(x^2+z^2)=(1/2)*(Em(bz)+Em(-bz)); ! ! One of possible ways to add it to the library is: ! Em(x) = - PV int_0^\infinity e^(-t)/(t+x) dt ! ! Sincerely, ! Alex ! ! DONE: Wed Nov 6 13:06:42 MST 2002 [GJ] diff -x *.info* -rc2P gsl-1.2/specfunc/coupling.c gsl-1.3/specfunc/coupling.c *** gsl-1.2/specfunc/coupling.c Mon Nov 19 21:39:28 2001 --- gsl-1.3/specfunc/coupling.c Tue Dec 10 19:56:31 2002 *************** *** 1,5 **** /* specfunc/coupling.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/coupling.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 90,100 **** int two_ma, int two_mb, int two_mc) { ! return ( abs(two_ma) > two_ja ! || abs(two_mb) > two_jb ! || abs(two_mc) > two_jc ! || GSL_IS_ODD(two_ja + two_ma) ! || GSL_IS_ODD(two_jb + two_mb) ! || GSL_IS_ODD(two_jc + two_mc) ! || (two_ma + two_mb + two_mc) != 0 ); } --- 90,101 ---- int two_ma, int two_mb, int two_mc) { ! return ( ! abs(two_ma) > two_ja ! || abs(two_mb) > two_jb ! || abs(two_mc) > two_jc ! || GSL_IS_ODD(two_ja + two_ma) ! || GSL_IS_ODD(two_jb + two_mb) ! || GSL_IS_ODD(two_jc + two_mc) ! || (two_ma + two_mb + two_mc) != 0 ); } *************** *** 105,110 **** int gsl_sf_coupling_3j_e(int two_ja, int two_jb, int two_jc, ! int two_ma, int two_mb, int two_mc, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ --- 106,111 ---- int gsl_sf_coupling_3j_e(int two_ja, int two_jb, int two_jc, ! int two_ma, int two_mb, int two_mc, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ *************** *** 197,203 **** int ! gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ --- 198,204 ---- int ! gsl_sf_coupling_6j_INCORRECT_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ *************** *** 248,252 **** phase = GSL_IS_ODD((two_ja + two_jb + two_jc + two_jd + tkmin)/2) ? -1.0 ! : 1.0; for(tk=tkmin; tk<=tkmax; tk += 2) { --- 249,253 ---- phase = GSL_IS_ODD((two_ja + two_jb + two_jc + two_jd + tkmin)/2) ? -1.0 ! : 1.0; for(tk=tkmin; tk<=tkmax; tk += 2) { *************** *** 256,260 **** gsl_sf_result d1_a, d1_b; status = 0; ! status += gsl_sf_fact_e((two_ja + two_jb + two_jc + two_jd - tk)/2 + 1, &n1); status += gsl_sf_fact_e(tk/2, &d1_a); --- 257,261 ---- gsl_sf_result d1_a, d1_b; status = 0; ! status += gsl_sf_fact_e((two_ja + two_jb + two_jc + two_jd - tk)/2 + 1, &n1); status += gsl_sf_fact_e(tk/2, &d1_a); *************** *** 265,269 **** status += gsl_sf_fact_e((two_ja + two_jc - two_jf - tk)/2, &d5); status += gsl_sf_fact_e((two_jb + two_jd - two_jf - tk)/2, &d6); ! if(status != GSL_SUCCESS) { OVERFLOW_ERROR(result); --- 266,270 ---- status += gsl_sf_fact_e((two_ja + two_jc - two_jf - tk)/2, &d5); status += gsl_sf_fact_e((two_jb + two_jd - two_jf - tk)/2, &d6); ! if(status != GSL_SUCCESS) { OVERFLOW_ERROR(result); *************** *** 310,317 **** int gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! int two_jg, int two_jh, int two_ji, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ --- 311,339 ---- int + gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result) + { + return gsl_sf_coupling_6j_INCORRECT_e(two_ja, two_jb, two_je, two_jd, two_jc, two_jf, result); + } + + + int + gsl_sf_coupling_RacahW_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result) + { + int status = gsl_sf_coupling_6j_INCORRECT_e(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, result); + int phase_sum = (two_ja + two_jb + two_jc + two_jd)/2; + result->val *= ( GSL_IS_ODD(phase_sum) ? -1.0 : 1.0 ); + return status; + } + + + int gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! int two_jg, int two_jh, int two_ji, ! gsl_sf_result * result) { /* CHECK_POINTER(result) */ *************** *** 347,353 **** double term_err; int status = 0; ! status += gsl_sf_coupling_6j_e(two_ja, two_ji, two_jd, two_jh, tk, two_jg, &s1); ! status += gsl_sf_coupling_6j_e(two_jb, two_jf, two_jh, two_jd, tk, two_je, &s2); ! status += gsl_sf_coupling_6j_e(two_ja, two_ji, two_jb, two_jf, tk, two_jc, &s3); if(status != GSL_SUCCESS) { OVERFLOW_ERROR(result); --- 369,377 ---- double term_err; int status = 0; ! ! status += gsl_sf_coupling_6j_e(two_ja, two_ji, tk, two_jh, two_jd, two_jg, &s1); ! status += gsl_sf_coupling_6j_e(two_jb, two_jf, tk, two_jd, two_jh, two_je, &s2); ! status += gsl_sf_coupling_6j_e(two_ja, two_ji, tk, two_jf, two_jb, two_jc, &s3); ! if(status != GSL_SUCCESS) { OVERFLOW_ERROR(result); *************** *** 393,396 **** --- 417,429 ---- + double gsl_sf_coupling_6j_INCORRECT(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf) + { + EVAL_RESULT(gsl_sf_coupling_6j_INCORRECT_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + &result)); + } + + double gsl_sf_coupling_6j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf) *************** *** 399,402 **** --- 432,444 ---- two_jd, two_je, two_jf, &result)); + } + + + double gsl_sf_coupling_RacahW(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf) + { + EVAL_RESULT(gsl_sf_coupling_RacahW_e(two_ja, two_jb, two_jc, + two_jd, two_je, two_jf, + &result)); } diff -x *.info* -rc2P gsl-1.2/specfunc/expint.c gsl-1.3/specfunc/expint.c *** gsl-1.2/specfunc/expint.c Mon Nov 19 21:39:28 2001 --- gsl-1.3/specfunc/expint.c Wed Nov 6 23:01:58 2002 *************** *** 1,5 **** /* specfunc/expint.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/expint.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 282,289 **** - /*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ - ! int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result) { const double xmaxt = -GSL_LOG_DBL_MIN; /* XMAXT = -LOG (R1MACH(1)) */ --- 282,289 ---- ! /* implementation for E1, allowing for scaling by exp(x) */ ! static ! int expint_E1_impl(const double x, gsl_sf_result * result, const int scale) { const double xmaxt = -GSL_LOG_DBL_MIN; /* XMAXT = -LOG (R1MACH(1)) */ *************** *** 292,300 **** /* CHECK_POINTER(result) */ ! if(x < -xmax) { ! OVERFLOW_ERROR(result); } else if(x <= -10.0) { ! const double s = exp(-x)/x; gsl_sf_result result_c; cheb_eval_e(&AE11_cs, 20.0/x+1.0, &result_c); --- 292,300 ---- /* CHECK_POINTER(result) */ ! if(x < -xmax && !scale) { ! OVERFLOW_ERROR(result); } else if(x <= -10.0) { ! const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); gsl_sf_result result_c; cheb_eval_e(&AE11_cs, 20.0/x+1.0, &result_c); *************** *** 305,309 **** } else if(x <= -4.0) { ! const double s = exp(-x)/x; gsl_sf_result result_c; cheb_eval_e(&AE12_cs, (40.0/x+7.0)/3.0, &result_c); --- 305,309 ---- } else if(x <= -4.0) { ! const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); gsl_sf_result result_c; cheb_eval_e(&AE12_cs, (40.0/x+7.0)/3.0, &result_c); *************** *** 315,322 **** else if(x <= -1.0) { const double ln_term = -log(fabs(x)); gsl_sf_result result_c; cheb_eval_e(&E11_cs, (2.0*x+5.0)/3.0, &result_c); ! result->val = ln_term + result_c.val; ! result->err = result_c.err + GSL_DBL_EPSILON * fabs(ln_term); result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); return GSL_SUCCESS; --- 315,323 ---- else if(x <= -1.0) { const double ln_term = -log(fabs(x)); + const double scale_factor = ( scale ? exp(x) : 1.0 ); gsl_sf_result result_c; cheb_eval_e(&E11_cs, (2.0*x+5.0)/3.0, &result_c); ! result->val = scale_factor * (ln_term + result_c.val); ! result->err = scale_factor * (result_c.err + GSL_DBL_EPSILON * fabs(ln_term)); result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); return GSL_SUCCESS; *************** *** 327,339 **** else if(x <= 1.0) { const double ln_term = -log(fabs(x)); gsl_sf_result result_c; cheb_eval_e(&E12_cs, x, &result_c); ! result->val = ln_term - 0.6875 + x + result_c.val; ! result->err = result_c.err + GSL_DBL_EPSILON * fabs(ln_term); result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); return GSL_SUCCESS; } else if(x <= 4.0) { ! const double s = exp(-x)/x; gsl_sf_result result_c; cheb_eval_e(&AE13_cs, (8.0/x-5.0)/3.0, &result_c); --- 328,341 ---- else if(x <= 1.0) { const double ln_term = -log(fabs(x)); + const double scale_factor = ( scale ? exp(x) : 1.0 ); gsl_sf_result result_c; cheb_eval_e(&E12_cs, x, &result_c); ! result->val = scale_factor * (ln_term - 0.6875 + x + result_c.val); ! result->err = scale_factor * (result_c.err + GSL_DBL_EPSILON * fabs(ln_term)); result->err += 2.0 * GSL_DBL_EPSILON * fabs(result->val); return GSL_SUCCESS; } else if(x <= 4.0) { ! const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); gsl_sf_result result_c; cheb_eval_e(&AE13_cs, (8.0/x-5.0)/3.0, &result_c); *************** *** 343,348 **** return GSL_SUCCESS; } ! else if(x <= xmax) { ! const double s = exp(-x)/x; gsl_sf_result result_c; cheb_eval_e(&AE14_cs, 8.0/x-1.0, &result_c); --- 345,350 ---- return GSL_SUCCESS; } ! else if(x <= xmax || scale) { ! const double s = 1.0/x * ( scale ? 1.0 : exp(-x) ); gsl_sf_result result_c; cheb_eval_e(&AE14_cs, 8.0/x-1.0, &result_c); *************** *** 350,354 **** result->err = s * (GSL_DBL_EPSILON + result_c.err); result->err += 2.0 * (x + 1.0) * GSL_DBL_EPSILON * fabs(result->val); ! return GSL_SUCCESS; } else { --- 352,359 ---- result->err = s * (GSL_DBL_EPSILON + result_c.err); result->err += 2.0 * (x + 1.0) * GSL_DBL_EPSILON * fabs(result->val); ! if(result->val == 0.0) ! UNDERFLOW_ERROR(result); ! else ! return GSL_SUCCESS; } else { *************** *** 358,362 **** ! int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result) { const double xmaxt = -GSL_LOG_DBL_MIN; --- 363,368 ---- ! static ! int expint_E2_impl(const double x, gsl_sf_result * result, const int scale) { const double xmaxt = -GSL_LOG_DBL_MIN; *************** *** 365,375 **** /* CHECK_POINTER(result) */ ! if(x < -xmax) { OVERFLOW_ERROR(result); } else if(x < 100.0) { ! const double ex = exp(-x); gsl_sf_result result_E1; ! int stat_E1 = gsl_sf_expint_E1_e(x, &result_E1); result->val = ex - x*result_E1.val; result->err = fabs(x) * (GSL_DBL_EPSILON*ex + result_E1.err); --- 371,381 ---- /* CHECK_POINTER(result) */ ! if(x < -xmax && !scale) { OVERFLOW_ERROR(result); } else if(x < 100.0) { ! const double ex = ( scale ? 1.0 : exp(-x) ); gsl_sf_result result_E1; ! int stat_E1 = expint_E1_impl(x, &result_E1, scale); result->val = ex - x*result_E1.val; result->err = fabs(x) * (GSL_DBL_EPSILON*ex + result_E1.err); *************** *** 377,381 **** return stat_E1; } ! else if(x < xmax) { const double c1 = -2.0; const double c2 = 6.0; --- 383,388 ---- return stat_E1; } ! else if(x < xmax || scale) { ! const double s = ( scale ? 1.0 : exp(-x) ); const double c1 = -2.0; const double c2 = 6.0; *************** *** 394,400 **** const double sum6 = c6+y*(c7+y*(c8+y*(c9+y*(c10+y*(c11+y*(c12+y*c13)))))); const double sum = y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*sum6))))); ! result->val = exp(-x) * (1.0 + sum)/x; result->err = 2.0 * (x + 1.0) * GSL_DBL_EPSILON * result->val; ! return GSL_SUCCESS; } else { --- 401,410 ---- const double sum6 = c6+y*(c7+y*(c8+y*(c9+y*(c10+y*(c11+y*(c12+y*c13)))))); const double sum = y*(c1+y*(c2+y*(c3+y*(c4+y*(c5+y*sum6))))); ! result->val = s * (1.0 + sum)/x; result->err = 2.0 * (x + 1.0) * GSL_DBL_EPSILON * result->val; ! if(result->val == 0.0) ! UNDERFLOW_ERROR(result); ! else ! return GSL_SUCCESS; } else { *************** *** 404,407 **** --- 414,445 ---- + + /*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ + + + int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result) + { + return expint_E1_impl(x, result, 0); + } + + + int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result * result) + { + return expint_E1_impl(x, result, 1); + } + + + int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result) + { + return expint_E2_impl(x, result, 0); + } + + + int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result * result) + { + return expint_E2_impl(x, result, 1); + } + + int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result) { *************** *** 415,418 **** --- 453,469 ---- } + + int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result * result) + { + /* CHECK_POINTER(result) */ + + { + int status = gsl_sf_expint_E1_scaled_e(-x, result); + result->val = -result->val; + return status; + } + } + + #if 0 static double recurse_En(int n, double x, double E1) *************** *** 438,441 **** --- 489,497 ---- } + double gsl_sf_expint_E1_scaled(const double x) + { + EVAL_RESULT(gsl_sf_expint_E1_scaled_e(x, &result)); + } + double gsl_sf_expint_E2(const double x) { *************** *** 443,447 **** --- 499,513 ---- } + double gsl_sf_expint_E2_scaled(const double x) + { + EVAL_RESULT(gsl_sf_expint_E2_scaled_e(x, &result)); + } + double gsl_sf_expint_Ei(const double x) + { + EVAL_RESULT(gsl_sf_expint_Ei_e(x, &result)); + } + + double gsl_sf_expint_Ei_scaled(const double x) { EVAL_RESULT(gsl_sf_expint_Ei_e(x, &result)); diff -x *.info* -rc2P gsl-1.2/specfunc/gsl_sf_coupling.h gsl-1.3/specfunc/gsl_sf_coupling.h *** gsl-1.2/specfunc/gsl_sf_coupling.h Mon Jun 10 13:04:38 2002 --- gsl-1.3/specfunc/gsl_sf_coupling.h Tue Dec 10 19:56:31 2002 *************** *** 1,5 **** /* specfunc/gsl_sf_coupling.h * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/gsl_sf_coupling.h * ! * Copyright (C) 1996,1997,1998,1999,2000,2001,2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 58,64 **** */ int gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! gsl_sf_result * result ! ); double gsl_sf_coupling_6j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf --- 58,64 ---- */ int gsl_sf_coupling_6j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! gsl_sf_result * result ! ); double gsl_sf_coupling_6j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf *************** *** 66,69 **** --- 66,85 ---- + /* Racah W coefficients: + * + * W(a b c d; e f) = (-1)^{a+b+c+d} / a b e \ + * \ d c f / + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ + int gsl_sf_coupling_RacahW_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result + ); + double gsl_sf_coupling_RacahW(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf + ); + + /* 9j Symbols: / ja jb jc \ * | jd je jf | *************** *** 73,84 **** */ int gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! int two_jg, int two_jh, int two_ji, ! gsl_sf_result * result ! ); double gsl_sf_coupling_9j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, int two_jg, int two_jh, int two_ji ); --- 89,123 ---- */ int gsl_sf_coupling_9j_e(int two_ja, int two_jb, int two_jc, ! int two_jd, int two_je, int two_jf, ! int two_jg, int two_jh, int two_ji, ! gsl_sf_result * result ! ); double gsl_sf_coupling_9j(int two_ja, int two_jb, int two_jc, int two_jd, int two_je, int two_jf, int two_jg, int two_jh, int two_ji ); + + + /* INCORRECT version of 6j Symbols: + * This function actually calculates + * / ja jb je \ + * \ jd jc jf / + * It represents the original implementation, + * which had the above permutation of the + * arguments. This was wrong and confusing, + * and I had to fix it. Sorry for the trouble. + * [GJ] Tue Nov 26 12:53:39 MST 2002 + * + * exceptions: GSL_EDOM, GSL_EOVRFLW + */ + #ifndef GSL_DISABLE_DEPRECATED + int gsl_sf_coupling_6j_INCORRECT_e(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf, + gsl_sf_result * result + ); + double gsl_sf_coupling_INCORRECT_6j(int two_ja, int two_jb, int two_jc, + int two_jd, int two_je, int two_jf + ); + #endif /* !GSL_DISABLE_DEPRECATED */ diff -x *.info* -rc2P gsl-1.2/specfunc/gsl_sf_expint.h gsl-1.3/specfunc/gsl_sf_expint.h *** gsl-1.2/specfunc/gsl_sf_expint.h Mon Jun 10 13:04:38 2002 --- gsl-1.3/specfunc/gsl_sf_expint.h Wed Nov 6 23:01:58 2002 *************** *** 1,5 **** /* specfunc/gsl_sf_expint.h * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/gsl_sf_expint.h * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 44,48 **** */ int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E1(const double x); --- 44,48 ---- */ int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E1(const double x); *************** *** 53,60 **** */ int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E2(const double x); ! /* Ei(x) := PV Integrate[ Exp[-t]/t, {t,-x,Infinity}] * * x != 0.0 --- 53,79 ---- */ int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E2(const double x); ! /* E_1_scaled(x) := exp(x) E_1(x) ! * ! * x != 0.0 ! * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW ! */ ! int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E1_scaled(const double x); ! ! ! /* E_2_scaled(x) := exp(x) E_2(x) ! * ! * x != 0.0 ! * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW ! */ ! int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_E2_scaled(const double x); ! ! ! /* Ei(x) := - PV Integrate[ Exp[-t]/t, {t,-x,Infinity}] ! * := PV Integrate[ Exp[t]/t, {t,-Infinity,x}] * * x != 0.0 *************** *** 62,66 **** */ int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_Ei(const double x); --- 81,94 ---- */ int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_Ei(const double x); ! ! ! /* Ei_scaled(x) := exp(-x) Ei(x) ! * ! * x != 0.0 ! * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW ! */ ! int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_Ei_scaled(const double x); *************** *** 70,74 **** */ int gsl_sf_Shi_e(const double x, gsl_sf_result * result); ! double gsl_sf_Shi(const double x); --- 98,102 ---- */ int gsl_sf_Shi_e(const double x, gsl_sf_result * result); ! double gsl_sf_Shi(const double x); *************** *** 79,83 **** */ int gsl_sf_Chi_e(const double x, gsl_sf_result * result); ! double gsl_sf_Chi(const double x); --- 107,111 ---- */ int gsl_sf_Chi_e(const double x, gsl_sf_result * result); ! double gsl_sf_Chi(const double x); *************** *** 88,92 **** */ int gsl_sf_expint_3_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_3(double x); --- 116,120 ---- */ int gsl_sf_expint_3_e(const double x, gsl_sf_result * result); ! double gsl_sf_expint_3(double x); *************** *** 96,100 **** */ int gsl_sf_Si_e(const double x, gsl_sf_result * result); ! double gsl_sf_Si(const double x); --- 124,128 ---- */ int gsl_sf_Si_e(const double x, gsl_sf_result * result); ! double gsl_sf_Si(const double x); *************** *** 105,109 **** */ int gsl_sf_Ci_e(const double x, gsl_sf_result * result); ! double gsl_sf_Ci(const double x); --- 133,137 ---- */ int gsl_sf_Ci_e(const double x, gsl_sf_result * result); ! double gsl_sf_Ci(const double x); *************** *** 113,118 **** * exceptions: */ ! int gsl_sf_atanint_e(const double x, gsl_sf_result * result); ! double gsl_sf_atanint(const double x); --- 141,146 ---- * exceptions: */ ! int gsl_sf_atanint_e(const double x, gsl_sf_result * result); ! double gsl_sf_atanint(const double x); diff -x *.info* -rc2P gsl-1.2/specfunc/legendre_poly.c gsl-1.3/specfunc/legendre_poly.c *** gsl-1.2/specfunc/legendre_poly.c Sat May 18 09:52:24 2002 --- gsl-1.3/specfunc/legendre_poly.c Sat Nov 9 09:48:59 2002 *************** *** 234,248 **** { int stat_array = gsl_sf_legendre_Pl_array(lmax, x, result_array); if(stat_array == GSL_SUCCESS) { int ell; ! if((fabs(x) - 1.0) < GSL_DBL_EPSILON) { ! double sgn = x; ! for(ell = 0; ell <= lmax; ell++) { ! result_deriv_array[ell] = sgn * 0.5 * ell * (ell + 1.0); ! sgn *= x; } } --- 234,262 ---- { int stat_array = gsl_sf_legendre_Pl_array(lmax, x, result_array); + + if(lmax >= 0) result_deriv_array[0] = 0.0; + if(lmax >= 1) result_deriv_array[1] = 1.0; + if(stat_array == GSL_SUCCESS) { int ell; ! if(fabs(x - 1.0)*(lmax+1.0)*(lmax+1.0) < GSL_SQRT_DBL_EPSILON) { ! /* x is near 1 */ ! for(ell = 2; ell <= lmax; ell++) { ! const double pre = 0.5 * ell * (ell+1.0); ! result_deriv_array[ell] = pre * (1.0 - 0.25 * (1.0-x) * (ell+2.0)*(ell-1.0)); ! } ! } ! else if(fabs(x + 1.0)*(lmax+1.0)*(lmax+1.0) < GSL_SQRT_DBL_EPSILON) ! { ! /* x is near -1 */ ! for(ell = 2; ell <= lmax; ell++) ! { ! const double sgn = ( GSL_IS_ODD(ell) ? 1.0 : -1.0 ); /* derivative is odd in x for even ell */ ! const double pre = sgn * 0.5 * ell * (ell+1.0); ! result_deriv_array[ell] = pre * (1.0 - 0.25 * (1.0+x) * (ell+2.0)*(ell-1.0)); } } *************** *** 251,256 **** const double diff_a = 1.0 + x; const double diff_b = 1.0 - x; - result_deriv_array[0] = 0.0; - if(lmax >= 1) result_deriv_array[1] = 1.0; for(ell = 2; ell <= lmax; ell++) { --- 265,268 ---- *************** *** 364,368 **** else { double p_mm = legendre_Pmm(m, x); ! double p_mmp1 = x * (2*m + 1) * p_mm; if(lmax == m){ --- 376,380 ---- else { double p_mm = legendre_Pmm(m, x); ! double p_mmp1 = x * (2.0*m + 1.0) * p_mm; if(lmax == m){ *************** *** 385,389 **** for(ell=m+2; ell <= lmax; ell++){ ! p_ell = (x*(2*ell-1)*p_ellm1 - (ell+m-1)*p_ellm2) / (ell-m); p_ellm2 = p_ellm1; p_ellm1 = p_ell; --- 397,401 ---- for(ell=m+2; ell <= lmax; ell++){ ! p_ell = (x*(2.0*ell-1.0)*p_ellm1 - (ell+m-1)*p_ellm2) / (ell-m); p_ellm2 = p_ellm1; p_ellm1 = p_ell; *************** *** 405,414 **** if(m < 0 || m > lmax) { ! GSL_ERROR("domain", GSL_EDOM); } else if(m == 0) { /* It is better to do m=0 this way, so we can more easily ! * trap the divergent cases which can occur when m > 0. */ return gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); --- 417,426 ---- if(m < 0 || m > lmax) { ! GSL_ERROR("m < 0 or m > lmax", GSL_EDOM); } else if(m == 0) { /* It is better to do m=0 this way, so we can more easily ! * trap the divergent case which can occur when m == 1. */ return gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); *************** *** 422,442 **** int ell; ! if((fabs(x) - 1.0) < GSL_DBL_EPSILON) { ! /* m > 0, so the derivative is divergent */ ! for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; ! GSL_ERROR("overflow: |x| near 1", GSL_EOVRFLW); } ! else { ! const double diff_a = 1.0 + x; ! const double diff_b = 1.0 - x; ! result_deriv_array[0] = -2.0 * x / (diff_a * diff_b) * result_array[0]; ! if(lmax >= 1) result_deriv_array[1] = (2 * m + 1) * (x * result_deriv_array[0] + result_array[0]); ! for(ell = m+2; ell <= lmax; ell++) { ! result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); } - return GSL_SUCCESS; } } --- 434,479 ---- int ell; ! if(m == 1 && (1.0 - fabs(x) < GSL_DBL_EPSILON)) { ! /* This divergence is real and comes from the cusp-like ! * behaviour for m = 1. For example, P[1,1] = - Sqrt[1-x^2]. ! */ ! GSL_ERROR("divergence near |x| = 1.0 since m = 1", GSL_EOVRFLW); } ! else if(m == 2 && (1.0 - fabs(x) < GSL_DBL_EPSILON)) { ! /* m = 2 gives a finite nonzero result for |x| near 1 */ ! if(fabs(x - 1.0) < GSL_DBL_EPSILON) { ! for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = -0.25 * x * (ell - 1.0)*ell*(ell+1.0)*(ell+2.0); ! } ! else if(fabs(x + 1.0) < GSL_DBL_EPSILON) ! { ! for(ell = m; ell <= lmax; ell++) ! { ! const double sgn = ( GSL_IS_ODD(ell) ? 1.0 : -1.0 ); ! result_deriv_array[ell-m] = -0.25 * sgn * x * (ell - 1.0)*ell*(ell+1.0)*(ell+2.0); ! } ! } ! } ! else ! { ! /* m > 2 is easier to deal with since the endpoints always vanish */ ! if(1.0 - fabs(x) < GSL_DBL_EPSILON) ! { ! for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; ! } ! else ! { ! const double diff_a = 1.0 + x; ! const double diff_b = 1.0 - x; ! result_deriv_array[0] = - m * x / (diff_a * diff_b) * result_array[0]; ! if(lmax-m >= 1) result_deriv_array[1] = (2.0 * m + 1.0) * (x * result_deriv_array[0] + result_array[0]); ! for(ell = m+2; ell <= lmax; ell++) ! { ! result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); ! } ! return GSL_SUCCESS; } } } *************** *** 617,623 **** else if(m == 0) { ! /* As above, we like to handle the m=0 case separately, ! * so that handling the possible divergences is easier. ! */ const int stat_array = gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); int ell; --- 654,658 ---- else if(m == 0) { ! /* m = 0 is easy to trap */ const int stat_array = gsl_sf_legendre_Pl_deriv_array(lmax, x, result_array, result_deriv_array); int ell; *************** *** 630,635 **** --- 665,688 ---- return stat_array; } + else if(m == 1) + { + /* Trapping m = 1 is necessary because of the possible divergence. + * Recall that this divergence is handled properly in ..._Plm_deriv_array(), + * and the scaling factor is not large for small m, so we just scale. + */ + const int stat_array = gsl_sf_legendre_Plm_deriv_array(lmax, m, x, result_array, result_deriv_array); + int ell; + for(ell = 1; ell <= lmax; ell++) + { + const double prefactor = sqrt((2.0 * ell + 1.0)/(ell + 1.0) / (4.0*M_PI*ell)); + result_array[ell-1] *= prefactor; + result_deriv_array[ell-1] *= prefactor; + } + return stat_array; + } else { + /* as for the derivative of P_lm, everything is regular for m >= 2 */ + int stat_array = gsl_sf_legendre_sphPlm_array(lmax, m, x, result_array); *************** *** 638,646 **** int ell; ! if((fabs(x) - 1.0) < GSL_DBL_EPSILON) { - /* m > 0, so the derivative is divergent */ for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; - GSL_ERROR("overflow: |x| near 1", GSL_EOVRFLW); } else --- 691,697 ---- int ell; ! if(1.0 - fabs(x) < GSL_DBL_EPSILON) { for(ell = m; ell <= lmax; ell++) result_deriv_array[ell-m] = 0.0; } else *************** *** 648,656 **** const double diff_a = 1.0 + x; const double diff_b = 1.0 - x; ! result_deriv_array[0] = -2.0 * x / (diff_a * diff_b) * result_array[0]; ! if(lmax >= 1) result_deriv_array[1] = (2 * m + 1) * (x * result_deriv_array[0] + result_array[0]); for(ell = m+2; ell <= lmax; ell++) { ! const double c1 = sqrt(((2.0*ell+1.0)/(2.0*ell-1.0))*((ell-m)*(ell+m))); result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - c1 * (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); } --- 699,707 ---- const double diff_a = 1.0 + x; const double diff_b = 1.0 - x; ! result_deriv_array[0] = - m * x / (diff_a * diff_b) * result_array[0]; ! if(lmax-m >= 1) result_deriv_array[1] = sqrt(2.0 * m + 3.0) * (x * result_deriv_array[0] + result_array[0]); for(ell = m+2; ell <= lmax; ell++) { ! const double c1 = sqrt(((2.0*ell+1.0)/(2.0*ell-1.0)) * ((double)(ell-m)/(double)(ell+m))); result_deriv_array[ell-m] = - (ell * x * result_array[ell-m] - c1 * (ell+m) * result_array[ell-1-m]) / (diff_a * diff_b); } *************** *** 673,676 **** --- 724,728 ---- } #endif + /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ diff -x *.info* -rc2P gsl-1.2/specfunc/test_legendre.c gsl-1.3/specfunc/test_legendre.c *** gsl-1.2/specfunc/test_legendre.c Sun Jul 7 21:36:04 2002 --- gsl-1.3/specfunc/test_legendre.c Tue Nov 12 22:33:02 2002 *************** *** 1,5 **** /* specfunc/test_legendre.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/test_legendre.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 29,33 **** { gsl_sf_result r; ! double L[256]; int s = 0; int sa; --- 29,33 ---- { gsl_sf_result r; ! double L[256], DL[256]; int s = 0; int sa; *************** *** 74,83 **** sa = 0; gsl_sf_legendre_Pl_array(100, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, 1.0, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, -0.18822860717773437500, TEST_TOL1); TEST_SF_VAL(sa, L[100], +0.0, -0.06051802596186118687, TEST_TOL1); ! gsl_test(sa, " gsl_sf_legendre_Pl_array(100)"); s += sa; TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, -0.5, &r), -0.18822860717773437500, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, 1.0e-08, &r), -0.24609374999999864648, TEST_TOL0, GSL_SUCCESS); --- 74,122 ---- sa = 0; gsl_sf_legendre_Pl_array(100, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, 1.0, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, -0.18822860717773437500, TEST_TOL1); TEST_SF_VAL(sa, L[100], +0.0, -0.06051802596186118687, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_Pl_array(100, 0.5)"); s += sa; + sa = 0; + gsl_sf_legendre_Pl_deriv_array(100, 0.5, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -2.3171234130859375000, TEST_TOL1); + TEST_SF_VAL(sa, DL[100], +0.0, -7.0331691653942815112, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(100, 0.5)"); + s += sa; + sa = 0; + + gsl_sf_legendre_Pl_deriv_array(10, 1.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 55.0, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, 1.0)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, 1.0 - 1.0e-11, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, 54.999999985150000001, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, 1.0 - 1.0e-11)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, -1.0, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -55.0, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, -1.0)"); + s += sa; + + gsl_sf_legendre_Pl_deriv_array(10, -1.0 + 1.0e-11, L, DL); + TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[1], +0.0, 1.0, TEST_TOL1); + TEST_SF_VAL(sa, DL[10], +0.0, -54.999999985150000001, TEST_TOL1); + gsl_test(sa, "gsl_sf_legendre_Pl_deriv_array(10, -1.0 + 1.0e-11)"); + s += sa; + + TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, -0.5, &r), -0.18822860717773437500, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_Plm_e, (10, 0, 1.0e-08, &r), -0.24609374999999864648, TEST_TOL0, GSL_SUCCESS); *************** *** 98,107 **** TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, 0.999, &r), -1.9831610803806212189e+09, TEST_TOL2, GSL_SUCCESS); sa = 0; gsl_sf_legendre_Plm_array(100, 5, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, -460.3466286991656682, TEST_TOL1); TEST_SF_VAL(sa, L[10], +0.0, 38852.51334152290535, TEST_TOL1 ); TEST_SF_VAL(sa, L[95], +0.0, 6.617107444248382171e+08, TEST_TOL1); ! gsl_test(sa, " gsl_sf_legendre_Plm_array(100, 5, 0.5)"); s += sa; --- 137,220 ---- TEST_SF(s, gsl_sf_legendre_Plm_e, (100, 5, 0.999, &r), -1.9831610803806212189e+09, TEST_TOL2, GSL_SUCCESS); + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, L[0], +0.0, 5.3290705182007490275e-15, TEST_TOL1); + TEST_SF_VAL(sa, L[1], +0.0, -2.6645352591003721471e-14, TEST_TOL1); + TEST_SF_VAL(sa, L[98], +0.0, 2.2646284847349109694e-08, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 2^(-50)"); + s += sa; + + sa = 0; + gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0/1125899906842624.0, L, DL); + TEST_SF_VAL(sa, L[0], +0.0, 5.3290705182007490275e-15, TEST_TOL1); + TEST_SF_VAL(sa, L[1], +0.0, 2.6645352591003721471e-14, TEST_TOL1); + TEST_SF_VAL(sa, L[10], +0.0, 5.3343995887188313290e-12, TEST_TOL1); + TEST_SF_VAL(sa, L[98], +0.0, 2.2646284847349109694e-08, TEST_TOL2); + gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 2^(-50)"); + s += sa; + sa = 0; gsl_sf_legendre_Plm_array(100, 5, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, -460.3466286991656682, TEST_TOL1); TEST_SF_VAL(sa, L[10], +0.0, 38852.51334152290535, TEST_TOL1 ); TEST_SF_VAL(sa, L[95], +0.0, 6.617107444248382171e+08, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, 0.5)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_array(100, 5, 0.999, L); ! TEST_SF_VAL(sa, L[0], +0.0, -0.00016883550990916552255, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, -30.651334850159821525, TEST_TOL1 ); ! TEST_SF_VAL(sa, L[95], +0.0, -1.9831610803806212189e+09, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, 0.999)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_array(100, 5, -0.999, L); ! TEST_SF_VAL(sa, L[0], +0.0, -0.00016883550990916552255, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, -30.651334850159821525, TEST_TOL1 ); ! TEST_SF_VAL(sa, L[95], +0.0, 1.9831610803806212189e+09, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_Plm_array(100, 5, -0.999)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_deriv_array(100, 2, 0.999, L, DL); ! TEST_SF_VAL(sa, L[0], +0.0, 0.00599700000000000000, TEST_TOL1); ! TEST_SF_VAL(sa, L[1], +0.0, 0.02995501500000000000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[0], +0.0, -5.9940000000000000000, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, -29.910045000000000000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[2], +0.0, -89.490629790000000000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[10], +0.0, -5703.9461633355291972, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[95], +0.0, 6.4518473603456858414E+06, TEST_TOL3); ! gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 0.999)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0e-15, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, -5.9999999999999940000, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, -29.999999999999910000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[2], +0.0, -89.999999999999490000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[10], +0.0, -6005.9999999996936940, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[95], +0.0, -2.2586255999928454270e+07, TEST_TOL3); ! gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, 1.0 - 1.0e-15)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0e-15, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 5.9999999999999940000, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, -29.999999999999910000, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[95], +0.0, -2.2586255999928454270e+07, TEST_TOL3); ! gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 2, -1.0 + 1.0e-15)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_Plm_deriv_array(100, 5, 0.999, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 0.42187762481054616565, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 4.6341560284340909936, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[2], +0.0, 27.759505566959219127, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[10], +0.0, 76051.795860179545484, TEST_TOL1 ); ! TEST_SF_VAL(sa, DL[95], +0.0, 3.0344503083851936814e+12, TEST_TOL3); ! gsl_test(sa, "gsl_sf_legendre_Plm_deriv_array(100, 5, 0.999)"); s += sa; *************** *** 125,132 **** sa = 0; gsl_sf_legendre_sphPlm_array(100, 5, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, -0.22609703187800460722, TEST_TOL3); ! TEST_SF_VAL(sa, L[10], +0.0, 0.07452710323813558940, TEST_TOL3); ! TEST_SF_VAL(sa, L[95], +0.0, 0.25865355990880161717, TEST_TOL3); ! gsl_test(sa, " gsl_sf_legendre_sphPlm_array(100, 5, 0.5)"); s += sa; --- 238,324 ---- sa = 0; gsl_sf_legendre_sphPlm_array(100, 5, 0.5, L); ! TEST_SF_VAL(sa, L[0], +0.0, -0.22609703187800460722, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, 0.07452710323813558940, TEST_TOL1); ! TEST_SF_VAL(sa, L[95], +0.0, 0.25865355990880161717, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 5, 0.5)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_array(100, 2, 1.0 - 1.0/1125899906842624.0, L); ! TEST_SF_VAL(sa, L[0], +0.0, 6.8616082064776657177e-16, TEST_TOL1); ! TEST_SF_VAL(sa, L[10], +0.0, 4.8543150313086787324e-14, TEST_TOL1); ! TEST_SF_VAL(sa, L[95], +0.0, 8.3138984963650838973e-12, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 2, 1.0 - 2^(-50))"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_array(100, 2, -1.0 + 1.0/1125899906842624.0, L); ! TEST_SF_VAL(sa, L[0], +0.0, 6.8616082064776657177e-16, TEST_TOL1); ! TEST_SF_VAL(sa, L[95], +0.0, -8.3138984963650838973e-12, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_array(100, 2, -1.0 + 2^(-50))"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_deriv_array(100, 0, 0.5, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 0.0, TEST_TOL1); ! TEST_SF_VAL(sa, DL[10], +0.0, -2.9953934850252897591, TEST_TOL1); ! TEST_SF_VAL(sa, DL[95], +0.0, -36.411811015111761007, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 0, 0.5)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_deriv_array(100, 1, 0.5, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 0.19947114020071633897, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, -0.44603102903819277863, TEST_TOL1); ! TEST_SF_VAL(sa, DL[10], +0.0, 1.3658895325030216565, TEST_TOL1); ! TEST_SF_VAL(sa, DL[99], +0.0, -27.925571865639037118, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 1, 0.5)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_deriv_array(100, 1, 1.0 - 1.0/1125899906842624.0, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 8.1973898803378530946e+06, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 1.8329921010504257405e+07, TEST_TOL1); ! TEST_SF_VAL(sa, DL[10], +0.0, 1.8439572562895384115e+08, TEST_TOL1); ! TEST_SF_VAL(sa, DL[99], +0.0, 4.7682463136232210552e+09, TEST_TOL3); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 1, 1.0 - 2^(-50))"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_deriv_array(100, 2, 0.5, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, -0.38627420202318958034, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 0.25549636910832059085, TEST_TOL1); ! TEST_SF_VAL(sa, DL[2], +0.0, 1.5053547230039006279, TEST_TOL1); ! TEST_SF_VAL(sa, DL[10], +0.0, 0.73576559668648243477, TEST_TOL1); ! TEST_SF_VAL(sa, DL[98], +0.0, 28.444589950264378407, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 2, 0.5)"); ! s += sa; ! ! sa = 0; ! gsl_sf_legendre_sphPlm_deriv_array(100, 5, 0.5, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 0.75365677292668202407, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 0.54346962777757450534, TEST_TOL1); ! TEST_SF_VAL(sa, DL[2], +0.0, -0.98309969029001383773, TEST_TOL1); ! TEST_SF_VAL(sa, DL[3], +0.0, -2.7728270988954534293, TEST_TOL1); ! TEST_SF_VAL(sa, DL[10], +0.0, -5.7407133315443482193, TEST_TOL1); ! TEST_SF_VAL(sa, DL[95], +0.0, -25.893934624747394561, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, 0.5)"); ! s += sa; ! sa = 0; ! ! gsl_sf_legendre_sphPlm_deriv_array(100, 5, 1.0 - 1.0/1125899906842624.0, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, 1.7374288379067753301e-22, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 6.2643887625426827113e-22, TEST_TOL1); ! TEST_SF_VAL(sa, DL[2], +0.0, 1.6482697200734667281e-21, TEST_TOL1); ! TEST_SF_VAL(sa, DL[95], +0.0, 3.9890549466071349506e-15, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, 1.0 - 2^(-50))"); ! s += sa; ! ! gsl_sf_legendre_sphPlm_deriv_array(100, 5, -1.0 + 1.0/1125899906842624.0, L, DL); ! TEST_SF_VAL(sa, DL[0], +0.0, -1.7374288379067753301e-22, TEST_TOL1); ! TEST_SF_VAL(sa, DL[1], +0.0, 6.2643887625426827113e-22, TEST_TOL1); ! TEST_SF_VAL(sa, DL[2], +0.0, -1.6482697200734667281e-21, TEST_TOL1); ! TEST_SF_VAL(sa, DL[95], +0.0, 3.9890549466071349506e-15, TEST_TOL1); ! gsl_test(sa, "gsl_sf_legendre_sphPlm_deriv_array(100, 5, -1.0 + 2^(-50))"); s += sa; *************** *** 257,261 **** TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 100.0, &r), -7.200624449531811272e-44, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 500.0, &r), 4.192260336821728677e-218, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 0.01, &r), 0.30117664944267412324 , TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 1.0, &r), -0.007393833425336299309 , TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 10.0, &r), -5.031062029821254982e-07 , TEST_TOL0, GSL_SUCCESS); --- 449,453 ---- TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 100.0, &r), -7.200624449531811272e-44, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (1.0, 500.0, &r), 4.192260336821728677e-218, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 0.01, &r), 0.30117664944267412324 , TEST_TOL1, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 1.0, &r), -0.007393833425336299309 , TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_legendre_H3d_1_e, (100.0, 10.0, &r), -5.031062029821254982e-07 , TEST_TOL0, GSL_SUCCESS); diff -x *.info* -rc2P gsl-1.2/specfunc/test_sf.c gsl-1.3/specfunc/test_sf.c *** gsl-1.2/specfunc/test_sf.c Tue May 28 20:07:54 2002 --- gsl-1.3/specfunc/test_sf.c Tue Dec 10 19:56:31 2002 *************** *** 1,5 **** /* specfunc/test_sf.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Gerard Jungman * * This program is free software; you can redistribute it and/or modify --- 1,5 ---- /* specfunc/test_sf.c * ! * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman * * This program is free software; you can redistribute it and/or modify *************** *** 294,306 **** int s = 0; ! TEST_SF(s, gsl_sf_coupling_3j_e, (0, 1, 1, 0, 1, -1, &r), sqrt(1.0/2.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 1, -1, 0, &r), sqrt(1.0/6.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (2, 4, 6, 0, 2, -2, &r), sqrt(8.0/105.0), TEST_TOL0, GSL_SUCCESS); ! ! TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 2, 2, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); ! ! TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 1, 2, &r), - sqrt(1.0/6.0) / 10.0, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_9j_e, (8, 4, 10, 7, 3, 8, 1, 1, 2, &r), sqrt(7.0/3.0)/60.0, TEST_TOL2, GSL_SUCCESS); return s; --- 294,314 ---- int s = 0; ! TEST_SF(s, gsl_sf_coupling_3j_e, (0, 1, 1, 0, 1, -1, &r), sqrt(1.0/2.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (1, 1, 2, 1, -1, 0, &r), sqrt(1.0/6.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (2, 4, 6, 0, 2, -2, &r), sqrt(8.0/105.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 0, 0, 0, &r), sqrt(2.0/35.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 2, -2, 0, &r), 2.0/3.0*sqrt(2.0/35.0), TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_3j_e, (4, 4, 8, 4, -4, 0, &r), 1.0/(3.0*sqrt(70.0)), TEST_TOL2, GSL_SUCCESS); ! ! TEST_SF(s, gsl_sf_coupling_6j_e, (2, 2, 4, 2, 2, 2, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 4, 4, 4, &r), -1.0/10.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 4, 4, 2, &r), 1.0/6.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 2, 2, 2, 2, &r), -0.5/sqrt(5.0), TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (4, 4, 4, 2, 2, 2, &r), sqrt(7.0/3.0)/10.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (6, 6, 6, 4, 4, 4, &r), -sqrt(3.0/5.0)/14.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_6j_e, (6, 6, 6, 4, 4, 2, &r), -sqrt(3.0/5.0)/7.0, TEST_TOL0, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_9j_e, (4, 2, 4, 3, 3, 2, 1, 1, 2, &r), -sqrt(1.0/6.0)/10.0, TEST_TOL2, GSL_SUCCESS); ! TEST_SF(s, gsl_sf_coupling_9j_e, (8, 4, 10, 7, 3, 8, 1, 1, 2, &r), sqrt(7.0/3.0)/60.0, TEST_TOL2, GSL_SUCCESS); return s; *************** *** 624,627 **** --- 632,670 ---- TEST_SF(s, gsl_sf_expint_Ei_e, (1.0/4294967296.0, &r), -21.603494112783886397, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_expint_Ei_e, (1.0, &r), 1.8951178163559367555, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-10000.0, &r), -0.00010001000200060024012, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-1000.0, &r), -0.0010010020060241207251, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-10.0, &r), -0.11314702047341077803, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (-1.0, &r), -0.69717488323506606877, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0e-10, &r), 22.448635267383787506, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0e-05, &r), 10.935829157788483865, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (0.1, &r), 2.0146425447084516791, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1.0, &r), 0.59634736232319407434, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (10.0, &r), 0.091563333939788081876, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (50.0, &r), 0.019615109930114870365, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (300.0, &r), 0.0033222955652707070644, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (1000.0, &r), 0.00099900199402388071500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E1_scaled_e, (10000.0, &r), 0.000099990001999400239880, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-10000.0, &r), -0.00010002000600240120072, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-1000.0, &r), -0.0010020060241207250807, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-10.0, &r), -0.13147020473410778034, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (-1.0, &r), 0.30282511676493393123, TEST_TOL1, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0/4294967296.0, &r), 0.99999999497004455927, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0/65536.0, &r), 0.99983957954556245453, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (0.1, &r), 0.79853574552915483209, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1.0, &r), 0.40365263767680592566, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (10.0, &r), 0.084366660602119181239, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (50.0, &r), 0.019244503494256481735, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (300.0, &r), 0.0033113304187878806691, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (1000.0, &r), 0.00099800597611928500004, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_E2_scaled_e, (10000.0, &r), 0.000099980005997601199281, TEST_TOL0, GSL_SUCCESS); + + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (-1000.0, &r), -0.00099900199402388071500, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (-1.0, &r), -0.59634736232319407434, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1.0/4294967296.0, &r), -21.603494107753930958, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1.0, &r), 0.69717488323506606877, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_expint_Ei_scaled_e, (1000.0, &r), 0.0010010020060241207251, TEST_TOL0, GSL_SUCCESS); + TEST_SF(s, gsl_sf_Shi_e, (-1.0, &r), -1.0572508753757285146, TEST_TOL0, GSL_SUCCESS); diff -x *.info* -rc2P gsl-1.2/specfunc/test_sf.h gsl-1.3/specfunc/test_sf.h *** gsl-1.2/specfunc/test_sf.h Tue Jan 8 14:07:51 2002 --- gsl-1.3/specfunc/test_sf.h Wed Sep 11 20:03:33 2002 *************** *** 34,46 **** int test_sf_check_result_relax(char * message_buff, gsl_sf_result r, double val, double tol); ! #define TEST_TOL0 (2.0*GSL_DBL_EPSILON) ! #define TEST_TOL1 (16.0*GSL_DBL_EPSILON) ! #define TEST_TOL2 (256.0*GSL_DBL_EPSILON) ! #define TEST_TOL3 (2048.0*GSL_DBL_EPSILON) ! #define TEST_TOL4 (16384.0*GSL_DBL_EPSILON) ! #define TEST_TOL5 (131072.0*GSL_DBL_EPSILON) ! #define TEST_TOL6 (1048576.0*GSL_DBL_EPSILON) ! #define TEST_SQRT_TOL0 (2.0*GSL_SQRT_DBL_EPSILON) ! #define TEST_SNGL (1.0e-06) #define TEST_SF_INCONS 1 --- 34,54 ---- int test_sf_check_result_relax(char * message_buff, gsl_sf_result r, double val, double tol); ! /* Include an overall test factor to allow for differences between ! compilers, otherwise there are too many bug reports on the released ! versions. Turn this value down to 1.0 for development purposes */ ! ! #ifndef TEST_FACTOR ! #define TEST_FACTOR 10.0 ! #endif ! ! #define TEST_TOL0 (TEST_FACTOR*2.0*GSL_DBL_EPSILON) ! #define TEST_TOL1 (TEST_FACTOR*16.0*GSL_DBL_EPSILON) ! #define TEST_TOL2 (TEST_FACTOR*256.0*GSL_DBL_EPSILON) ! #define TEST_TOL3 (TEST_FACTOR*2048.0*GSL_DBL_EPSILON) ! #define TEST_TOL4 (TEST_FACTOR*16384.0*GSL_DBL_EPSILON) ! #define TEST_TOL5 (TEST_FACTOR*131072.0*GSL_DBL_EPSILON) ! #define TEST_TOL6 (TEST_FACTOR*1048576.0*GSL_DBL_EPSILON) ! #define TEST_SQRT_TOL0 (TEST_FACTOR*2.0*GSL_SQRT_DBL_EPSILON) ! #define TEST_SNGL (TEST_FACTOR*1.0e-06) #define TEST_SF_INCONS 1 diff -x *.info* -rc2P gsl-1.2/sys/ChangeLog gsl-1.3/sys/ChangeLog *** gsl-1.2/sys/ChangeLog Wed Jan 16 16:37:30 2002 --- gsl-1.3/sys/ChangeLog Wed Dec 11 17:29:39 2002 *************** *** 1,2 **** --- 1,15 ---- + Wed Dec 11 17:29:24 2002 Brian Gough + + * ldfrexp.c: fix include to use instead of + + + 2002-08-25 Brian Gough + + * fcmp.c (gsl_fcmp): approximate comparison of floating point + numbers using Knuth's algorithm + + * ldfrexp.c (gsl_ldexp): portable replacement for ldexp() + (gsl_frexp): portable replacement for frexp() + Wed Jan 16 16:35:58 2002 Brian Gough diff -x *.info* -rc2P gsl-1.2/sys/Makefile.am gsl-1.3/sys/Makefile.am *** gsl-1.2/sys/Makefile.am Tue May 8 10:44:16 2001 --- gsl-1.3/sys/Makefile.am Mon Aug 26 09:11:21 2002 *************** *** 3,7 **** pkginclude_HEADERS = gsl_sys.h ! libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c INCLUDES = -I$(top_builddir) --- 3,7 ---- pkginclude_HEADERS = gsl_sys.h ! libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c INCLUDES = -I$(top_builddir) diff -x *.info* -rc2P gsl-1.2/sys/Makefile.in gsl-1.3/sys/Makefile.in *** gsl-1.2/sys/Makefile.in Sat Jul 20 20:27:32 2002 --- gsl-1.3/sys/Makefile.in Wed Dec 18 22:36:35 2002 *************** *** 89,93 **** pkginclude_HEADERS = gsl_sys.h ! libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c INCLUDES = -I$(top_builddir) --- 89,93 ---- pkginclude_HEADERS = gsl_sys.h ! libgslsys_la_SOURCES = minmax.c prec.c hypot.c log1p.c expm1.c coerce.c invhyp.c pow_int.c infnan.c fdiv.c fcmp.c ldfrexp.c INCLUDES = -I$(top_builddir) *************** *** 110,114 **** libgslsys_la_LIBADD = libgslsys_la_OBJECTS = minmax.lo prec.lo hypot.lo log1p.lo expm1.lo \ ! coerce.lo invhyp.lo pow_int.lo infnan.lo fdiv.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) --- 110,114 ---- libgslsys_la_LIBADD = libgslsys_la_OBJECTS = minmax.lo prec.lo hypot.lo log1p.lo expm1.lo \ ! coerce.lo invhyp.lo pow_int.lo infnan.lo fdiv.lo fcmp.lo ldfrexp.lo check_PROGRAMS = test$(EXEEXT) test_OBJECTS = test.$(OBJEXT) diff -x *.info* -rc2P gsl-1.2/sys/fcmp.c gsl-1.3/sys/fcmp.c *** gsl-1.2/sys/fcmp.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/sys/fcmp.c Sun Aug 25 21:59:28 2002 *************** *** 0 **** --- 1,62 ---- + /* sys/gsl_compare.c + * + * Copyright (C) 2002 Gert Van den Eynde + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + * + * Based on fcmp 1.2.2 Copyright (c) 1998-2000 Theodore C. Belding + * University of Michigan Center for the Study of Complex Systems + * Ted.Belding@umich.edu + * + */ + + #include + #include + #include + + int + gsl_fcmp (const double x1, const double x2, const double epsilon) + { + int exponent; + double delta, difference; + + /* Find exponent of largest absolute value */ + + { + double max = (fabs (x1) > fabs (x2)) ? x1 : x2; + + frexp (max, &exponent); + } + + /* Form a neighborhood of size 2 * delta */ + + delta = ldexp (epsilon, exponent); + + difference = x1 - x2; + + if (difference > delta) /* x1 > x2 */ + { + return 1; + } + else if (difference < -delta) /* x1 < x2 */ + { + return -1; + } + else /* -delta <= difference <= delta */ + { + return 0; /* x1 ~=~ x2 */ + } + } + diff -x *.info* -rc2P gsl-1.2/sys/gsl_sys.h gsl-1.3/sys/gsl_sys.h *** gsl-1.2/sys/gsl_sys.h Mon Jun 10 13:04:38 2002 --- gsl-1.3/sys/gsl_sys.h Mon Aug 26 08:54:20 2002 *************** *** 53,56 **** --- 53,61 ---- long double gsl_coerce_long_double (const long double x); + double gsl_ldexp(const double x, const int e); + double gsl_frexp(const double x, int * e); + + int gsl_fcmp (const double x1, const double x2, const double epsilon); + __END_DECLS diff -x *.info* -rc2P gsl-1.2/sys/ldfrexp.c gsl-1.3/sys/ldfrexp.c *** gsl-1.2/sys/ldfrexp.c Thu Jan 1 00:00:00 1970 --- gsl-1.3/sys/ldfrexp.c Tue Dec 10 22:27:36 2002 *************** *** 0 **** --- 1,63 ---- + /* sys/ldfrexp.c + * + * Copyright (C) 2002, Gert Van den Eynde + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * 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. + */ + + #include + #include + #include + + double gsl_ldexp (const double x, const int e); + double gsl_frexp (const double x, int *e); + + double + gsl_ldexp (const double x, const int e) + { + double p2 = pow (2.0, (double)e); + return x * p2; + } + + double + gsl_frexp (const double x, int *e) + { + if (x == 0.0) + { + *e = 0; + return 0.0; + } + else + { + double ex = ceil (log (fabs (x)) / M_LN2); + int ei = (int) ex; + double f = gsl_ldexp (x, -ei); + + while (fabs (f) >= 1.0) + { + ei++; + f /= 2.0; + } + + while (fabs (f) < 0.5) + { + ei--; + f *= 2.0; + } + + *e = ei; + return f; + } + } diff -x *.info* -rc2P gsl-1.2/sys/test.c gsl-1.3/sys/test.c *** gsl-1.2/sys/test.c Wed Jan 16 15:41:28 2002 --- gsl-1.3/sys/test.c Mon Aug 26 09:05:21 2002 *************** *** 23,27 **** #include #include - #include --- 23,26 ---- *************** *** 30,33 **** --- 29,33 ---- { double y, y_expected; + int e, e_expected; gsl_ieee_env_setup (); *************** *** 35,97 **** /* Test for expm1 */ ! y = gsl_expm1 (0.0); y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.0)"); ! y = gsl_expm1 (1e-10); y_expected = 1.000000000050000000002e-10; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(1e-10)"); ! y = gsl_expm1 (-1e-10); y_expected = -9.999999999500000000017e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-1e-10)"); ! y = gsl_expm1 (0.1); y_expected = 0.1051709180756476248117078264902; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.1)"); ! y = gsl_expm1 (-0.1); y_expected = -0.09516258196404042683575094055356; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-0.1)"); ! y = gsl_expm1 (10.0); y_expected = 22025.465794806716516957900645284; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(10.0)"); ! y = gsl_expm1 (-10.0); y_expected = -0.99995460007023751514846440848444; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-10.0)"); ! /* Test for log1p */ ! y = gsl_log1p (0.0); y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.0)"); ! y = gsl_log1p (1e-10); y_expected = 9.9999999995000000000333333333308e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(1e-10)"); ! y = gsl_log1p (0.1); y_expected = 0.095310179804324860043952123280765; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.1)"); ! y = gsl_log1p (10.0); y_expected = 2.3978952727983705440619435779651; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(10.0)"); /* Test for gsl_hypot */ ! y = gsl_hypot (0.0, 0.0) ; y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(0.0, 0.0)"); ! y = gsl_hypot (1e-10, 1e-10) ; y_expected = 1.414213562373095048801688e-10; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, 1e-10)"); ! y = gsl_hypot (1e-38, 1e-38) ; y_expected = 1.414213562373095048801688e-38; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-38, 1e-38)"); ! y = gsl_hypot (1e-10, -1.0) ; y_expected = 1.000000000000000000005; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, -1)"); ! y = gsl_hypot (-1.0, 1e-10) ; y_expected = 1.000000000000000000005; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(-1, 1e-10)"); ! y = gsl_hypot (1e307, 1e301) ; y_expected = 1.000000000000499999999999e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e301)"); ! y = gsl_hypot (1e301, 1e307) ; y_expected = 1.000000000000499999999999e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e301, 1e307)"); ! y = gsl_hypot (1e307, 1e307) ; y_expected = 1.414213562373095048801688e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e307)"); --- 35,116 ---- /* Test for expm1 */ ! y = gsl_expm1 (0.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.0)"); ! y = gsl_expm1 (1e-10); ! y_expected = 1.000000000050000000002e-10; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(1e-10)"); ! y = gsl_expm1 (-1e-10); ! y_expected = -9.999999999500000000017e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-1e-10)"); ! y = gsl_expm1 (0.1); ! y_expected = 0.1051709180756476248117078264902; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(0.1)"); ! y = gsl_expm1 (-0.1); ! y_expected = -0.09516258196404042683575094055356; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-0.1)"); ! y = gsl_expm1 (10.0); ! y_expected = 22025.465794806716516957900645284; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(10.0)"); ! y = gsl_expm1 (-10.0); ! y_expected = -0.99995460007023751514846440848444; gsl_test_rel (y, y_expected, 1e-15, "gsl_expm1(-10.0)"); ! /* Test for log1p */ ! y = gsl_log1p (0.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.0)"); ! y = gsl_log1p (1e-10); ! y_expected = 9.9999999995000000000333333333308e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(1e-10)"); ! y = gsl_log1p (0.1); ! y_expected = 0.095310179804324860043952123280765; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(0.1)"); ! y = gsl_log1p (10.0); ! y_expected = 2.3978952727983705440619435779651; gsl_test_rel (y, y_expected, 1e-15, "gsl_log1p(10.0)"); /* Test for gsl_hypot */ ! y = gsl_hypot (0.0, 0.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(0.0, 0.0)"); ! y = gsl_hypot (1e-10, 1e-10); ! y_expected = 1.414213562373095048801688e-10; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, 1e-10)"); ! y = gsl_hypot (1e-38, 1e-38); ! y_expected = 1.414213562373095048801688e-38; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-38, 1e-38)"); ! y = gsl_hypot (1e-10, -1.0); ! y_expected = 1.000000000000000000005; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e-10, -1)"); ! y = gsl_hypot (-1.0, 1e-10); ! y_expected = 1.000000000000000000005; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(-1, 1e-10)"); ! y = gsl_hypot (1e307, 1e301); ! y_expected = 1.000000000000499999999999e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e301)"); ! y = gsl_hypot (1e301, 1e307); ! y_expected = 1.000000000000499999999999e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e301, 1e307)"); ! y = gsl_hypot (1e307, 1e307); ! y_expected = 1.414213562373095048801688e307; gsl_test_rel (y, y_expected, 1e-15, "gsl_hypot(1e307, 1e307)"); *************** *** 99,208 **** /* Test for acosh */ ! y = gsl_acosh (1.0); y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.0)"); ! y = gsl_acosh (1.1); y_expected = 4.435682543851151891329110663525e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.1)"); ! y = gsl_acosh (10.0); y_expected = 2.9932228461263808979126677137742e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(10.0)"); ! y = gsl_acosh (1e10); y_expected = 2.3718998110500402149594646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1e10)"); /* Test for asinh */ ! y = gsl_asinh (0.0); y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.0)"); ! y = gsl_asinh (1e-10); y_expected = 9.9999999999999999999833333333346e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); ! y = gsl_asinh (-1e-10); y_expected = -9.9999999999999999999833333333346e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); ! y = gsl_asinh (0.1); y_expected = 9.983407889920756332730312470477e-2; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.1)"); ! y = gsl_asinh (-0.1); y_expected = -9.983407889920756332730312470477e-2; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-0.1)"); ! y = gsl_asinh (1.0); y_expected = 8.8137358701954302523260932497979e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1.0)"); ! y = gsl_asinh (-1.0); y_expected = -8.8137358701954302523260932497979e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1.0)"); ! y = gsl_asinh (10.0); y_expected = 2.9982229502979697388465955375965e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(10)"); ! y = gsl_asinh (-10.0); y_expected = -2.9982229502979697388465955375965e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-10)"); ! y = gsl_asinh (1e10); y_expected = 2.3718998110500402149599646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e10)"); ! y = gsl_asinh (-1e10); y_expected = -2.3718998110500402149599646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1e10)"); /* Test for atanh */ ! y = gsl_atanh (0.0); y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.0)"); ! y = gsl_atanh (1e-20); y_expected = 1e-20; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(1e-20)"); ! y = gsl_atanh (-1e-20); y_expected = -1e-20; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-1e-20)"); ! y = gsl_atanh (0.1); y_expected = 1.0033534773107558063572655206004e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.1)"); ! y = gsl_atanh (-0.1); y_expected = -1.0033534773107558063572655206004e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-0.1)"); ! y = gsl_atanh (0.9); y_expected = 1.4722194895832202300045137159439e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); ! y = gsl_atanh (-0.9); y_expected = -1.4722194895832202300045137159439e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); /* Test for pow_int */ ! y = gsl_pow_2 (-3.14); y_expected = pow(-3.14, 2.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_2(-3.14)"); ! y = gsl_pow_3 (-3.14); y_expected = pow(-3.14, 3.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_3(-3.14)"); ! y = gsl_pow_4 (-3.14); y_expected = pow(-3.14, 4.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_4(-3.14)"); ! y = gsl_pow_5 (-3.14); y_expected = pow(-3.14, 5.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_5(-3.14)"); ! y = gsl_pow_6 (-3.14); y_expected = pow(-3.14, 6.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_6(-3.14)"); ! y = gsl_pow_7 (-3.14); y_expected = pow(-3.14, 7.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_7(-3.14)"); ! y = gsl_pow_8 (-3.14); y_expected = pow(-3.14, 8.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_8(-3.14)"); ! y = gsl_pow_9 (-3.14); y_expected = pow(-3.14, 9.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_9(-3.14)"); ! { int n; ! for (n = -9; n < 10; n++) { ! y = gsl_pow_int (-3.14, n); y_expected = pow(-3.14, n); ! gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_n(-3.14,%d)", n); ! } } #ifdef HAVE_IEEE_COMPARISONS ! /* Test for isinf, isnan, finite*/ { --- 118,326 ---- /* Test for acosh */ ! y = gsl_acosh (1.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.0)"); ! y = gsl_acosh (1.1); ! y_expected = 4.435682543851151891329110663525e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1.1)"); ! y = gsl_acosh (10.0); ! y_expected = 2.9932228461263808979126677137742e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(10.0)"); ! y = gsl_acosh (1e10); ! y_expected = 2.3718998110500402149594646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_acosh(1e10)"); /* Test for asinh */ ! y = gsl_asinh (0.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.0)"); ! y = gsl_asinh (1e-10); ! y_expected = 9.9999999999999999999833333333346e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); ! y = gsl_asinh (-1e-10); ! y_expected = -9.9999999999999999999833333333346e-11; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e-10)"); ! y = gsl_asinh (0.1); ! y_expected = 9.983407889920756332730312470477e-2; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(0.1)"); ! y = gsl_asinh (-0.1); ! y_expected = -9.983407889920756332730312470477e-2; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-0.1)"); ! y = gsl_asinh (1.0); ! y_expected = 8.8137358701954302523260932497979e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1.0)"); ! y = gsl_asinh (-1.0); ! y_expected = -8.8137358701954302523260932497979e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1.0)"); ! y = gsl_asinh (10.0); ! y_expected = 2.9982229502979697388465955375965e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(10)"); ! y = gsl_asinh (-10.0); ! y_expected = -2.9982229502979697388465955375965e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-10)"); ! y = gsl_asinh (1e10); ! y_expected = 2.3718998110500402149599646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(1e10)"); ! y = gsl_asinh (-1e10); ! y_expected = -2.3718998110500402149599646668302e1; gsl_test_rel (y, y_expected, 1e-15, "gsl_asinh(-1e10)"); /* Test for atanh */ ! y = gsl_atanh (0.0); ! y_expected = 0.0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.0)"); ! y = gsl_atanh (1e-20); ! y_expected = 1e-20; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(1e-20)"); ! y = gsl_atanh (-1e-20); ! y_expected = -1e-20; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-1e-20)"); ! y = gsl_atanh (0.1); ! y_expected = 1.0033534773107558063572655206004e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.1)"); ! y = gsl_atanh (-0.1); ! y_expected = -1.0033534773107558063572655206004e-1; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(-0.1)"); ! y = gsl_atanh (0.9); ! y_expected = 1.4722194895832202300045137159439e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); ! y = gsl_atanh (-0.9); ! y_expected = -1.4722194895832202300045137159439e0; gsl_test_rel (y, y_expected, 1e-15, "gsl_atanh(0.9)"); /* Test for pow_int */ ! y = gsl_pow_2 (-3.14); ! y_expected = pow (-3.14, 2.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_2(-3.14)"); ! y = gsl_pow_3 (-3.14); ! y_expected = pow (-3.14, 3.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_3(-3.14)"); ! y = gsl_pow_4 (-3.14); ! y_expected = pow (-3.14, 4.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_4(-3.14)"); ! y = gsl_pow_5 (-3.14); ! y_expected = pow (-3.14, 5.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_5(-3.14)"); ! y = gsl_pow_6 (-3.14); ! y_expected = pow (-3.14, 6.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_6(-3.14)"); ! y = gsl_pow_7 (-3.14); ! y_expected = pow (-3.14, 7.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_7(-3.14)"); ! y = gsl_pow_8 (-3.14); ! y_expected = pow (-3.14, 8.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_8(-3.14)"); ! y = gsl_pow_9 (-3.14); ! y_expected = pow (-3.14, 9.0); gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_9(-3.14)"); ! { int n; ! for (n = -9; n < 10; n++) ! { ! y = gsl_pow_int (-3.14, n); ! y_expected = pow (-3.14, n); ! gsl_test_rel (y, y_expected, 1e-15, "gsl_pow_n(-3.14,%d)", n); ! } } + /* Test for ldexp */ + + y = gsl_ldexp (M_PI, -2); + y_expected = M_PI_4; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(pi,-2)"); + + y = gsl_ldexp (1.0, 2); + y_expected = 4.000000; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(1.0,2)"); + + y = gsl_ldexp (0.0, 2); + y_expected = 0.0; + gsl_test_rel (y, y_expected, 1e-15, "gsl_ldexp(0.0,2)"); + + /* Test for frexp */ + + y = gsl_frexp (M_PI, &e); + y_expected = M_PI_4; + e_expected = 2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(pi) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(pi) exponent"); + + y = gsl_frexp (2.0, &e); + y_expected = 0.5; + e_expected = 2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(2.0) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(2.0) exponent"); + + y = gsl_frexp (1.0 / 4.0, &e); + y_expected = 0.5; + e_expected = -1; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(0.25) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(0.25) exponent"); + + y = gsl_frexp (1.0 / 4.0 - 4.0 * GSL_DBL_EPSILON, &e); + y_expected = 0.999999999999996447; + e_expected = -2; + gsl_test_rel (y, y_expected, 1e-15, "gsl_frexp(0.25-eps) fraction"); + gsl_test_int (e, e_expected, "gsl_frexp(0.25-eps) exponent"); + + + /* Test for approximate floating point comparison */ + { + double x, y; + int i; + + x = M_PI; + y = 22.0 / 7.0; + + /* test the basic function */ + + for (i = 0; i < 10; i++) + { + double tol = pow (10, -i); + int res = gsl_fcmp (x, y, tol); + gsl_test_int (res, -(i >= 4), "gsl_fcmp(%.5f,%.5f,%g)", x, y, tol); + } + + for (i = 0; i < 10; i++) + { + double tol = pow (10, -i); + int res = gsl_fcmp (y, x, tol); + gsl_test_int (res, (i >= 4), "gsl_fcmp(%.5f,%.5f,%g)", y, x, tol); + } + } + + #ifdef HAVE_IEEE_COMPARISONS ! /* Test for isinf, isnan, finite */ { *************** *** 212,257 **** zero = 0.0; one = 1.0; ! inf = exp(1.0e10); nan = inf / inf; ! ! s = gsl_isinf(zero); gsl_test_int (s, 0, "gsl_isinf(0)"); ! ! s = gsl_isinf(one); gsl_test_int (s, 0, "gsl_isinf(1)"); ! ! s = gsl_isinf(inf); gsl_test_int (s, 1, "gsl_isinf(inf)"); ! s = gsl_isinf(-inf); gsl_test_int (s, -1, "gsl_isinf(-inf)"); ! ! s = gsl_isinf(nan); gsl_test_int (s, 0, "gsl_isinf(nan)"); ! s = gsl_isnan(zero); gsl_test_int (s, 0, "gsl_isnan(0)"); ! ! s = gsl_isnan(one); gsl_test_int (s, 0, "gsl_isnan(1)"); ! ! s = gsl_isnan(inf); gsl_test_int (s, 0, "gsl_isnan(inf)"); ! ! s = gsl_isnan(nan); gsl_test_int (s, 1, "gsl_isnan(nan)"); ! s = gsl_finite(zero); gsl_test_int (s, 1, "gsl_finite(0)"); ! ! s = gsl_finite(one); gsl_test_int (s, 1, "gsl_finite(1)"); ! ! s = gsl_finite(inf); gsl_test_int (s, 0, "gsl_finite(inf)"); ! ! s = gsl_finite(nan); gsl_test_int (s, 0, "gsl_finite(nan)"); } --- 330,375 ---- zero = 0.0; one = 1.0; ! inf = exp (1.0e10); nan = inf / inf; ! ! s = gsl_isinf (zero); gsl_test_int (s, 0, "gsl_isinf(0)"); ! ! s = gsl_isinf (one); gsl_test_int (s, 0, "gsl_isinf(1)"); ! ! s = gsl_isinf (inf); gsl_test_int (s, 1, "gsl_isinf(inf)"); ! s = gsl_isinf (-inf); gsl_test_int (s, -1, "gsl_isinf(-inf)"); ! ! s = gsl_isinf (nan); gsl_test_int (s, 0, "gsl_isinf(nan)"); ! s = gsl_isnan (zero); gsl_test_int (s, 0, "gsl_isnan(0)"); ! ! s = gsl_isnan (one); gsl_test_int (s, 0, "gsl_isnan(1)"); ! ! s = gsl_isnan (inf); gsl_test_int (s, 0, "gsl_isnan(inf)"); ! ! s = gsl_isnan (nan); gsl_test_int (s, 1, "gsl_isnan(nan)"); ! s = gsl_finite (zero); gsl_test_int (s, 1, "gsl_finite(0)"); ! ! s = gsl_finite (one); gsl_test_int (s, 1, "gsl_finite(1)"); ! ! s = gsl_finite (inf); gsl_test_int (s, 0, "gsl_finite(inf)"); ! ! s = gsl_finite (nan); gsl_test_int (s, 0, "gsl_finite(nan)"); } *************** *** 261,265 **** { double x = gsl_fdiv (2.0, 3.0); ! gsl_test_rel (x, 2.0/3.0, 4*GSL_DBL_EPSILON, "gsl_fdiv(2,3)"); } --- 379,383 ---- { double x = gsl_fdiv (2.0, 3.0); ! gsl_test_rel (x, 2.0 / 3.0, 4 * GSL_DBL_EPSILON, "gsl_fdiv(2,3)"); } diff -x *.info* -rc2P gsl-1.2/test/ChangeLog gsl-1.3/test/ChangeLog *** gsl-1.2/test/ChangeLog Fri Sep 28 09:40:48 2001 --- gsl-1.3/test/ChangeLog Thu Sep 12 21:56:52 2002 *************** *** 1,2 **** --- 1,7 ---- + Thu Sep 12 22:56:31 2002 Brian Gough + + * results.c (gsl_test_rel): catch NaN + (gsl_test_abs): catch NaN + Fri Sep 28 10:40:21 2001 Brian Gough diff -x *.info* -rc2P gsl-1.2/test/results.c gsl-1.3/test/results.c *** gsl-1.2/test/results.c Thu Sep 27 11:05:44 2001 --- gsl-1.3/test/results.c Thu Sep 12 21:07:29 2002 *************** *** 86,90 **** int status ; ! if (expected != 0 ) { status = (fabs(result-expected)/fabs(expected) > relative_error) ; --- 86,94 ---- int status ; ! if (result != result) ! { ! status = (expected == expected); /* Check for NaN vs number */ ! } ! else if (expected != 0 ) { status = (fabs(result-expected)/fabs(expected) > relative_error) ; *************** *** 152,156 **** int status ; ! status = fabs(result-expected) > absolute_error ; tests++; --- 156,167 ---- int status ; ! if (result != result) ! { ! status = (expected == expected); /* Check for NaN vs number */ ! } ! else ! { ! status = fabs(result-expected) > absolute_error ; ! } tests++; diff -x *.info* -rc2P gsl-1.2/vector/test_complex_io.c gsl-1.3/vector/test_complex_io.c *** gsl-1.2/vector/test_complex_io.c Thu May 3 22:00:15 2001 --- gsl-1.3/vector/test_complex_io.c Sun Dec 15 19:17:09 2002 *************** *** 62,65 **** FUNCTION (gsl_vector, free) (w); ! gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf work correctly"); } --- 62,65 ---- FUNCTION (gsl_vector, free) (w); ! gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); } diff -x *.info* -rc2P gsl-1.2/vector/test_complex_source.c gsl-1.3/vector/test_complex_source.c *** gsl-1.2/vector/test_complex_source.c Thu May 3 22:00:15 2001 --- gsl-1.3/vector/test_complex_source.c Sun Dec 15 19:17:09 2002 *************** *** 49,53 **** }; ! gsl_test (status, NAME (gsl_vector) "_set writes into array correctly"); status = 0; --- 49,53 ---- }; ! gsl_test (status, NAME (gsl_vector) "_set writes into array"); status = 0; *************** *** 62,66 **** status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get reads from array correctly"); /* Now set stride to 2 */ --- 62,66 ---- status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get reads from array"); /* Now set stride to 2 */ *************** *** 79,83 **** status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get reads from array correctly with stride"); for (i = 0; i < N / 2; i++) --- 79,83 ---- status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get reads from array with stride"); for (i = 0; i < N / 2; i++) *************** *** 97,101 **** }; ! gsl_test (status, NAME (gsl_vector) "_set writes into array correctly with stride"); /* Reset stride to 1 */ --- 97,101 ---- }; ! gsl_test (status, NAME (gsl_vector) "_set writes into array with stride"); /* Reset stride to 1 */ *************** *** 136,140 **** } ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements correctly") ; status = 0; --- 136,140 ---- } ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements") ; status = 0; *************** *** 153,157 **** } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements correctly") ; FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ --- 153,157 ---- } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ *************** *** 199,203 **** FUNCTION (gsl_vector, free) (w); ! gsl_test (status, NAME (gsl_vector) "_write and read work correctly"); } --- 199,203 ---- FUNCTION (gsl_vector, free) (w); ! gsl_test (status, NAME (gsl_vector) "_write and read work"); } diff -x *.info* -rc2P gsl-1.2/vector/test_io.c gsl-1.3/vector/test_io.c *** gsl-1.2/vector/test_io.c Wed Apr 18 21:52:47 2001 --- gsl-1.3/vector/test_io.c Sun Dec 15 19:17:09 2002 *************** *** 53,57 **** }; ! gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf work correctly"); fclose (f); --- 53,57 ---- }; ! gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); fclose (f); diff -x *.info* -rc2P gsl-1.2/vector/test_source.c gsl-1.3/vector/test_source.c *** gsl-1.2/vector/test_source.c Wed Apr 18 21:52:47 2001 --- gsl-1.3/vector/test_source.c Sun Dec 15 19:17:09 2002 *************** *** 49,53 **** gsl_test (status, ! NAME (gsl_vector) "_set" DESC " writes into array correctly"); --- 49,53 ---- gsl_test (status, ! NAME (gsl_vector) "_set" DESC " writes into array"); *************** *** 59,63 **** }; gsl_test (status, ! NAME (gsl_vector) "_get" DESC " reads from array correctly"); --- 59,63 ---- }; gsl_test (status, ! NAME (gsl_vector) "_get" DESC " reads from array"); *************** *** 72,76 **** status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get" DESC " reads correctly with stride"); for (i = 0; i < N / 2; i++) --- 72,76 ---- status = 1; }; ! gsl_test (status, NAME (gsl_vector) "_get" DESC " reads with stride"); for (i = 0; i < N / 2; i++) *************** *** 87,91 **** }; ! gsl_test (status, NAME (gsl_vector) "_set" DESC " writes correctly with stride"); /* Reset stride to 1 */ --- 87,91 ---- }; ! gsl_test (status, NAME (gsl_vector) "_set" DESC " writes with stride"); /* Reset stride to 1 */ *************** *** 108,112 **** status |= (FUNCTION(gsl_vector,get)(v,5) != 5) ; ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements correctly") ; status = 0; --- 108,112 ---- status |= (FUNCTION(gsl_vector,get)(v,5) != 5) ; ! gsl_test (status, NAME(gsl_vector) "_swap_elements" DESC " exchanges elements") ; status = 0; *************** *** 119,123 **** } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements correctly") ; { --- 119,123 ---- } ! gsl_test (status, NAME(gsl_vector) "_reverse" DESC " reverses elements") ; { *************** *** 213,217 **** status = 1; } ! gsl_test (status, NAME (gsl_vector) "_add adds correctly"); } --- 213,217 ---- status = 1; } ! gsl_test (status, NAME (gsl_vector) "_add vector addition"); } *************** *** 232,236 **** status = 1; } ! gsl_test (status, NAME (gsl_vector) "_sub subtracts correctly"); } --- 232,236 ---- status = 1; } ! gsl_test (status, NAME (gsl_vector) "_sub vector subtraction"); } *************** *** 250,254 **** status = 1; } ! gsl_test (status, NAME (gsl_vector) "_mul multiplies correctly"); } --- 250,254 ---- status = 1; } ! gsl_test (status, NAME (gsl_vector) "_mul multiplication"); } *************** *** 268,272 **** status = 1; } ! gsl_test (status, NAME (gsl_vector) "_div divides correctly"); } --- 268,272 ---- status = 1; } ! gsl_test (status, NAME (gsl_vector) "_div division"); } *************** *** 316,320 **** }; ! gsl_test (status, NAME (gsl_vector) "_write and read work correctly"); fclose (f); --- 316,320 ---- }; ! gsl_test (status, NAME (gsl_vector) "_write and read"); fclose (f);