summaryrefslogtreecommitdiff
path: root/gsl-1.9/interpolation/test.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-04-08 17:33:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-04-08 17:33:11 +0000
commit73f643f3f4a55310b2c8c1a9858906b2dd676e72 (patch)
treeb1df97f18dace4a5702b0bc7aafdfee8a2f25ada /gsl-1.9/interpolation/test.c
parentee523abdace8337d05ec4a179fcdf5de3fe0f634 (diff)
2011-04-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* AUTHORS, BUGS, COPYING, ChangeLog, INSTALL, Makefile.am, Makefile.in, NEWS, README, SUPPORT, THANKS, TODO, acconfig.h, aclocal.m4, autogen.sh, config.guess, config.h.in, config.sub, configure, configure.ac, gsl-config.in, gsl-histogram.c, gsl-randist.c, gsl.m4, gsl.pc.in, gsl.spec.in, gsl_machine.h, gsl_math.h, gsl_mode.h, gsl_nan.h, gsl_pow_int.h, gsl_precision.h, gsl_types.h, gsl_version.h.in, install-sh, ltmain.sh, mdate-sh, missing, mkinstalldirs, templates_off.h, templates_on.h, test_gsl_histogram.sh, version.c, blas/ChangeLog, blas/Makefile.am, blas/Makefile.in, blas/TODO, blas/blas.c, blas/gsl_blas.h, blas/gsl_blas_types.h, block/ChangeLog, block/Makefile.am, block/Makefile.in, block/block.c, block/block_source.c, block/file.c, block/fprintf_source.c, block/fwrite_source.c, block/gsl_block.h, block/gsl_block_char.h, block/gsl_block_complex_double.h, block/gsl_block_complex_float.h, block/gsl_block_complex_long_double.h, block/gsl_block_double.h, block/gsl_block_float.h, block/gsl_block_int.h, block/gsl_block_long.h, block/gsl_block_long_double.h, block/gsl_block_short.h, block/gsl_block_uchar.h, block/gsl_block_uint.h, block/gsl_block_ulong.h, block/gsl_block_ushort.h, block/gsl_check_range.h, block/init.c, block/init_source.c, block/test.c, block/test_complex_io.c, block/test_complex_source.c, block/test_io.c, block/test_source.c, bspline/ChangeLog, bspline/Makefile.am, bspline/Makefile.in, bspline/TODO, bspline/bspline.c, bspline/gsl_bspline.h, bspline/test.c, cblas/ChangeLog, cblas/Makefile.am, cblas/Makefile.in, cblas/TODO, cblas/caxpy.c, cblas/cblas.h, cblas/ccopy.c, cblas/cdotc_sub.c, cblas/cdotu_sub.c, cblas/cgbmv.c, cblas/cgemm.c, cblas/cgemv.c, cblas/cgerc.c, cblas/cgeru.c, cblas/chbmv.c, cblas/chemm.c, cblas/chemv.c, cblas/cher.c, cblas/cher2.c, cblas/cher2k.c, cblas/cherk.c, cblas/chpmv.c, cblas/chpr.c, cblas/chpr2.c, cblas/cscal.c, cblas/csscal.c, cblas/cswap.c, cblas/csymm.c, cblas/csyr2k.c, cblas/csyrk.c, cblas/ctbmv.c, cblas/ctbsv.c, cblas/ctpmv.c, cblas/ctpsv.c, cblas/ctrmm.c, cblas/ctrmv.c, cblas/ctrsm.c, cblas/ctrsv.c, cblas/dasum.c, cblas/daxpy.c, cblas/dcopy.c, cblas/ddot.c, cblas/dgbmv.c, cblas/dgemm.c, cblas/dgemv.c, cblas/dger.c, cblas/dnrm2.c, cblas/drot.c, cblas/drotg.c, cblas/drotm.c, cblas/drotmg.c, cblas/dsbmv.c, cblas/dscal.c, cblas/dsdot.c, cblas/dspmv.c, cblas/dspr.c, cblas/dspr2.c, cblas/dswap.c, cblas/dsymm.c, cblas/dsymv.c, cblas/dsyr.c, cblas/dsyr2.c, cblas/dsyr2k.c, cblas/dsyrk.c, cblas/dtbmv.c, cblas/dtbsv.c, cblas/dtpmv.c, cblas/dtpsv.c, cblas/dtrmm.c, cblas/dtrmv.c, cblas/dtrsm.c, cblas/dtrsv.c, cblas/dzasum.c, cblas/dznrm2.c, cblas/gsl_cblas.h, cblas/hypot.c, cblas/icamax.c, cblas/idamax.c, cblas/isamax.c, cblas/izamax.c, cblas/sasum.c, cblas/saxpy.c, cblas/scasum.c, cblas/scnrm2.c, cblas/scopy.c, cblas/sdot.c, cblas/sdsdot.c, cblas/sgbmv.c, cblas/sgemm.c, cblas/sgemv.c, cblas/sger.c, cblas/snrm2.c, cblas/source_asum_c.h, cblas/source_asum_r.h, cblas/source_axpy_c.h, cblas/source_axpy_r.h, cblas/source_copy_c.h, cblas/source_copy_r.h, cblas/source_dot_c.h, cblas/source_dot_r.h, cblas/source_gbmv_c.h, cblas/source_gbmv_r.h, cblas/source_gemm_c.h, cblas/source_gemm_r.h, cblas/source_gemv_c.h, cblas/source_gemv_r.h, cblas/source_ger.h, cblas/source_gerc.h, cblas/source_geru.h, cblas/source_hbmv.h, cblas/source_hemm.h, cblas/source_hemv.h, cblas/source_her.h, cblas/source_her2.h, cblas/source_her2k.h, cblas/source_herk.h, cblas/source_hpmv.h, cblas/source_hpr.h, cblas/source_hpr2.h, cblas/source_iamax_c.h, cblas/source_iamax_r.h, cblas/source_nrm2_c.h, cblas/source_nrm2_r.h, cblas/source_rot.h, cblas/source_rotg.h, cblas/source_rotm.h, cblas/source_rotmg.h, cblas/source_sbmv.h, cblas/source_scal_c.h, cblas/source_scal_c_s.h, cblas/source_scal_r.h, cblas/source_spmv.h, cblas/source_spr.h, cblas/source_spr2.h, cblas/source_swap_c.h, cblas/source_swap_r.h, cblas/source_symm_c.h, cblas/source_symm_r.h, cblas/source_symv.h, cblas/source_syr.h, cblas/source_syr2.h, cblas/source_syr2k_c.h, cblas/source_syr2k_r.h, cblas/source_syrk_c.h, cblas/source_syrk_r.h, cblas/source_tbmv_c.h, cblas/source_tbmv_r.h, cblas/source_tbsv_c.h, cblas/source_tbsv_r.h, cblas/source_tpmv_c.h, cblas/source_tpmv_r.h, cblas/source_tpsv_c.h, cblas/source_tpsv_r.h, cblas/source_trmm_c.h, cblas/source_trmm_r.h, cblas/source_trmv_c.h, cblas/source_trmv_r.h, cblas/source_trsm_c.h, cblas/source_trsm_r.h, cblas/source_trsv_c.h, cblas/source_trsv_r.h, cblas/srot.c, cblas/srotg.c, cblas/srotm.c, cblas/srotmg.c, cblas/ssbmv.c, cblas/sscal.c, cblas/sspmv.c, cblas/sspr.c, cblas/sspr2.c, cblas/sswap.c, cblas/ssymm.c, cblas/ssymv.c, cblas/ssyr.c, cblas/ssyr2.c, cblas/ssyr2k.c, cblas/ssyrk.c, cblas/stbmv.c, cblas/stbsv.c, cblas/stpmv.c, cblas/stpsv.c, cblas/strmm.c, cblas/strmv.c, cblas/strsm.c, cblas/strsv.c, cblas/test.c, cblas/test_amax.c, cblas/test_asum.c, cblas/test_axpy.c, cblas/test_copy.c, cblas/test_dot.c, cblas/test_gbmv.c, cblas/test_gemm.c, cblas/test_gemv.c, cblas/test_ger.c, cblas/test_hbmv.c, cblas/test_hemm.c, cblas/test_hemv.c, cblas/test_her.c, cblas/test_her2.c, cblas/test_her2k.c, cblas/test_herk.c, cblas/test_hpmv.c, cblas/test_hpr.c, cblas/test_hpr2.c, cblas/test_nrm2.c, cblas/test_rot.c, cblas/test_rotg.c, cblas/test_rotm.c, cblas/test_rotmg.c, cblas/test_sbmv.c, cblas/test_scal.c, cblas/test_spmv.c, cblas/test_spr.c, cblas/test_spr2.c, cblas/test_swap.c, cblas/test_symm.c, cblas/test_symv.c, cblas/test_syr.c, cblas/test_syr2.c, cblas/test_syr2k.c, cblas/test_syrk.c, cblas/test_tbmv.c, cblas/test_tbsv.c, cblas/test_tpmv.c, cblas/test_tpsv.c, cblas/test_trmm.c, cblas/test_trmv.c, cblas/test_trsm.c, cblas/test_trsv.c, cblas/tests.c, cblas/tests.h, cblas/xerbla.c, cblas/zaxpy.c, cblas/zcopy.c, cblas/zdotc_sub.c, cblas/zdotu_sub.c, cblas/zdscal.c, cblas/zgbmv.c, cblas/zgemm.c, cblas/zgemv.c, cblas/zgerc.c, cblas/zgeru.c, cblas/zhbmv.c, cblas/zhemm.c, cblas/zhemv.c, cblas/zher.c, cblas/zher2.c, cblas/zher2k.c, cblas/zherk.c, cblas/zhpmv.c, cblas/zhpr.c, cblas/zhpr2.c, cblas/zscal.c, cblas/zswap.c, cblas/zsymm.c, cblas/zsyr2k.c, cblas/zsyrk.c, cblas/ztbmv.c, cblas/ztbsv.c, cblas/ztpmv.c, cblas/ztpsv.c, cblas/ztrmm.c, cblas/ztrmv.c, cblas/ztrsm.c, cblas/ztrsv.c, cdf/ChangeLog, cdf/Makefile.am, cdf/Makefile.in, cdf/beta.c, cdf/beta_inc.c, cdf/betainv.c, cdf/binomial.c, cdf/cauchy.c, cdf/cauchyinv.c, cdf/chisq.c, cdf/chisqinv.c, cdf/error.h, cdf/exponential.c, cdf/exponentialinv.c, cdf/exppow.c, cdf/fdist.c, cdf/fdistinv.c, cdf/flat.c, cdf/flatinv.c, cdf/gamma.c, cdf/gammainv.c, cdf/gauss.c, cdf/gaussinv.c, cdf/geometric.c, cdf/gsl_cdf.h, cdf/gumbel1.c, cdf/gumbel1inv.c, cdf/gumbel2.c, cdf/gumbel2inv.c, cdf/hypergeometric.c, cdf/laplace.c, cdf/laplaceinv.c, cdf/logistic.c, cdf/logisticinv.c, cdf/lognormal.c, cdf/lognormalinv.c, cdf/nbinomial.c, cdf/pareto.c, cdf/paretoinv.c, cdf/pascal.c, cdf/poisson.c, cdf/rat_eval.h, cdf/rayleigh.c, cdf/rayleighinv.c, cdf/tdist.c, cdf/tdistinv.c, cdf/test.c, cdf/test_auto.c, cdf/weibull.c, cdf/weibullinv.c, cheb/ChangeLog, cheb/Makefile.am, cheb/Makefile.in, cheb/deriv.c, cheb/eval.c, cheb/gsl_chebyshev.h, cheb/init.c, cheb/integ.c, cheb/test.c, combination/ChangeLog, combination/Makefile.am, combination/Makefile.in, combination/combination.c, combination/file.c, combination/gsl_combination.h, combination/init.c, combination/test.c, complex/ChangeLog, complex/Makefile.am, complex/Makefile.in, complex/TODO, complex/gsl_complex.h, complex/gsl_complex_math.h, complex/math.c, complex/results.h, complex/results1.h, complex/results_real.h, complex/test.c, const/ChangeLog, const/Makefile.am, const/Makefile.in, const/TODO, const/gsl_const.h, const/gsl_const_cgs.h, const/gsl_const_cgsm.h, const/gsl_const_mks.h, const/gsl_const_mksa.h, const/gsl_const_num.h, const/test.c, deriv/ChangeLog, deriv/Makefile.am, deriv/Makefile.in, deriv/deriv.c, deriv/gsl_deriv.h, deriv/test.c, dht/ChangeLog, dht/Makefile.am, dht/Makefile.in, dht/dht.c, dht/gsl_dht.h, dht/test.c, diff/ChangeLog, diff/Makefile.am, diff/Makefile.in, diff/diff.c, diff/gsl_diff.h, diff/test.c, doc/12-cities.eps, doc/ChangeLog, doc/Makefile.am, doc/Makefile.in, doc/algorithm.sty, doc/algorithmic.sty, doc/autoconf.texi, doc/blas.texi, doc/bspline.eps, doc/bspline.texi, doc/calc.sty, doc/cblas.texi, doc/cheb.eps, doc/cheb.texi, doc/combination.texi, doc/complex.texi, doc/const.texi, doc/debug.texi, doc/dht.texi, doc/diff.texi, doc/dwt-orig.eps, doc/dwt-samp.eps, doc/dwt.texi, doc/eigen.texi, doc/err.texi, doc/fdl.texi, doc/fft-complex-radix2-f.eps, doc/fft-complex-radix2-t.eps, doc/fft-complex-radix2.eps, doc/fft-real-mixedradix.eps, doc/fft.texi, doc/fftalgorithms.bib, doc/fftalgorithms.tex, doc/final-route.eps, doc/fit-exp.eps, doc/fit-wlinear.eps, doc/fit-wlinear2.eps, doc/fitting.texi, doc/freemanuals.texi, doc/gpl.texi, doc/gsl-config.1, doc/gsl-design.texi, doc/gsl-histogram.1, doc/gsl-randist.1, doc/gsl-ref.info, doc/gsl-ref.info-1, doc/gsl-ref.info-2, doc/gsl-ref.info-3, doc/gsl-ref.info-4, doc/gsl-ref.info-5, doc/gsl-ref.info-6, doc/gsl-ref.texi, doc/gsl.3, doc/histogram.eps, doc/histogram.texi, doc/histogram2d.eps, doc/ieee754.texi, doc/initial-route.eps, doc/integration.texi, doc/interp.texi, doc/interp2.eps, doc/interpp2.eps, doc/intro.texi, doc/landau.dat, doc/linalg.texi, doc/math.texi, doc/mdate-sh, doc/min-interval.eps, doc/min.texi, doc/montecarlo.texi, doc/multifit.texi, doc/multimin.eps, doc/multimin.texi, doc/multiroots.texi, doc/ntuple.eps, doc/ntuple.texi, doc/ode-initval.texi, doc/permutation.texi, doc/poly.texi, doc/qrng.eps, doc/qrng.texi, doc/rand-bernoulli.tex, doc/rand-beta.tex, doc/rand-binomial.tex, doc/rand-bivariate-gaussian.tex, doc/rand-cauchy.tex, doc/rand-chisq.tex, doc/rand-erlang.tex, doc/rand-exponential.tex, doc/rand-exppow.tex, doc/rand-fdist.tex, doc/rand-flat.tex, doc/rand-gamma.tex, doc/rand-gaussian-tail.tex, doc/rand-gaussian.tex, doc/rand-geometric.tex, doc/rand-gumbel.tex, doc/rand-gumbel1.tex, doc/rand-gumbel2.tex, doc/rand-hypergeometric.tex, doc/rand-landau.tex, doc/rand-laplace.tex, doc/rand-levy.tex, doc/rand-levyskew.tex, doc/rand-logarithmic.tex, doc/rand-logistic.tex, doc/rand-lognormal.tex, doc/rand-nbinomial.tex, doc/rand-pareto.tex, doc/rand-pascal.tex, doc/rand-poisson.tex, doc/rand-rayleigh-tail.tex, doc/rand-rayleigh.tex, doc/rand-tdist.tex, doc/rand-weibull.tex, doc/randist.texi, doc/random-walk.tex, doc/randplots.gnp, doc/rng.texi, doc/roots-bisection.eps, doc/roots-false-position.eps, doc/roots-newtons-method.eps, doc/roots-secant-method.eps, doc/roots.texi, doc/siman-energy.eps, doc/siman-test.eps, doc/siman.texi, doc/sort.texi, doc/specfunc-airy.texi, doc/specfunc-bessel.texi, doc/specfunc-clausen.texi, doc/specfunc-coulomb.texi, doc/specfunc-coupling.texi, doc/specfunc-dawson.texi, doc/specfunc-debye.texi, doc/specfunc-dilog.texi, doc/specfunc-elementary.texi, doc/specfunc-ellint.texi, doc/specfunc-elljac.texi, doc/specfunc-erf.texi, doc/specfunc-exp.texi, doc/specfunc-expint.texi, doc/specfunc-fermi-dirac.texi, doc/specfunc-gamma.texi, doc/specfunc-gegenbauer.texi, doc/specfunc-hyperg.texi, doc/specfunc-laguerre.texi, doc/specfunc-lambert.texi, doc/specfunc-legendre.texi, doc/specfunc-log.texi, doc/specfunc-mathieu.texi, doc/specfunc-pow-int.texi, doc/specfunc-psi.texi, doc/specfunc-synchrotron.texi, doc/specfunc-transport.texi, doc/specfunc-trig.texi, doc/specfunc-zeta.texi, doc/specfunc.texi, doc/stamp-vti, doc/statistics.texi, doc/sum.texi, doc/texinfo.tex, doc/usage.texi, doc/vdp.eps, doc/vectors.texi, doc/version-ref.texi, doc/examples/blas.c, doc/examples/blas.out, doc/examples/block.c, doc/examples/block.out, doc/examples/bspline.c, doc/examples/cblas.c, doc/examples/cblas.out, doc/examples/cdf.c, doc/examples/cdf.out, doc/examples/cheb.c, doc/examples/combination.c, doc/examples/combination.out, doc/examples/const.c, doc/examples/const.out, doc/examples/demo_fn.c, doc/examples/demo_fn.h, doc/examples/diff.c, doc/examples/diff.out, doc/examples/dwt.c, doc/examples/dwt.dat, doc/examples/ecg.dat, doc/examples/eigen.c, doc/examples/eigen_nonsymm.c, doc/examples/expfit.c, doc/examples/fft.c, doc/examples/fftmr.c, doc/examples/fftreal.c, doc/examples/fitting.c, doc/examples/fitting2.c, doc/examples/fitting3.c, doc/examples/histogram.c, doc/examples/histogram2d.c, doc/examples/ieee.c, doc/examples/ieeeround.c, doc/examples/integration.c, doc/examples/integration.out, doc/examples/interp.c, doc/examples/interpp.c, doc/examples/intro.c, doc/examples/intro.out, doc/examples/linalglu.c, doc/examples/linalglu.out, doc/examples/matrix.c, doc/examples/matrixw.c, doc/examples/min.c, doc/examples/min.out, doc/examples/monte.c, doc/examples/nlfit.c, doc/examples/ntupler.c, doc/examples/ntuplew.c, doc/examples/ode-initval.c, doc/examples/odefixed.c, doc/examples/permseq.c, doc/examples/permshuffle.c, doc/examples/polyroots.c, doc/examples/polyroots.out, doc/examples/qrng.c, doc/examples/randpoisson.2.out, doc/examples/randpoisson.c, doc/examples/randpoisson.out, doc/examples/randwalk.c, doc/examples/rng.c, doc/examples/rng.out, doc/examples/rngunif.2.out, doc/examples/rngunif.c, doc/examples/rngunif.out, doc/examples/rootnewt.c, doc/examples/roots.c, doc/examples/siman.c, doc/examples/sortsmall.c, doc/examples/sortsmall.out, doc/examples/specfun.c, doc/examples/specfun.out, doc/examples/specfun_e.c, doc/examples/specfun_e.out, doc/examples/stat.c, doc/examples/stat.out, doc/examples/statsort.c, doc/examples/statsort.out, doc/examples/sum.c, doc/examples/sum.out, doc/examples/vector.c, doc/examples/vectorr.c, doc/examples/vectorview.c, doc/examples/vectorview.out, doc/examples/vectorw.c, eigen/ChangeLog, eigen/Makefile.am, eigen/Makefile.in, eigen/TODO, eigen/francis.c, eigen/gsl_eigen.h, eigen/herm.c, eigen/hermv.c, eigen/jacobi.c, eigen/nonsymm.c, eigen/nonsymmv.c, eigen/qrstep.c, eigen/schur.c, eigen/schur.h, eigen/sort.c, eigen/symm.c, eigen/symmv.c, eigen/test.c, err/ChangeLog, err/Makefile.am, err/Makefile.in, err/TODO, err/error.c, err/gsl_errno.h, err/gsl_message.h, err/message.c, err/stream.c, err/strerror.c, err/test.c, fft/ChangeLog, fft/Makefile.am, fft/Makefile.in, fft/TODO, fft/bitreverse.c, fft/bitreverse.h, fft/c_init.c, fft/c_main.c, fft/c_pass.h, fft/c_pass_2.c, fft/c_pass_3.c, fft/c_pass_4.c, fft/c_pass_5.c, fft/c_pass_6.c, fft/c_pass_7.c, fft/c_pass_n.c, fft/c_radix2.c, fft/compare.h, fft/compare_source.c, fft/complex_internal.h, fft/dft.c, fft/dft_source.c, fft/factorize.c, fft/factorize.h, fft/fft.c, fft/gsl_dft_complex.h, fft/gsl_dft_complex_float.h, fft/gsl_fft.h, fft/gsl_fft_complex.h, fft/gsl_fft_complex_float.h, fft/gsl_fft_halfcomplex.h, fft/gsl_fft_halfcomplex_float.h, fft/gsl_fft_real.h, fft/gsl_fft_real_float.h, fft/hc_init.c, fft/hc_main.c, fft/hc_pass.h, fft/hc_pass_2.c, fft/hc_pass_3.c, fft/hc_pass_4.c, fft/hc_pass_5.c, fft/hc_pass_n.c, fft/hc_radix2.c, fft/hc_unpack.c, fft/real_init.c, fft/real_main.c, fft/real_pass.h, fft/real_pass_2.c, fft/real_pass_3.c, fft/real_pass_4.c, fft/real_pass_5.c, fft/real_pass_n.c, fft/real_radix2.c, fft/real_unpack.c, fft/signals.c, fft/signals.h, fft/signals_source.c, fft/test.c, fft/test_complex_source.c, fft/test_real_source.c, fft/test_trap_source.c, fft/urand.c, fit/ChangeLog, fit/Makefile.am, fit/Makefile.in, fit/gsl_fit.h, fit/linear.c, fit/test.c, gsl/Makefile.am, gsl/Makefile.in, histogram/ChangeLog, histogram/Makefile.am, histogram/Makefile.in, histogram/TODO, histogram/add.c, histogram/add2d.c, histogram/calloc_range.c, histogram/calloc_range2d.c, histogram/copy.c, histogram/copy2d.c, histogram/file.c, histogram/file2d.c, histogram/find.c, histogram/find2d.c, histogram/get.c, histogram/get2d.c, histogram/gsl_histogram.h, histogram/gsl_histogram2d.h, histogram/init.c, histogram/init2d.c, histogram/maxval.c, histogram/maxval2d.c, histogram/oper.c, histogram/oper2d.c, histogram/params.c, histogram/params2d.c, histogram/pdf.c, histogram/pdf2d.c, histogram/reset.c, histogram/reset2d.c, histogram/stat.c, histogram/stat2d.c, histogram/test.c, histogram/test1d.c, histogram/test1d_resample.c, histogram/test1d_trap.c, histogram/test2d.c, histogram/test2d_resample.c, histogram/test2d_trap.c, histogram/urand.c, ieee-utils/ChangeLog, ieee-utils/Makefile.am, ieee-utils/Makefile.in, ieee-utils/TODO, ieee-utils/endian.c, ieee-utils/env.c, ieee-utils/fp-aix.c, ieee-utils/fp-darwin.c, ieee-utils/fp-darwin86.c, ieee-utils/fp-freebsd.c, ieee-utils/fp-gnuc99.c, ieee-utils/fp-gnum68k.c, ieee-utils/fp-gnuppc.c, ieee-utils/fp-gnusparc.c, ieee-utils/fp-gnux86.c, ieee-utils/fp-hpux.c, ieee-utils/fp-hpux11.c, ieee-utils/fp-irix.c, ieee-utils/fp-netbsd.c, ieee-utils/fp-openbsd.c, ieee-utils/fp-os2emx.c, ieee-utils/fp-solaris.c, ieee-utils/fp-sunos4.c, ieee-utils/fp-tru64.c, ieee-utils/fp-unknown.c, ieee-utils/fp.c, ieee-utils/gsl_ieee_utils.h, ieee-utils/make_rep.c, ieee-utils/print.c, ieee-utils/read.c, ieee-utils/standardize.c, ieee-utils/test.c, integration/ChangeLog, integration/Makefile.am, integration/Makefile.in, integration/TODO, integration/append.c, integration/err.c, integration/gsl_integration.h, integration/initialise.c, integration/positivity.c, integration/ptsort.c, integration/qag.c, integration/qagp.c, integration/qags.c, integration/qawc.c, integration/qawf.c, integration/qawo.c, integration/qaws.c, integration/qc25c.c, integration/qc25f.c, integration/qc25s.c, integration/qcheb.c, integration/qelg.c, integration/qk.c, integration/qk15.c, integration/qk21.c, integration/qk31.c, integration/qk41.c, integration/qk51.c, integration/qk61.c, integration/qmomo.c, integration/qmomof.c, integration/qng.c, integration/qng.h, integration/qpsrt.c, integration/qpsrt2.c, integration/reset.c, integration/set_initial.c, integration/test.c, integration/tests.c, integration/tests.h, integration/util.c, integration/workspace.c, interpolation/ChangeLog, interpolation/Makefile.am, interpolation/Makefile.in, interpolation/TODO, interpolation/accel.c, interpolation/akima.c, interpolation/bsearch.c, interpolation/bsearch.h, interpolation/cspline.c, interpolation/gsl_interp.h, interpolation/gsl_spline.h, interpolation/integ_eval.h, interpolation/interp.c, interpolation/linear.c, interpolation/poly.c, interpolation/spline.c, interpolation/test.c, linalg/ChangeLog, linalg/Makefile.am, linalg/Makefile.in, linalg/TODO, linalg/apply_givens.c, linalg/balance.c, linalg/balancemat.c, linalg/bidiag.c, linalg/cholesky.c, linalg/exponential.c, linalg/givens.c, linalg/gsl_linalg.h, linalg/hermtd.c, linalg/hessenberg.c, linalg/hh.c, linalg/householder.c, linalg/householdercomplex.c, linalg/lq.c, linalg/lu.c, linalg/luc.c, linalg/multiply.c, linalg/ptlq.c, linalg/qr.c, linalg/qrpt.c, linalg/svd.c, linalg/svdstep.c, linalg/symmtd.c, linalg/test.c, linalg/tridiag.c, linalg/tridiag.h, matrix/ChangeLog, matrix/Makefile.am, matrix/Makefile.in, matrix/TODO, matrix/copy.c, matrix/copy_source.c, matrix/file.c, matrix/file_source.c, matrix/getset.c, matrix/getset_source.c, matrix/gsl_matrix.h, matrix/gsl_matrix_char.h, matrix/gsl_matrix_complex_double.h, matrix/gsl_matrix_complex_float.h, matrix/gsl_matrix_complex_long_double.h, matrix/gsl_matrix_double.h, matrix/gsl_matrix_float.h, matrix/gsl_matrix_int.h, matrix/gsl_matrix_long.h, matrix/gsl_matrix_long_double.h, matrix/gsl_matrix_short.h, matrix/gsl_matrix_uchar.h, matrix/gsl_matrix_uint.h, matrix/gsl_matrix_ulong.h, matrix/gsl_matrix_ushort.h, matrix/init.c, matrix/init_source.c, matrix/matrix.c, matrix/matrix_source.c, matrix/minmax.c, matrix/minmax_source.c, matrix/oper.c, matrix/oper_complex_source.c, matrix/oper_source.c, matrix/prop.c, matrix/prop_source.c, matrix/rowcol.c, matrix/rowcol_source.c, matrix/submatrix.c, matrix/submatrix_source.c, matrix/swap.c, matrix/swap_source.c, matrix/test.c, matrix/test_complex_source.c, matrix/test_source.c, matrix/test_static.c, matrix/view.c, matrix/view.h, matrix/view_source.c, min/ChangeLog, min/Makefile.am, min/Makefile.in, min/bracketing.c, min/brent.c, min/convergence.c, min/fsolver.c, min/golden.c, min/gsl_min.h, min/min.h, min/test.c, min/test.h, min/test_funcs.c, monte/ChangeLog, monte/Makefile.am, monte/Makefile.in, monte/README, monte/TODO, monte/gsl_monte.h, monte/gsl_monte_miser.h, monte/gsl_monte_plain.h, monte/gsl_monte_vegas.h, monte/miser.c, monte/plain.c, monte/test.c, monte/test_main.c, monte/vegas.c, multifit/ChangeLog, multifit/Makefile.am, multifit/Makefile.in, multifit/TODO, multifit/convergence.c, multifit/covar.c, multifit/fdfsolver.c, multifit/fsolver.c, multifit/gradient.c, multifit/gsl_multifit.h, multifit/gsl_multifit_nlin.h, multifit/lmder.c, multifit/lmiterate.c, multifit/lmpar.c, multifit/lmset.c, multifit/lmutil.c, multifit/multilinear.c, multifit/qrsolv.c, multifit/test.c, multifit/test_brown.c, multifit/test_enso.c, multifit/test_estimator.c, multifit/test_filip.c, multifit/test_fn.c, multifit/test_hahn1.c, multifit/test_kirby2.c, multifit/test_longley.c, multifit/test_nelson.c, multifit/test_pontius.c, multifit/work.c, multimin/ChangeLog, multimin/Makefile.am, multimin/Makefile.in, multimin/TODO, multimin/conjugate_fr.c, multimin/conjugate_pr.c, multimin/convergence.c, multimin/diff.c, multimin/directional_minimize.c, multimin/fdfminimizer.c, multimin/fminimizer.c, multimin/gsl_multimin.h, multimin/linear_minimize.c, multimin/linear_wrapper.c, multimin/simplex.c, multimin/steepest_descent.c, multimin/test.c, multimin/test_funcs.c, multimin/test_funcs.h, multimin/vector_bfgs.c, multimin/vector_bfgs2.c, multiroots/ChangeLog, multiroots/Makefile.am, multiroots/Makefile.in, multiroots/broyden.c, multiroots/convergence.c, multiroots/dnewton.c, multiroots/dogleg.c, multiroots/enorm.c, multiroots/fdfsolver.c, multiroots/fdjac.c, multiroots/fsolver.c, multiroots/gnewton.c, multiroots/gsl_multiroots.h, multiroots/hybrid.c, multiroots/hybridj.c, multiroots/newton.c, multiroots/test.c, multiroots/test_funcs.c, multiroots/test_funcs.h, ntuple/ChangeLog, ntuple/Makefile.am, ntuple/Makefile.in, ntuple/gsl_ntuple.h, ntuple/ntuple.c, ntuple/test.c, ode-initval/ChangeLog, ode-initval/Makefile.am, ode-initval/Makefile.in, ode-initval/TODO, ode-initval/bsimp.c, ode-initval/control.c, ode-initval/cscal.c, ode-initval/cstd.c, ode-initval/evolve.c, ode-initval/gear1.c, ode-initval/gear2.c, ode-initval/gsl_odeiv.h, ode-initval/odeiv_util.h, ode-initval/rk2.c, ode-initval/rk2imp.c, ode-initval/rk2simp.c, ode-initval/rk4.c, ode-initval/rk4imp.c, ode-initval/rk8pd.c, ode-initval/rkck.c, ode-initval/rkf45.c, ode-initval/step.c, ode-initval/test.c, permutation/ChangeLog, permutation/Makefile.am, permutation/Makefile.in, permutation/canonical.c, permutation/file.c, permutation/gsl_permutation.h, permutation/gsl_permute.h, permutation/gsl_permute_char.h, permutation/gsl_permute_complex_double.h, permutation/gsl_permute_complex_float.h, permutation/gsl_permute_complex_long_double.h, permutation/gsl_permute_double.h, permutation/gsl_permute_float.h, permutation/gsl_permute_int.h, permutation/gsl_permute_long.h, permutation/gsl_permute_long_double.h, permutation/gsl_permute_short.h, permutation/gsl_permute_uchar.h, permutation/gsl_permute_uint.h, permutation/gsl_permute_ulong.h, permutation/gsl_permute_ushort.h, permutation/gsl_permute_vector.h, permutation/gsl_permute_vector_char.h, permutation/gsl_permute_vector_complex_double.h, permutation/gsl_permute_vector_complex_float.h, permutation/gsl_permute_vector_complex_long_double.h, permutation/gsl_permute_vector_double.h, permutation/gsl_permute_vector_float.h, permutation/gsl_permute_vector_int.h, permutation/gsl_permute_vector_long.h, permutation/gsl_permute_vector_long_double.h, permutation/gsl_permute_vector_short.h, permutation/gsl_permute_vector_uchar.h, permutation/gsl_permute_vector_uint.h, permutation/gsl_permute_vector_ulong.h, permutation/gsl_permute_vector_ushort.h, permutation/init.c, permutation/permutation.c, permutation/permute.c, permutation/permute_source.c, permutation/test.c, poly/ChangeLog, poly/Makefile.am, poly/Makefile.in, poly/TODO, poly/balance.c, poly/companion.c, poly/dd.c, poly/eval.c, poly/gsl_poly.h, poly/qr.c, poly/solve_cubic.c, poly/solve_quadratic.c, poly/test.c, poly/zsolve.c, poly/zsolve_cubic.c, poly/zsolve_init.c, poly/zsolve_quadratic.c, qrng/ChangeLog, qrng/Makefile.am, qrng/Makefile.in, qrng/TODO, qrng/gsl_qrng.h, qrng/niederreiter-2.c, qrng/qrng.c, qrng/sobol.c, qrng/test.c, randist/ChangeLog, randist/Makefile.am, randist/Makefile.in, randist/TODO, randist/bernoulli.c, randist/beta.c, randist/bigauss.c, randist/binomial.c, randist/binomial_tpe.c, randist/cauchy.c, randist/chisq.c, randist/dirichlet.c, randist/discrete.c, randist/erlang.c, randist/exponential.c, randist/exppow.c, randist/fdist.c, randist/flat.c, randist/gamma.c, randist/gauss.c, randist/gausstail.c, randist/gausszig.c, randist/geometric.c, randist/gsl_randist.h, randist/gumbel.c, randist/hyperg.c, randist/landau.c, randist/laplace.c, randist/levy.c, randist/logarithmic.c, randist/logistic.c, randist/lognormal.c, randist/multinomial.c, randist/nbinomial.c, randist/pareto.c, randist/pascal.c, randist/poisson.c, randist/rayleigh.c, randist/shuffle.c, randist/sphere.c, randist/tdist.c, randist/test.c, randist/weibull.c, rng/ChangeLog, rng/Makefile.am, rng/Makefile.in, rng/TODO, rng/borosh13.c, rng/cmrg.c, rng/coveyou.c, rng/default.c, rng/file.c, rng/fishman18.c, rng/fishman20.c, rng/fishman2x.c, rng/gfsr4.c, rng/gsl_rng.h, rng/knuthran.c, rng/knuthran2.c, rng/knuthran2002.c, rng/lecuyer21.c, rng/minstd.c, rng/mrg.c, rng/mt.c, rng/r250.c, rng/ran0.c, rng/ran1.c, rng/ran2.c, rng/ran3.c, rng/rand.c, rng/rand48.c, rng/random.c, rng/randu.c, rng/ranf.c, rng/ranlux.c, rng/ranlxd.c, rng/ranlxs.c, rng/ranmar.c, rng/rng.c, rng/schrage.c, rng/slatec.c, rng/taus.c, rng/taus113.c, rng/test.c, rng/transputer.c, rng/tt.c, rng/types.c, rng/uni.c, rng/uni32.c, rng/vax.c, rng/waterman14.c, rng/zuf.c, roots/ChangeLog, roots/Makefile.am, roots/Makefile.in, roots/TODO, roots/bisection.c, roots/brent.c, roots/convergence.c, roots/falsepos.c, roots/fdfsolver.c, roots/fsolver.c, roots/gsl_roots.h, roots/newton.c, roots/roots.h, roots/secant.c, roots/steffenson.c, roots/test.c, roots/test.h, roots/test_funcs.c, siman/ChangeLog, siman/Makefile.am, siman/Makefile.in, siman/TODO, siman/gsl_siman.h, siman/siman.c, siman/siman_test_driver.sh, siman/siman_tsp.c, siman/test.c, sort/ChangeLog, sort/Makefile.am, sort/Makefile.in, sort/TODO, sort/gsl_heapsort.h, sort/gsl_sort.h, sort/gsl_sort_char.h, sort/gsl_sort_double.h, sort/gsl_sort_float.h, sort/gsl_sort_int.h, sort/gsl_sort_long.h, sort/gsl_sort_long_double.h, sort/gsl_sort_short.h, sort/gsl_sort_uchar.h, sort/gsl_sort_uint.h, sort/gsl_sort_ulong.h, sort/gsl_sort_ushort.h, sort/gsl_sort_vector.h, sort/gsl_sort_vector_char.h, sort/gsl_sort_vector_double.h, sort/gsl_sort_vector_float.h, sort/gsl_sort_vector_int.h, sort/gsl_sort_vector_long.h, sort/gsl_sort_vector_long_double.h, sort/gsl_sort_vector_short.h, sort/gsl_sort_vector_uchar.h, sort/gsl_sort_vector_uint.h, sort/gsl_sort_vector_ulong.h, sort/gsl_sort_vector_ushort.h, sort/sort.c, sort/sortind.c, sort/sortvec.c, sort/sortvec_source.c, sort/sortvecind.c, sort/sortvecind_source.c, sort/subset.c, sort/subset_source.c, sort/subsetind.c, sort/subsetind_source.c, sort/test.c, sort/test_heapsort.c, sort/test_source.c, specfunc/ChangeLog, specfunc/Makefile.am, specfunc/Makefile.in, specfunc/TODO, specfunc/airy.c, specfunc/airy_der.c, specfunc/airy_zero.c, specfunc/atanint.c, specfunc/bessel.c, specfunc/bessel.h, specfunc/bessel_I0.c, specfunc/bessel_I1.c, specfunc/bessel_In.c, specfunc/bessel_Inu.c, specfunc/bessel_J0.c, specfunc/bessel_J1.c, specfunc/bessel_Jn.c, specfunc/bessel_Jnu.c, specfunc/bessel_K0.c, specfunc/bessel_K1.c, specfunc/bessel_Kn.c, specfunc/bessel_Knu.c, specfunc/bessel_Y0.c, specfunc/bessel_Y1.c, specfunc/bessel_Yn.c, specfunc/bessel_Ynu.c, specfunc/bessel_amp_phase.c, specfunc/bessel_amp_phase.h, specfunc/bessel_i.c, specfunc/bessel_j.c, specfunc/bessel_k.c, specfunc/bessel_olver.c, specfunc/bessel_olver.h, specfunc/bessel_sequence.c, specfunc/bessel_temme.c, specfunc/bessel_temme.h, specfunc/bessel_y.c, specfunc/bessel_zero.c, specfunc/beta.c, specfunc/beta_inc.c, specfunc/cheb_eval.c, specfunc/cheb_eval_mode.c, specfunc/chebyshev.h, specfunc/check.h, specfunc/clausen.c, specfunc/coulomb.c, specfunc/coulomb_bound.c, specfunc/coupling.c, specfunc/dawson.c, specfunc/debye.c, specfunc/dilog.c, specfunc/elementary.c, specfunc/ellint.c, specfunc/elljac.c, specfunc/erfc.c, specfunc/error.h, specfunc/eval.h, specfunc/exp.c, specfunc/expint.c, specfunc/expint3.c, specfunc/fermi_dirac.c, specfunc/gamma.c, specfunc/gamma_inc.c, specfunc/gegenbauer.c, specfunc/gsl_sf.h, specfunc/gsl_sf_airy.h, specfunc/gsl_sf_bessel.h, specfunc/gsl_sf_clausen.h, specfunc/gsl_sf_coulomb.h, specfunc/gsl_sf_coupling.h, specfunc/gsl_sf_dawson.h, specfunc/gsl_sf_debye.h, specfunc/gsl_sf_dilog.h, specfunc/gsl_sf_elementary.h, specfunc/gsl_sf_ellint.h, specfunc/gsl_sf_elljac.h, specfunc/gsl_sf_erf.h, specfunc/gsl_sf_exp.h, specfunc/gsl_sf_expint.h, specfunc/gsl_sf_fermi_dirac.h, specfunc/gsl_sf_gamma.h, specfunc/gsl_sf_gegenbauer.h, specfunc/gsl_sf_hyperg.h, specfunc/gsl_sf_laguerre.h, specfunc/gsl_sf_lambert.h, specfunc/gsl_sf_legendre.h, specfunc/gsl_sf_log.h, specfunc/gsl_sf_mathieu.h, specfunc/gsl_sf_pow_int.h, specfunc/gsl_sf_psi.h, specfunc/gsl_sf_result.h, specfunc/gsl_sf_synchrotron.h, specfunc/gsl_sf_transport.h, specfunc/gsl_sf_trig.h, specfunc/gsl_sf_zeta.h, specfunc/gsl_specfunc.h, specfunc/hyperg.c, specfunc/hyperg.h, specfunc/hyperg_0F1.c, specfunc/hyperg_1F1.c, specfunc/hyperg_2F0.c, specfunc/hyperg_2F1.c, specfunc/hyperg_U.c, specfunc/laguerre.c, specfunc/lambert.c, specfunc/legendre.h, specfunc/legendre_H3d.c, specfunc/legendre_Qn.c, specfunc/legendre_con.c, specfunc/legendre_poly.c, specfunc/log.c, specfunc/mathieu_angfunc.c, specfunc/mathieu_charv.c, specfunc/mathieu_coeff.c, specfunc/mathieu_radfunc.c, specfunc/mathieu_workspace.c, specfunc/poch.c, specfunc/pow_int.c, specfunc/psi.c, specfunc/recurse.h, specfunc/result.c, specfunc/shint.c, specfunc/sinint.c, specfunc/synchrotron.c, specfunc/test_airy.c, specfunc/test_bessel.c, specfunc/test_coulomb.c, specfunc/test_dilog.c, specfunc/test_gamma.c, specfunc/test_hyperg.c, specfunc/test_legendre.c, specfunc/test_mathieu.c, specfunc/test_sf.c, specfunc/test_sf.h, specfunc/transport.c, specfunc/trig.c, specfunc/zeta.c, statistics/ChangeLog, statistics/Makefile.am, statistics/Makefile.in, statistics/TODO, statistics/absdev.c, statistics/absdev_source.c, statistics/covariance.c, statistics/covariance_source.c, statistics/gsl_statistics.h, statistics/gsl_statistics_char.h, statistics/gsl_statistics_double.h, statistics/gsl_statistics_float.h, statistics/gsl_statistics_int.h, statistics/gsl_statistics_long.h, statistics/gsl_statistics_long_double.h, statistics/gsl_statistics_short.h, statistics/gsl_statistics_uchar.h, statistics/gsl_statistics_uint.h, statistics/gsl_statistics_ulong.h, statistics/gsl_statistics_ushort.h, statistics/kurtosis.c, statistics/kurtosis_source.c, statistics/lag1.c, statistics/lag1_source.c, statistics/mean.c, statistics/mean_source.c, statistics/median.c, statistics/median_source.c, statistics/minmax.c, statistics/minmax_source.c, statistics/p_variance.c, statistics/p_variance_source.c, statistics/quantiles.c, statistics/quantiles_source.c, statistics/skew.c, statistics/skew_source.c, statistics/test.c, statistics/test_float_source.c, statistics/test_int_source.c, statistics/test_nist.c, statistics/ttest.c, statistics/ttest_source.c, statistics/variance.c, statistics/variance_source.c, statistics/wabsdev.c, statistics/wabsdev_source.c, statistics/wkurtosis.c, statistics/wkurtosis_source.c, statistics/wmean.c, statistics/wmean_source.c, statistics/wskew.c, statistics/wskew_source.c, statistics/wvariance.c, statistics/wvariance_source.c, sum/ChangeLog, sum/Makefile.am, sum/Makefile.in, sum/gsl_sum.h, sum/levin_u.c, sum/levin_utrunc.c, sum/test.c, sum/work_u.c, sum/work_utrunc.c, sys/ChangeLog, sys/Makefile.am, sys/Makefile.in, sys/coerce.c, sys/expm1.c, sys/fcmp.c, sys/fdiv.c, sys/gsl_sys.h, sys/hypot.c, sys/infnan.c, sys/invhyp.c, sys/ldfrexp.c, sys/log1p.c, sys/minmax.c, sys/pow_int.c, sys/prec.c, sys/test.c, test/ChangeLog, test/Makefile.am, test/Makefile.in, test/gsl_test.h, test/results.c, utils/Makefile.am, utils/Makefile.in, utils/README, utils/memcpy.c, utils/memmove.c, utils/placeholder.c, utils/strdup.c, utils/strtol.c, utils/strtoul.c, utils/system.h, vector/ChangeLog, vector/Makefile.am, vector/Makefile.in, vector/TODO, vector/copy.c, vector/copy_source.c, vector/file.c, vector/file_source.c, vector/gsl_vector.h, vector/gsl_vector_char.h, vector/gsl_vector_complex.h, vector/gsl_vector_complex_double.h, vector/gsl_vector_complex_float.h, vector/gsl_vector_complex_long_double.h, vector/gsl_vector_double.h, vector/gsl_vector_float.h, vector/gsl_vector_int.h, vector/gsl_vector_long.h, vector/gsl_vector_long_double.h, vector/gsl_vector_short.h, vector/gsl_vector_uchar.h, vector/gsl_vector_uint.h, vector/gsl_vector_ulong.h, vector/gsl_vector_ushort.h, vector/init.c, vector/init_source.c, vector/minmax.c, vector/minmax_source.c, vector/oper.c, vector/oper_source.c, vector/prop.c, vector/prop_source.c, vector/reim.c, vector/reim_source.c, vector/subvector.c, vector/subvector_source.c, vector/swap.c, vector/swap_source.c, vector/test.c, vector/test_complex_source.c, vector/test_source.c, vector/test_static.c, vector/vector.c, vector/vector_source.c, vector/view.c, vector/view.h, vector/view_source.c, wavelet/ChangeLog, wavelet/Makefile.am, wavelet/Makefile.in, wavelet/TODO, wavelet/bspline.c, wavelet/daubechies.c, wavelet/dwt.c, wavelet/gsl_wavelet.h, wavelet/gsl_wavelet2d.h, wavelet/haar.c, wavelet/test.c, wavelet/wavelet.c: New files.
Diffstat (limited to 'gsl-1.9/interpolation/test.c')
-rw-r--r--gsl-1.9/interpolation/test.c949
1 files changed, 949 insertions, 0 deletions
diff --git a/gsl-1.9/interpolation/test.c b/gsl-1.9/interpolation/test.c
new file mode 100644
index 0000000..feb01d5
--- /dev/null
+++ b/gsl-1.9/interpolation/test.c
@@ -0,0 +1,949 @@
+/* interpolation/test.c
+ *
+ * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+/* Author: G. Jungman
+ */
+#include <config.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <gsl/gsl_test.h>
+#include <gsl/gsl_errno.h>
+#include <gsl/gsl_interp.h>
+#include <gsl/gsl_ieee_utils.h>
+
+int
+test_bsearch(void)
+{
+ double x_array[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 };
+ size_t index_result;
+ int status = 0;
+ int s;
+
+ /* check an interior point */
+ index_result = gsl_interp_bsearch(x_array, 1.5, 0, 4);
+ s = (index_result != 1);
+ status += s;
+ gsl_test (s, "simple bsearch");
+
+ /* check that we get the last interval if x == last value */
+ index_result = gsl_interp_bsearch(x_array, 4.0, 0, 4);
+ s = (index_result != 3);
+ status += s;
+ gsl_test (s, "upper endpoint bsearch");
+
+ /* check that we get the first interval if x == first value */
+ index_result = gsl_interp_bsearch(x_array, 0.0, 0, 4);
+ s = (index_result != 0);
+ status += s;
+ gsl_test (s, "lower endpoint bsearch");
+
+ /* check that we get correct interior boundary behaviour */
+ index_result = gsl_interp_bsearch(x_array, 2.0, 0, 4);
+ s = (index_result != 2);
+ status += s;
+ gsl_test (s, "degenerate bsearch");
+
+ /* check out of bounds above */
+ index_result = gsl_interp_bsearch(x_array, 10.0, 0, 4);
+ s = (index_result != 3);
+ status += s;
+ gsl_test (s, "out of bounds bsearch +");
+
+ /* check out of bounds below */
+ index_result = gsl_interp_bsearch(x_array, -10.0, 0, 4);
+ s = (index_result != 0);
+ status += s;
+ gsl_test (s, "out of bounds bsearch -");
+
+ return status;
+}
+
+
+
+typedef double TEST_FUNC (double);
+typedef struct _xy_table xy_table;
+
+struct _xy_table
+ {
+ double * x;
+ double * y;
+ size_t n;
+ };
+
+xy_table make_xy_table (double x[], double y[], size_t n);
+
+xy_table
+make_xy_table (double x[], double y[], size_t n)
+{
+ xy_table t;
+ t.x = x;
+ t.y = y;
+ t.n = n;
+ return t;
+}
+
+static int
+test_interp (
+ const xy_table * data_table,
+ const gsl_interp_type * T,
+ xy_table * test_table,
+ xy_table * test_d_table,
+ xy_table * test_i_table
+ )
+{
+ int status = 0, s1, s2, s3;
+ size_t i;
+
+ gsl_interp_accel *a = gsl_interp_accel_alloc ();
+ gsl_interp *interp = gsl_interp_alloc (T, data_table->n);
+
+ gsl_interp_init (interp, data_table->x, data_table->y, data_table->n);
+
+ for (i = 0; i < test_table->n; i++)
+ {
+ double x = test_table->x[i];
+ double y;
+ double deriv;
+ double integ;
+ double diff_y, diff_deriv, diff_integ;
+ s1 = gsl_interp_eval_e (interp, data_table->x, data_table->y, x, a, &y);
+ s2 = gsl_interp_eval_deriv_e (interp, data_table->x, data_table->y, x, a, &deriv);
+ s3 = gsl_interp_eval_integ_e (interp, data_table->x, data_table->y, test_table->x[0], x, a, &integ);
+
+ gsl_test (s1, "gsl_interp_eval_e %s", gsl_interp_name(interp));
+ gsl_test (s2, "gsl_interp_eval_deriv_e %s", gsl_interp_name(interp));
+ gsl_test (s3, "gsl_interp_eval_integ_e %s", gsl_interp_name(interp));
+
+ gsl_test_abs (y, test_table->y[i], 1e-10, "%s %d", gsl_interp_name(interp), i);
+ gsl_test_abs (deriv, test_d_table->y[i], 1e-10, "%s deriv %d", gsl_interp_name(interp), i);
+ gsl_test_abs (integ, test_i_table->y[i], 1e-10, "%s integ %d", gsl_interp_name(interp), i);
+
+ diff_y = y - test_table->y[i];
+ diff_deriv = deriv - test_d_table->y[i];
+ diff_integ = integ - test_i_table->y[i];
+ if (fabs (diff_y) > 1.e-10 || fabs(diff_deriv) > 1.0e-10 || fabs(diff_integ) > 1.0e-10) {
+ status++;
+ }
+ }
+
+ gsl_interp_accel_free (a);
+ gsl_interp_free (interp);
+
+ return status;
+}
+
+static int
+test_linear (void)
+{
+ int s;
+
+ double data_x[4] = { 0.0, 1.0, 2.0, 3.0 };
+ double data_y[4] = { 0.0, 1.0, 2.0, 3.0 };
+ double test_x[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 };
+ double test_y[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 };
+ double test_dy[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
+ double test_iy[6] = { 0.0, 0.125, 0.5, 9.0/8.0, 25.0/8.0, 9.0/2.0 };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 4);
+ xy_table test_table = make_xy_table(test_x, test_y, 6);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 6);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 6);
+
+ s = test_interp (&data_table, gsl_interp_linear, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "linear interpolation");
+ return s;
+}
+
+static int
+test_polynomial (void)
+{
+ int s;
+
+ double data_x[4] = { 0.0, 1.0, 2.0, 3.0 };
+ double data_y[4] = { 0.0, 1.0, 2.0, 3.0 };
+ double test_x[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 };
+ double test_y[6] = { 0.0, 0.5, 1.0, 1.5, 2.5, 3.0 };
+ double test_dy[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
+ double test_iy[6] = { 0.0, 0.125, 0.5, 9.0/8.0, 25.0/8.0, 9.0/2.0 };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 4);
+ xy_table test_table = make_xy_table(test_x, test_y, 6);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 6);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 6);
+
+ s = test_interp (&data_table, gsl_interp_polynomial, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "polynomial interpolation");
+ return s;
+}
+
+
+static int
+test_cspline (void)
+{
+ int s;
+
+ double data_x[3] = { 0.0, 1.0, 2.0 };
+ double data_y[3] = { 0.0, 1.0, 2.0 };
+ double test_x[4] = { 0.0, 0.5, 1.0, 2.0 };
+ double test_y[4] = { 0.0, 0.5, 1.0, 2.0 };
+ double test_dy[4] = { 1.0, 1.0, 1.0, 1.0 };
+ double test_iy[4] = { 0.0, 0.125, 0.5, 2.0 };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 3);
+ xy_table test_table = make_xy_table(test_x, test_y, 4);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 4);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 4);
+
+ s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "cspline interpolation");
+ return s;
+}
+
+static int
+test_cspline2 (void)
+{
+ /* Test taken from Young & Gregory, A Survey of Numerical
+ Mathematics, Vol 1 Chapter 6.8 */
+
+ int s;
+
+ double data_x[6] = { 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 };
+
+ double data_y[6] = { 1.0,
+ 0.961538461538461, 0.862068965517241,
+ 0.735294117647059, 0.609756097560976,
+ 0.500000000000000 } ;
+
+ double test_x[50] = {
+ 0.00, 0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18,
+ 0.20, 0.22, 0.24, 0.26, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38,
+ 0.40, 0.42, 0.44, 0.46, 0.48, 0.50, 0.52, 0.54, 0.56, 0.58,
+ 0.60, 0.62, 0.64, 0.66, 0.68, 0.70, 0.72, 0.74, 0.76, 0.78,
+ 0.80, 0.82, 0.84, 0.86, 0.88, 0.90, 0.92, 0.94, 0.96, 0.98 };
+
+ double test_y[50] = {
+ 1.000000000000000, 0.997583282975581, 0.995079933416512,
+ 0.992403318788142, 0.989466806555819, 0.986183764184894,
+ 0.982467559140716, 0.978231558888635, 0.973389130893999,
+ 0.967853642622158, 0.961538461538461, 0.954382579685350,
+ 0.946427487413627, 0.937740299651188, 0.928388131325928,
+ 0.918438097365742, 0.907957312698524, 0.897012892252170,
+ 0.885671950954575, 0.874001603733634, 0.862068965517241,
+ 0.849933363488199, 0.837622973848936, 0.825158185056786,
+ 0.812559385569085, 0.799846963843167, 0.787041308336369,
+ 0.774162807506023, 0.761231849809467, 0.748268823704033,
+ 0.735294117647059, 0.722328486073082, 0.709394147325463,
+ 0.696513685724764, 0.683709685591549, 0.671004731246381,
+ 0.658421407009825, 0.645982297202442, 0.633709986144797,
+ 0.621627058157454, 0.609756097560976, 0.598112015427308,
+ 0.586679029833925, 0.575433685609685, 0.564352527583445,
+ 0.553412100584061, 0.542588949440392, 0.531859618981294,
+ 0.521200654035625, 0.510588599432241};
+
+ double test_dy[50] = {
+ -0.120113913432180, -0.122279726798445, -0.128777166897241,
+ -0.139606233728568, -0.154766927292426, -0.174259247588814,
+ -0.198083194617734, -0.226238768379184, -0.258725968873165,
+ -0.295544796099676, -0.336695250058719, -0.378333644186652,
+ -0.416616291919835, -0.451543193258270, -0.483114348201955,
+ -0.511329756750890, -0.536189418905076, -0.557693334664512,
+ -0.575841504029200, -0.590633926999137, -0.602070603574326,
+ -0.611319695518765, -0.619549364596455, -0.626759610807396,
+ -0.632950434151589, -0.638121834629033, -0.642273812239728,
+ -0.645406366983674, -0.647519498860871, -0.648613207871319,
+ -0.648687494015019, -0.647687460711257, -0.645558211379322,
+ -0.642299746019212, -0.637912064630930, -0.632395167214473,
+ -0.625749053769843, -0.617973724297039, -0.609069178796061,
+ -0.599035417266910, -0.587872439709585, -0.576731233416743,
+ -0.566762785681043, -0.557967096502484, -0.550344165881066,
+ -0.543893993816790, -0.538616580309654, -0.534511925359660,
+ -0.531580028966807, -0.529820891131095};
+
+ double test_iy[50] = {
+ 0.000000000000000, 0.019975905023535, 0.039902753768792,
+ 0.059777947259733, 0.079597153869625, 0.099354309321042,
+ 0.119041616685866, 0.138649546385285, 0.158166836189794,
+ 0.177580491219196, 0.196875783942601, 0.216036382301310,
+ 0.235045759060558, 0.253888601161251, 0.272550937842853,
+ 0.291020140643388, 0.309284923399436, 0.327335342246135,
+ 0.345162795617181, 0.362760024244829, 0.380121111159890,
+ 0.397241442753010, 0.414117280448683, 0.430745332379281,
+ 0.447122714446318, 0.463246950320456, 0.479115971441505,
+ 0.494728117018421, 0.510082134029305, 0.525177177221407,
+ 0.540012809111123, 0.554589001813881, 0.568906157172889,
+ 0.582965126887879, 0.596767214344995, 0.610314174616794,
+ 0.623608214462242, 0.636651992326715, 0.649448618342004,
+ 0.662001654326309, 0.674315113784241, 0.686393423540581,
+ 0.698241001711602, 0.709861835676399, 0.721259443710643,
+ 0.732436874986582, 0.743396709573044, 0.754141058435429,
+ 0.764671563435718, 0.774989397332469 };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 6);
+ xy_table test_table = make_xy_table(test_x, test_y, 50);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 50);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 50);
+
+ s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "cspline 1/(1+x^2) interpolation");
+ return s;
+}
+
+static int
+test_cspline3 (void)
+{
+ /* This data has been chosen to be random (uneven spacing in x and y)
+ and the exact cubic spine solution computed using Octave */
+
+ int s;
+
+ double data_x[7] = {
+ -1.2139767065644265,
+ -0.792590494453907,
+ -0.250954683125019,
+ 0.665867809951305,
+ 0.735655088722706,
+ 0.827622053027153,
+ 1.426592227816582
+ };
+
+ double data_y[7] = {
+ -0.00453877449035645,
+ 0.49763182550668716,
+ 0.17805472016334534,
+ 0.40514493733644485,
+ -0.21595209836959839,
+ 0.47405586764216423,
+ 0.46561462432146072
+ } ;
+
+ double test_x[19] = {
+ -1.2139767065644265,
+ -1.0735146358609200,
+ -0.9330525651574135,
+ -0.7925904944539071,
+ -0.6120452240109444,
+ -0.4314999535679818,
+ -0.2509546831250191,
+ 0.0546528145670890,
+ 0.3602603122591972,
+ 0.6658678099513053,
+ 0.6891302362084388,
+ 0.7123926624655723,
+ 0.7356550887227058,
+ 0.7663107434908548,
+ 0.7969663982590039,
+ 0.8276220530271530,
+ 1.0272787779569625,
+ 1.2269355028867721,
+ 1.4265922278165817,
+ };
+
+ double test_y[19] = {
+ -0.00453877449035645,
+ 0.25816917628390590,
+ 0.44938881397673230,
+ 0.49763182550668716,
+ 0.31389980410075147,
+ 0.09948951681196887,
+ 0.17805472016334534,
+ 1.27633142487980233,
+ 2.04936553432792001,
+ 0.40514493733644485,
+ 0.13322324792901385,
+ -0.09656315924697809,
+ -0.21595209836959839,
+ -0.13551147728045118,
+ 0.13466779030061801,
+ 0.47405586764216423,
+ 1.68064089899304370,
+ 1.43594739539458649,
+ 0.46561462432146072
+ };
+
+ double test_dy[19] = {
+ 1.955137555965937,
+ 1.700662049790549,
+ 0.937235531264386,
+ -0.335141999612553,
+ -1.401385073563169,
+ -0.674982149482761,
+ 1.844066772628670,
+ 4.202528085784793,
+ -0.284432022227558,
+ -11.616813551408383,
+ -11.272731243226174,
+ -7.994209291156876,
+ -1.781247695200491,
+ 6.373970868827501,
+ 10.597456848997197,
+ 10.889210245308570,
+ 1.803124267866902,
+ -3.648527318598099,
+ -5.465744514086432,
+ };
+
+ double test_iy[19] = {
+ 0.000000000000000,
+ 0.018231117234914,
+ 0.069178822023139,
+ 0.137781019634897,
+ 0.213936442847744,
+ 0.249280997744777,
+ 0.267492946016120,
+ 0.471372708120518,
+ 1.014473660088477,
+ 1.477731933018837,
+ 1.483978291717981,
+ 1.484256847945450,
+ 1.480341742628893,
+ 1.474315901028282,
+ 1.473972210647307,
+ 1.483279773396950,
+ 1.728562698140330,
+ 2.057796448999396,
+ 2.253662886537457,
+ };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 7);
+ xy_table test_table = make_xy_table(test_x, test_y, 19);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 19);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 19);
+
+ s = test_interp (&data_table, gsl_interp_cspline, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "cspline arbitrary data interpolation");
+ return s;
+}
+
+static int
+test_csplinep (void)
+{
+ /* This data has been chosen to be random (uneven spacing in x and y)
+ and the exact cubic spine solution computed using Octave */
+
+ int s;
+
+ double data_x[11] = {
+ 0.000000000000000,
+ 0.130153674349869,
+ 0.164545962312740,
+ 0.227375461261537,
+ 0.256465324353657,
+ 0.372545206874658,
+ 0.520820016781720,
+ 0.647654717733075,
+ 0.753429306654340,
+ 0.900873984827658,
+ 1.000000000000000,
+ };
+
+ double data_y[11] = {
+ 0.000000000000000,
+ 0.729629261832041,
+ 0.859286331568207,
+ 0.989913099419008,
+ 0.999175006262120,
+ 0.717928599519215,
+ -0.130443237213363,
+ -0.800267961158980,
+ -0.999767873040527,
+ -0.583333769240853,
+ -0.000000000000000,
+ } ;
+
+ double test_x[31] = {
+ 0.000000000000000,
+ 0.043384558116623,
+ 0.086769116233246,
+ 0.130153674349869,
+ 0.141617770337492,
+ 0.153081866325116,
+ 0.164545962312740,
+ 0.185489128629005,
+ 0.206432294945271,
+ 0.227375461261537,
+ 0.237072082292243,
+ 0.246768703322951,
+ 0.256465324353657,
+ 0.295158618527324,
+ 0.333851912700991,
+ 0.372545206874658,
+ 0.421970143510346,
+ 0.471395080146033,
+ 0.520820016781720,
+ 0.563098250432172,
+ 0.605376484082623,
+ 0.647654717733075,
+ 0.682912914040164,
+ 0.718171110347252,
+ 0.753429306654340,
+ 0.802577532712113,
+ 0.851725758769885,
+ 0.900873984827658,
+ 0.933915989885105,
+ 0.966957994942553,
+ 1.000000000000000
+ };
+
+ double test_y[31] = {
+ 0.000000000000000,
+ 0.268657574670719,
+ 0.517940878523929,
+ 0.729629261832041,
+ 0.777012551497867,
+ 0.820298314554859,
+ 0.859286331568207,
+ 0.918833991960315,
+ 0.962624749226346,
+ 0.989913099419008,
+ 0.996756196601349,
+ 0.999858105635752,
+ 0.999175006262120,
+ 0.959248551766306,
+ 0.863713527741856,
+ 0.717928599519215,
+ 0.470065187871106,
+ 0.177694938589523,
+ -0.130443237213363,
+ -0.385093922365765,
+ -0.613840011545983,
+ -0.800267961158980,
+ -0.912498361131651,
+ -0.980219217412290,
+ -0.999767873040528,
+ -0.943635958253643,
+ -0.800314354800596,
+ -0.583333769240853,
+ -0.403689914131666,
+ -0.206151346799382,
+ -0.000000000000000
+ };
+
+ double test_dy[31] = {
+ 6.275761975917336,
+ 6.039181349093287,
+ 5.382620652895025,
+ 4.306079887322550,
+ 3.957389777282752,
+ 3.591234754612763,
+ 3.207614819312586,
+ 2.473048186927024,
+ 1.702885029353488,
+ 0.897125346591982,
+ 0.513561009477969,
+ 0.125477545550710,
+ -0.267125045189792,
+ -1.773533414873785,
+ -3.141450982859891,
+ -4.370877749148106,
+ -5.562104227060234,
+ -6.171864888961167,
+ -6.200159734850907,
+ -5.781556055213110,
+ -4.974725570010514,
+ -3.779668279243120,
+ -2.569220222282655,
+ -1.254891157670244,
+ 0.163318914594122,
+ 2.074985916277011,
+ 3.711348850147548,
+ 5.072407716205733,
+ 5.754438923510391,
+ 6.155557010080926,
+ 6.275761975917336
+ };
+
+ double test_iy[31] = {
+ 0.000000000000000,
+ 0.005864903144198,
+ 0.023030998930796,
+ 0.050262495763030,
+ 0.058902457844100,
+ 0.068062330564832,
+ 0.077693991819461,
+ 0.096340576055474,
+ 0.116070578226521,
+ 0.136546192283223,
+ 0.146181187290769,
+ 0.155864434185569,
+ 0.165559443629720,
+ 0.203636318965633,
+ 0.239075190181586,
+ 0.269828050745236,
+ 0.299428805999600,
+ 0.315560685785616,
+ 0.316734151903742,
+ 0.305773798930857,
+ 0.284537037103156,
+ 0.254466034797342,
+ 0.224146112780097,
+ 0.190643050847000,
+ 0.155590744566140,
+ 0.107448508851745,
+ 0.064263083957312,
+ 0.029987183298960,
+ 0.013618510529526,
+ 0.003506827320794,
+ 0.000090064010007,
+ };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 11);
+ xy_table test_table = make_xy_table(test_x, test_y, 31);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 31);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 31);
+
+ s = test_interp (&data_table, gsl_interp_cspline_periodic, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "cspline periodic sine interpolation");
+ return s;
+}
+
+static int
+test_csplinep2 (void)
+{
+ /* This data tests the periodic case n=3 */
+
+ int s;
+
+ double data_x[3] = {
+ 0.123,
+ 0.423,
+ 1.123
+ };
+
+ double data_y[3] = {
+ 0.456000000000000,
+ 1.407056516295154,
+ 0.456000000000000
+ } ;
+
+ double test_x[61] = {
+ 0.123000000000000,
+ 0.133000000000000,
+ 0.143000000000000,
+ 0.153000000000000,
+ 0.163000000000000,
+ 0.173000000000000,
+ 0.183000000000000,
+ 0.193000000000000,
+ 0.203000000000000,
+ 0.213000000000000,
+ 0.223000000000000,
+ 0.233000000000000,
+ 0.243000000000000,
+ 0.253000000000000,
+ 0.263000000000000,
+ 0.273000000000000,
+ 0.283000000000000,
+ 0.293000000000000,
+ 0.303000000000000,
+ 0.313000000000000,
+ 0.323000000000000,
+ 0.333000000000000,
+ 0.343000000000000,
+ 0.353000000000000,
+ 0.363000000000000,
+ 0.373000000000000,
+ 0.383000000000000,
+ 0.393000000000000,
+ 0.403000000000000,
+ 0.413000000000000,
+ 0.423000000000000,
+ 0.446333333333333,
+ 0.469666666666667,
+ 0.493000000000000,
+ 0.516333333333333,
+ 0.539666666666667,
+ 0.563000000000000,
+ 0.586333333333333,
+ 0.609666666666667,
+ 0.633000000000000,
+ 0.656333333333333,
+ 0.679666666666667,
+ 0.703000000000000,
+ 0.726333333333333,
+ 0.749666666666667,
+ 0.773000000000000,
+ 0.796333333333333,
+ 0.819666666666667,
+ 0.843000000000000,
+ 0.866333333333333,
+ 0.889666666666667,
+ 0.913000000000000,
+ 0.936333333333333,
+ 0.959666666666667,
+ 0.983000000000000,
+ 1.006333333333333,
+ 1.029666666666667,
+ 1.053000000000000,
+ 1.076333333333333,
+ 1.099666666666667,
+ 1.123000000000000
+ };
+
+ double test_y[61] = {
+ 0.456000000000000,
+ 0.475443822110923,
+ 0.497423794931967,
+ 0.521758764840979,
+ 0.548267578215809,
+ 0.576769081434305,
+ 0.607082120874316,
+ 0.639025542913690,
+ 0.672418193930275,
+ 0.707078920301921,
+ 0.742826568406475,
+ 0.779479984621787,
+ 0.816858015325704,
+ 0.854779506896076,
+ 0.893063305710751,
+ 0.931528258147577,
+ 0.969993210584403,
+ 1.008277009399078,
+ 1.046198500969450,
+ 1.083576531673367,
+ 1.120229947888679,
+ 1.155977595993233,
+ 1.190638322364879,
+ 1.224030973381464,
+ 1.255974395420838,
+ 1.286287434860848,
+ 1.314788938079344,
+ 1.341297751454174,
+ 1.365632721363187,
+ 1.387612694184230,
+ 1.407056516295154,
+ 1.442092968697928,
+ 1.463321489456714,
+ 1.471728359403224,
+ 1.468299859369172,
+ 1.454022270186272,
+ 1.429881872686237,
+ 1.396864947700781,
+ 1.355957776061616,
+ 1.308146638600458,
+ 1.254417816149018,
+ 1.195757589539010,
+ 1.133152239602149,
+ 1.067588047170148,
+ 1.000051293074719,
+ 0.931528258147577,
+ 0.863005223220435,
+ 0.795468469125006,
+ 0.729904276693004,
+ 0.667298926756143,
+ 0.608638700146136,
+ 0.554909877694696,
+ 0.507098740233537,
+ 0.466191568594372,
+ 0.433174643608916,
+ 0.409034246108881,
+ 0.394756656925981,
+ 0.391328156891929,
+ 0.399735026838439,
+ 0.420963547597225,
+ 0.456000000000000
+ };
+
+ double test_dy[61] = {
+ 1.8115362215145774,
+ 2.0742089736341924,
+ 2.3187663635386602,
+ 2.5452083912279826,
+ 2.7535350567021584,
+ 2.9437463599611897,
+ 3.1158423010050744,
+ 3.2698228798338147,
+ 3.4056880964474079,
+ 3.5234379508458549,
+ 3.6230724430291570,
+ 3.7045915729973125,
+ 3.7679953407503231,
+ 3.8132837462881874,
+ 3.8404567896109061,
+ 3.8495144707184790,
+ 3.8404567896109061,
+ 3.8132837462881874,
+ 3.7679953407503231,
+ 3.7045915729973125,
+ 3.6230724430291565,
+ 3.5234379508458549,
+ 3.4056880964474074,
+ 3.2698228798338147,
+ 3.1158423010050749,
+ 2.9437463599611897,
+ 2.7535350567021584,
+ 2.5452083912279830,
+ 2.3187663635386597,
+ 2.0742089736341924,
+ 1.8115362215145772,
+ 1.1986331332354823,
+ 0.6279992234583869,
+ 0.0996344921833026,
+ -0.3864610605897765,
+ -0.8302874348608467,
+ -1.2318446306299125,
+ -1.5911326478969707,
+ -1.9081514866620208,
+ -2.1829011469250670,
+ -2.4153816286861041,
+ -2.6055929319451341,
+ -2.7535350567021584,
+ -2.8592080029571765,
+ -2.9226117707101862,
+ -2.9437463599611893,
+ -2.9226117707101862,
+ -2.8592080029571760,
+ -2.7535350567021593,
+ -2.6055929319451354,
+ -2.4153816286861045,
+ -2.1829011469250656,
+ -1.9081514866620242,
+ -1.5911326478969716,
+ -1.2318446306299160,
+ -0.8302874348608498,
+ -0.3864610605897769,
+ 0.0996344921832995,
+ 0.6279992234583824,
+ 1.1986331332354769,
+ 1.8115362215145772
+ };
+
+ double test_iy[61] = {
+ 0.000000000000000,
+ 0.004655030170954,
+ 0.009517330277919,
+ 0.014611356059886,
+ 0.019959751719625,
+ 0.025583349923681,
+ 0.031501171802382,
+ 0.037730426949832,
+ 0.044286513423914,
+ 0.051183017746288,
+ 0.058431714902395,
+ 0.066042568341453,
+ 0.074023729976459,
+ 0.082381540184189,
+ 0.091120527805195,
+ 0.100243410143811,
+ 0.109751092968147,
+ 0.119642670510092,
+ 0.129915425465314,
+ 0.140564828993259,
+ 0.151584540717153,
+ 0.162966408723997,
+ 0.174700469564574,
+ 0.186774948253444,
+ 0.199176258268946,
+ 0.211889001553197,
+ 0.224895968512091,
+ 0.238178138015305,
+ 0.251714677396289,
+ 0.265482942452275,
+ 0.279458477444273,
+ 0.312726362409309,
+ 0.346648754292945,
+ 0.380914974633193,
+ 0.415237358187469,
+ 0.449351252932597,
+ 0.483015020064806,
+ 0.516010033999735,
+ 0.548140682372425,
+ 0.579234366037328,
+ 0.609141499068300,
+ 0.637735508758604,
+ 0.664912835620912,
+ 0.690592933387298,
+ 0.714718269009247,
+ 0.737254322657649,
+ 0.758189587722801,
+ 0.777535570814405,
+ 0.795326791761572,
+ 0.811620783612819,
+ 0.826498092636068,
+ 0.840062278318649,
+ 0.852439913367300,
+ 0.863780583708163,
+ 0.874256888486789,
+ 0.884064440068133,
+ 0.893421864036559,
+ 0.902570799195836,
+ 0.911775897569142,
+ 0.921324824399059,
+ 0.931528258147577
+ };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 3);
+ xy_table test_table = make_xy_table(test_x, test_y, 61);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 61);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 61);
+
+ s = test_interp (&data_table, gsl_interp_cspline_periodic, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "cspline periodic 3pt interpolation");
+ return s;
+}
+
+
+
+static int
+test_akima (void)
+{
+ int s;
+
+ double data_x[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 };
+ double data_y[5] = { 0.0, 1.0, 2.0, 3.0, 4.0 };
+ double test_x[4] = { 0.0, 0.5, 1.0, 2.0 };
+ double test_y[4] = { 0.0, 0.5, 1.0, 2.0 };
+ double test_dy[4] = { 1.0, 1.0, 1.0, 1.0 };
+ double test_iy[4] = { 0.0, 0.125, 0.5, 2.0 };
+
+ xy_table data_table = make_xy_table(data_x, data_y, 5);
+ xy_table test_table = make_xy_table(test_x, test_y, 4);
+ xy_table test_d_table = make_xy_table(test_x, test_dy, 4);
+ xy_table test_i_table = make_xy_table(test_x, test_iy, 4);
+
+ s = test_interp (&data_table, gsl_interp_akima, &test_table, &test_d_table, &test_i_table);
+ gsl_test (s, "akima interpolation");
+ return s;
+}
+
+
+int
+main (int argc, char **argv)
+{
+ int status = 0;
+
+ gsl_ieee_env_setup ();
+
+ argc = 0; /* prevent warnings about unused parameters */
+ argv = 0;
+
+ status += test_bsearch();
+ status += test_linear();
+ status += test_polynomial();
+ status += test_cspline();
+ status += test_cspline2();
+ status += test_cspline3();
+ status += test_csplinep();
+ status += test_csplinep2();
+ status += test_akima();
+
+ exit (gsl_test_summary());
+}