diff -Nru gsl-2.4+dfsg/configure gsl-2.5+dfsg/configure --- gsl-2.4+dfsg/configure 2017-06-19 12:55:37.000000000 +0000 +++ gsl-2.5+dfsg/configure 2018-06-13 20:31:01.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gsl 2.4. +# Generated by GNU Autoconf 2.69 for gsl 2.5. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='gsl' PACKAGE_TARNAME='gsl' -PACKAGE_VERSION='2.4' -PACKAGE_STRING='gsl 2.4' +PACKAGE_VERSION='2.5' +PACKAGE_STRING='gsl 2.5' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1340,7 +1340,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gsl 2.4 to adapt to many kinds of systems. +\`configure' configures gsl 2.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1410,7 +1410,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gsl 2.4:";; + short | recursive ) echo "Configuration of gsl 2.5:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gsl configure 2.4 +gsl configure 2.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1983,7 +1983,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gsl $as_me 2.4, which was +It was created by gsl $as_me 2.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2848,7 +2848,7 @@ # Define the identity of the package. PACKAGE='gsl' - VERSION='2.4' + VERSION='2.5' cat >>confdefs.h <<_ACEOF @@ -2926,9 +2926,9 @@ -GSL_CURRENT=23 +GSL_CURRENT=24 GSL_REVISION=0 -GSL_AGE=0 +GSL_AGE=1 CBLAS_CURRENT=0 CBLAS_REVISION=0 CBLAS_AGE=0 @@ -13087,7 +13087,7 @@ -ac_config_files="$ac_config_files Makefile gsl_version.h gsl.spec blas/Makefile block/Makefile bspline/Makefile cblas/Makefile cdf/Makefile cheb/Makefile combination/Makefile complex/Makefile const/Makefile deriv/Makefile dht/Makefile diff/Makefile doc/Makefile doc/examples/Makefile eigen/Makefile err/Makefile fit/Makefile fft/Makefile gsl/Makefile histogram/Makefile ieee-utils/Makefile integration/Makefile interpolation/Makefile linalg/Makefile matrix/Makefile min/Makefile monte/Makefile multifit/Makefile multifit_nlinear/Makefile multilarge/Makefile multilarge_nlinear/Makefile multimin/Makefile multiroots/Makefile multiset/Makefile ntuple/Makefile ode-initval/Makefile ode-initval2/Makefile permutation/Makefile poly/Makefile qrng/Makefile randist/Makefile rng/Makefile roots/Makefile rstat/Makefile siman/Makefile sort/Makefile spblas/Makefile splinalg/Makefile spmatrix/Makefile specfunc/Makefile statistics/Makefile sum/Makefile sys/Makefile test/Makefile utils/Makefile vector/Makefile wavelet/Makefile" +ac_config_files="$ac_config_files Makefile gsl_version.h gsl.spec blas/Makefile block/Makefile bspline/Makefile cblas/Makefile cdf/Makefile cheb/Makefile combination/Makefile complex/Makefile const/Makefile deriv/Makefile dht/Makefile diff/Makefile doc/Makefile doc/examples/Makefile eigen/Makefile err/Makefile fft/Makefile filter/Makefile fit/Makefile gsl/Makefile histogram/Makefile ieee-utils/Makefile integration/Makefile interpolation/Makefile linalg/Makefile matrix/Makefile min/Makefile monte/Makefile movstat/Makefile multifit/Makefile multifit_nlinear/Makefile multilarge/Makefile multilarge_nlinear/Makefile multimin/Makefile multiroots/Makefile multiset/Makefile ntuple/Makefile ode-initval/Makefile ode-initval2/Makefile permutation/Makefile poly/Makefile qrng/Makefile randist/Makefile rng/Makefile roots/Makefile rstat/Makefile siman/Makefile sort/Makefile spblas/Makefile splinalg/Makefile spmatrix/Makefile specfunc/Makefile statistics/Makefile sum/Makefile sys/Makefile test/Makefile utils/Makefile vector/Makefile wavelet/Makefile" cat >confcache <<\_ACEOF @@ -13624,7 +13624,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gsl $as_me 2.4, which was +This file was extended by gsl $as_me 2.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13690,7 +13690,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gsl config.status 2.4 +gsl config.status 2.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -14120,8 +14120,9 @@ "doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/examples/Makefile" ;; "eigen/Makefile") CONFIG_FILES="$CONFIG_FILES eigen/Makefile" ;; "err/Makefile") CONFIG_FILES="$CONFIG_FILES err/Makefile" ;; - "fit/Makefile") CONFIG_FILES="$CONFIG_FILES fit/Makefile" ;; "fft/Makefile") CONFIG_FILES="$CONFIG_FILES fft/Makefile" ;; + "filter/Makefile") CONFIG_FILES="$CONFIG_FILES filter/Makefile" ;; + "fit/Makefile") CONFIG_FILES="$CONFIG_FILES fit/Makefile" ;; "gsl/Makefile") CONFIG_FILES="$CONFIG_FILES gsl/Makefile" ;; "histogram/Makefile") CONFIG_FILES="$CONFIG_FILES histogram/Makefile" ;; "ieee-utils/Makefile") CONFIG_FILES="$CONFIG_FILES ieee-utils/Makefile" ;; @@ -14131,6 +14132,7 @@ "matrix/Makefile") CONFIG_FILES="$CONFIG_FILES matrix/Makefile" ;; "min/Makefile") CONFIG_FILES="$CONFIG_FILES min/Makefile" ;; "monte/Makefile") CONFIG_FILES="$CONFIG_FILES monte/Makefile" ;; + "movstat/Makefile") CONFIG_FILES="$CONFIG_FILES movstat/Makefile" ;; "multifit/Makefile") CONFIG_FILES="$CONFIG_FILES multifit/Makefile" ;; "multifit_nlinear/Makefile") CONFIG_FILES="$CONFIG_FILES multifit_nlinear/Makefile" ;; "multilarge/Makefile") CONFIG_FILES="$CONFIG_FILES multilarge/Makefile" ;; diff -Nru gsl-2.4+dfsg/configure.ac gsl-2.5+dfsg/configure.ac --- gsl-2.4+dfsg/configure.ac 2017-07-21 12:16:58.000000000 +0000 +++ gsl-2.5+dfsg/configure.ac 2018-06-13 20:30:56.000000000 +0000 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([gsl],[2.4]) +AC_INIT([gsl],[2.5]) AC_CONFIG_SRCDIR(gsl_math.h) AM_INIT_AUTOMAKE([gnu]) @@ -34,6 +34,7 @@ dnl gsl-2.2.1 libgsl 21:0:2 libgslcblas 0:0:0 dnl gsl-2.3 libgsl 22:0:3 libgslcblas 0:0:0 dnl gsl-2.4 libgsl 23:0:0 libgslcblas 0:0:0 +dnl gsl-2.5 libgsl 24:0:1 libgslcblas 0:0:0 dnl dnl (*) There was an error on this release. Firstly, the versioning dnl numbers were not updated. Secondly, 2 functions were removed, but @@ -60,9 +61,9 @@ dnl for more detailed info dnl -GSL_CURRENT=23 +GSL_CURRENT=24 GSL_REVISION=0 -GSL_AGE=0 +GSL_AGE=1 dnl CBLAS_CURRENT=0 CBLAS_REVISION=0 @@ -579,9 +580,9 @@ AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; } ]) -dnl AH_VERBATIM([GSL_DISABLE_DEPRECATED], -dnl [/* Disable deprecated functions and enums while building */ -dnl #define GSL_DISABLE_DEPRECATED 1]) +AH_VERBATIM([GSL_DISABLE_DEPRECATED], +[/* Disable deprecated functions and enums while building */ +#define GSL_DISABLE_DEPRECATED 1]) dnl AC_CONFIG_FILES([ \ @@ -604,8 +605,9 @@ doc/examples/Makefile \ eigen/Makefile \ err/Makefile \ -fit/Makefile \ fft/Makefile \ +filter/Makefile \ +fit/Makefile \ gsl/Makefile \ histogram/Makefile \ ieee-utils/Makefile \ @@ -615,6 +617,7 @@ matrix/Makefile \ min/Makefile \ monte/Makefile \ +movstat/Makefile \ multifit/Makefile \ multifit_nlinear/Makefile \ multilarge/Makefile \ diff -Nru gsl-2.4+dfsg/configure.ac~ gsl-2.5+dfsg/configure.ac~ --- gsl-2.4+dfsg/configure.ac~ 2017-06-19 12:55:31.000000000 +0000 +++ gsl-2.5+dfsg/configure.ac~ 1970-01-01 00:00:00.000000000 +0000 @@ -1,650 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT([gsl],[2.4]) -AC_CONFIG_SRCDIR(gsl_math.h) - -AM_INIT_AUTOMAKE([gnu]) -AC_CONFIG_HEADERS([config.h]) -AM_MAINTAINER_MODE - -dnl Library versioning (C:R:A == current:revision:age) -dnl See the libtool manual for an explanation of the numbers -dnl -dnl gsl-1.0 libgsl 0:0:0 libgslcblas 0:0:0 -dnl gsl-1.1 libgsl 1:0:1 libgslcblas 0:0:0 -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 -dnl gsl-1.4 libgsl 5:0:5 libgslcblas 0:0:0 -dnl gsl-1.5 libgsl 6:0:6 libgslcblas 0:0:0 -dnl gsl-1.6 libgsl 7:0:7 libgslcblas 0:0:0 -dnl gsl-1.7 libgsl 8:0:8 libgslcblas 0:0:0 -dnl gsl-1.8 libgsl 9:0:9 libgslcblas 0:0:0 -dnl gsl-1.9 libgsl 10:0:10 libgslcblas 0:0:0 -dnl gsl-1.10 libgsl 10:0:10 (*) libgslcblas 0:0:0 -dnl gsl-1.11 libgsl 12:0:12 libgslcblas 0:0:0 -dnl gsl-1.12 libgsl 13:0:13 libgslcblas 0:0:0 -dnl gsl-1.13 libgsl 14:0:14 libgslcblas 0:0:0 -dnl gsl-1.14 libgsl 15:0:15 libgslcblas 0:0:0 -dnl gsl-1.15 libgsl 16:0:16 libgslcblas 0:0:0 -dnl gsl-1.16 libgsl 17:0:17 libgslcblas 0:0:0 -dnl gsl-2.0 libgsl 18:0:18 (**) libgslcblas 0:0:0 -dnl gsl-2.1 libgsl 19:0:0 libgslcblas 0:0:0 -dnl gsl-2.2 libgsl 20:0:1 libgslcblas 0:0:0 -dnl gsl-2.2.1 libgsl 21:0:2 libgslcblas 0:0:0 -dnl gsl-2.3 libgsl 22:0:3 libgslcblas 0:0:0 -dnl gsl-2.4 libgsl 23:0:0 libgslcblas 0:0:0 -dnl -dnl (*) There was an error on this release. Firstly, the versioning -dnl numbers were not updated. Secondly, 2 functions were removed, but -dnl the age not reset--this should have been 11:0:0. However these -dnl functions were not documented and are regarded as internal, so we -dnl will assume 11:0:11. -dnl -dnl (**) There was an error on this release. Age should have been -dnl reset to 18:0:0 -dnl -dnl How to update library version number -dnl ==================================== -dnl -dnl C: increment if the interface has additions, changes, removals. -dnl -dnl R: increment any time the source changes; set to 0 if you -dnl incremented CURRENT -dnl -dnl A: increment if any interfaces have been added; set to 0 if any -dnl interfaces have been removed. removal has precedence over adding, -dnl so set to 0 if both happened. -dnl -dnl See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -dnl for more detailed info - -dnl -GSL_CURRENT=23 -GSL_REVISION=0 -GSL_AGE=0 -dnl -CBLAS_CURRENT=0 -CBLAS_REVISION=0 -CBLAS_AGE=0 - -GSL_LT_VERSION="${GSL_CURRENT}:${GSL_REVISION}:${GSL_AGE}" -AC_SUBST(GSL_LT_VERSION) - -GSL_LT_CBLAS_VERSION="${CBLAS_CURRENT}:${CBLAS_REVISION}:${CBLAS_AGE}" -AC_SUBST(GSL_LT_CBLAS_VERSION) - -case "$VERSION" in - *+) - ;; - *) - AC_DEFINE(RELEASED,[],[Defined if this is an official release]) - ;; -esac - -dnl Split VERSION into GSL_VERSION_MAJOR and GSL_VERSION_MINOR -dnl Follows AX_SPLIT_VERSION macro from AC-Archive -dnl Rhys Ulerich -AC_PROG_SED -GSL_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'` -GSL_MINOR_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` -AC_SUBST(GSL_MAJOR_VERSION) -AC_SUBST(GSL_MINOR_VERSION) - -AC_PROG_MKDIR_P - -dnl things required by automake -dnl AC_ARG_PROGRAM -AC_PROG_MAKE_SET - -dnl Check for which system. -AC_CANONICAL_HOST - -dnl Checks for programs. -AC_LANG(C) -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -LT_INIT([win32-dll]) - -dnl Check compiler features -AC_TYPE_SIZE_T -dnl AC_C_CONST -AC_C_VOLATILE -AC_C_INLINE -AC_C_CHAR_UNSIGNED - -GSL_CFLAGS="-I$includedir" -GSL_LIBS="-L$libdir -lgsl" -dnl macro from libtool - can be replaced with LT_LIB_M when we require libtool 2 -LT_LIB_M -GSL_LIBM=$LIBM - -AC_SUBST(GSL_CFLAGS) -AC_SUBST(GSL_LIBS) -AC_SUBST(GSL_LIBM) - -if test "$ac_cv_c_inline" != no ; then -dnl Check for "extern inline", using a modified version of the test -dnl for AC_C_INLINE from acspecific.mt -dnl - AC_CACHE_CHECK([for GNU-style extern inline], ac_cv_c_extern_inline, - [ac_cv_c_extern_inline=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern $ac_cv_c_inline double foo(double x); - extern $ac_cv_c_inline double foo(double x) { return x + 1.0 ; } ; - double foo (double x) { return x + 1.0 ; };]], [[ foo(1.0) ]])],[ac_cv_c_extern_inline="yes"],[]) - ]) - - if test "$ac_cv_c_extern_inline" != no ; then - AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline]) - else - AC_CACHE_CHECK([for C99-style inline], ac_cv_c_c99inline, - [ac_cv_c_c99inline=no - dnl next line is a necessary condition - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern inline void* foo() { foo(); return &foo ; };]], - [[ return foo() != 0 ]])],[ac_cv_c_c99inline="yes"],[]) - dnl but not sufficient, extern must work but inline on its own should not - if test "$ac_cv_c_c99inline" != no ; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[inline void* foo() { foo(); return &foo ; };]], - [[ return foo() != 0 ]])],[],ac_cv_c_c99inline="no") - fi - ]) - if test "$ac_cv_c_c99inline" != no ; then - AC_DEFINE(HAVE_INLINE,[1],[Define if you have inline]) - AC_DEFINE(HAVE_C99_INLINE,[1],[Define if you have inline with C99 behavior]) - fi - fi -fi - -dnl Checks for header files. -AC_CHECK_HEADERS(ieeefp.h) - -dnl Checks for typedefs, structures, and compiler characteristics. - -case $host in - *-*-cygwin* | *-*-mingw* ) - if test "$enable_shared" = yes; then - GSLCBLAS_LDFLAGS="$GSLCBLAS_LDFLAGS -no-undefined" - GSL_LDFLAGS="$GSL_LDFLAGS -no-undefined" - GSL_LIBADD="cblas/libgslcblas.la" - fi - ;; -esac - -AC_SUBST(GSLCBLAS_LDFLAGS) -AC_SUBST(GSL_LDFLAGS) -AC_SUBST(GSL_LIBADD) - -dnl Checks for library functions. - -dnl AC_FUNC_ALLOCA -AC_FUNC_VPRINTF - -dnl strcasecmp, strerror, xmalloc, xrealloc, probably others should be added. -dnl removed strerror from this list, it's hardcoded in the err/ directory -dnl Any functions which appear in this list of functions should be provided -dnl in the utils/ directory -dnl xmalloc is not used, removed (bjg) -AC_REPLACE_FUNCS(memcpy memmove strdup strtol strtoul) - -AC_CACHE_CHECK(for EXIT_SUCCESS and EXIT_FAILURE, -ac_cv_decl_exit_success_and_failure, -AC_EGREP_CPP(yes, -[ -#include -#ifdef EXIT_SUCCESS -yes -#endif -], -ac_cv_decl_exit_success_and_failure=yes, -ac_cv_decl_exit_success_and_failure=no) -) - -if test "$ac_cv_decl_exit_success_and_failure" = yes ; then - AC_DEFINE(HAVE_EXIT_SUCCESS_AND_FAILURE,1,[Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h]) -fi ; - -dnl Use alternate libm if specified by user - -if test "x$LIBS" = "x" ; then - AC_CHECK_LIB(m, cos) -fi - -dnl Remember to put a definition in acconfig.h for each of these -AC_CHECK_DECLS(feenableexcept,,,[#define _GNU_SOURCE 1 -#include ]) -AC_CHECK_DECLS(fesettrapenable,,,[#define _GNU_SOURCE 1 -#include ]) -AC_CHECK_DECLS(hypot,,,[#include ]) -AC_CHECK_DECLS(expm1,,,[#include ]) -AC_CHECK_DECLS(acosh,,,[#include ]) -AC_CHECK_DECLS(asinh,,,[#include ]) -AC_CHECK_DECLS(atanh,,,[#include ]) -AC_CHECK_DECLS(ldexp,,,[#include ]) -AC_CHECK_DECLS(frexp,,,[#include ]) -AC_CHECK_DECLS([fprnd_t],[],[],[[#include ]]) -AC_CHECK_DECLS(isinf,,,[#include ]) -AC_CHECK_DECLS(isfinite,,,[#include ]) -AC_CHECK_DECLS(finite,,,[#include -#if HAVE_IEEEFP_H -#include -#endif]) -AC_CHECK_DECLS(isnan,,,[#include ]) - -dnl OpenBSD has a broken implementation of log1p. -case "$host" in - *-*-*openbsd*) - AC_MSG_RESULT([avoiding OpenBSD system log1p - using gsl version]) - ;; - *) - AC_CHECK_DECLS(log1p,,,[#include ]) - ;; -esac - -AC_CACHE_CHECK([for long double stdio], ac_cv_func_printf_longdouble, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -int main (void) -{ -const char * s = "5678.25"; long double x = 1.234 ; -fprintf(stderr,"%Lg\n",x) ; -sscanf(s, "%Lg", &x); -if (x == 5678.25) {exit (0);} else {exit(1); }; -}]])],[ac_cv_func_printf_longdouble="yes"],[ac_cv_func_printf_longdouble="no"],[ac_cv_func_printf_longdouble="no"])]) - -if test "$ac_cv_func_printf_longdouble" != no; then - AC_DEFINE(HAVE_PRINTF_LONGDOUBLE,1,[Define this if printf can handle %Lf for long double]) -fi - -AC_CACHE_CHECK([for extended floating point registers],ac_cv_c_extended_fp, -[case "$host" in - *sparc*-*-*) - ac_cv_c_extended_fp=no - ;; - *powerpc*-*-*) - ac_cv_c_extended_fp=no - ;; - *hppa*-*-*) - ac_cv_c_extended_fp=no - ;; - *alpha*-*-*) - ac_cv_c_extended_fp=no - ;; - *68k*-*-*) - ac_cv_c_extended_fp=yes - ;; - *86-*-*) - ac_cv_c_extended_fp=yes - ;; - x86_64-*-*) - ac_cv_c_extended_fp=yes - ;; - *) - ac_cv_c_extended_fp=unknown - ;; -esac -]) - -if test $ac_cv_c_extended_fp != "no" ; then - AC_DEFINE(HAVE_EXTENDED_PRECISION_REGISTERS,1,[Defined on architectures with excess floating-point precision]) -fi - -AC_CACHE_CHECK([for IEEE arithmetic interface type], ac_cv_c_ieee_interface, -[case "$host" in - sparc-*-linux*) - ac_cv_c_ieee_interface=gnusparc - ;; - m68k-*-linux*) - ac_cv_c_ieee_interface=gnum68k - ;; - powerpc-*-linux*) - ac_cv_c_ieee_interface=gnuppc - ;; - *86-*-gnu | *86_64-*-gnu | *86-*-linux* | *86_64-*-linux*) - ac_cv_c_ieee_interface=gnux86 - ;; - *-*-sunos4*) - ac_cv_c_ieee_interface=sunos4 - ;; - *-*-solaris*) - ac_cv_c_ieee_interface=solaris - ;; - *-*-hpux11*) - ac_cv_c_ieee_interface=hpux11 - ;; - *-*-hpux*) - ac_cv_c_ieee_interface=hpux - ;; - *-*-osf*) - ac_cv_c_ieee_interface=tru64 - ;; - *-*-aix*) - ac_cv_c_ieee_interface=aix - ;; - *-*-irix*) - ac_cv_c_ieee_interface=irix - ;; - powerpc-*-*darwin*) - ac_cv_c_ieee_interface=darwin - ;; - *86-*-*darwin*) - ac_cv_c_ieee_interface=darwin86 - ;; - *-*-*netbsd*) - ac_cv_c_ieee_interface=netbsd - ;; - *-*-*openbsd*) - ac_cv_c_ieee_interface=openbsd - ;; - *-*-*bsd*) - ac_cv_c_ieee_interface=freebsd - ;; - *-*-os2*) - ac_cv_c_ieee_interface=os2emx - ;; - *) - ac_cv_c_ieee_interface=unknown - ;; -esac -]) - -if test "$ac_cv_c_ieee_interface" = "gnux86" ; then - AC_CACHE_CHECK([for FPU_SETCW], ac_cv_c_fpu_setcw, - [ac_cv_c_fpu_setcw=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#ifndef _FPU_SETCW -#include -#define _FPU_SETCW(cw) __setfpucw(cw) -#endif -]], [[ unsigned short mode = 0 ; _FPU_SETCW(mode); ]])],[ac_cv_c_fpu_setcw="yes"],[ac_cv_c_ieee_interface=unknown]) - ]) -fi - -if test "$ac_cv_c_ieee_interface" = "gnux86" ; then - AC_CACHE_CHECK([for SSE extensions], ac_cv_c_fpu_sse, - [ac_cv_c_fpu_sse=no - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) -]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (*&cw_sse)) -]], [[ unsigned int mode = 0x1f80 ; _FPU_SETMXCSR(mode); exit(0); ]])],[ac_cv_c_fpu_sse="yes"],[ac_cv_c_fpu_sse="no"]) -])]) - - if test $ac_cv_c_fpu_sse = yes; then - AC_DEFINE([HAVE_FPU_X86_SSE], 1, - [Define if x86 processor has sse extensions.]) - fi -fi - -ac_tr_ieee_interface=HAVE_`echo $ac_cv_c_ieee_interface | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`_IEEE_INTERFACE -AC_DEFINE_UNQUOTED($ac_tr_ieee_interface,1,[IEEE Interface Type]) - -AC_SUBST(HAVE_GNUSPARC_IEEE_INTERFACE) -AC_SUBST(HAVE_GNUM68K_IEEE_INTERFACE) -AC_SUBST(HAVE_GNUPPC_IEEE_INTERFACE) -AC_SUBST(HAVE_GNUX86_IEEE_INTERFACE) -AC_SUBST(HAVE_SUNOS4_IEEE_INTERFACE) -AC_SUBST(HAVE_SOLARIS_IEEE_INTERFACE) -AC_SUBST(HAVE_HPUX11_IEEE_INTERFACE) -AC_SUBST(HAVE_HPUX_IEEE_INTERFACE) -AC_SUBST(HAVE_TRU64_IEEE_INTERFACE) -AC_SUBST(HAVE_IRIX_IEEE_INTERFACE) -AC_SUBST(HAVE_AIX_IEEE_INTERFACE) -AC_SUBST(HAVE_FREEBSD_IEEE_INTERFACE) -AC_SUBST(HAVE_OS2EMX_IEEE_INTERFACE) -AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE) -AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE) -AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE) -AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE) - -dnl Check for IEEE control flags - -save_cflags="$CFLAGS" -AC_CACHE_CHECK([for IEEE compiler flags], ac_cv_c_ieee_flags, -[ -case "$host" in - alpha*-*-*) - if test X"$GCC" = Xyes ; then - ieee_flags='-mieee -mfp-rounding-mode=d' - else - # This assumes Compaq's C compiler. - ieee_flags='-ieee -fprm d' - fi - ;; -esac -if test X"$ieee_flags" != X ; then - CFLAGS="$ieee_flags $CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int foo;]])],[ac_cv_c_ieee_flags="$ieee_flags"],[ac_cv_c_ieee_flags="none"]) -else - ac_cv_c_ieee_flags="none" -fi]) - -if test "$ac_cv_c_ieee_flags" != "none" ; then - CFLAGS="$ac_cv_c_ieee_flags $save_cflags" -else - CFLAGS="$save_cflags" -fi - -dnl Check IEEE comparisons, whether "x != x" is true for NaNs -dnl -AC_CACHE_CHECK([for IEEE comparisons], ac_cv_c_ieee_comparisons, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -int main (void) -{ - int status; double inf, nan; - inf = exp(1.0e10); - nan = inf / inf ; - status = (nan == nan); - exit (status); -}]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"]) -]) - -if test "$ac_cv_c_ieee_comparisons" != no ; then - AC_DEFINE(HAVE_IEEE_COMPARISONS,1,[Define this if IEEE comparisons work correctly (e.g. NaN != NaN)]) -fi - -dnl Check for IEEE denormalized arithmetic -dnl -AC_CACHE_CHECK([for IEEE denormalized values], ac_cv_c_ieee_denormals, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -int main (void) -{ - int i, status; - volatile double z = 1e-308; - for (i = 0; i < 5; i++) { z = z / 10.0 ; }; - for (i = 0; i < 5; i++) { z = z * 10.0 ; }; - status = (z == 0.0); - exit (status); -}]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"]) -]) - -if test "$ac_cv_c_ieee_denormals" != no ; then - AC_DEFINE(HAVE_IEEE_DENORMALS,1,[Define this if IEEE denormalized numbers are available]) -fi - -AH_TEMPLATE([HIDE_INLINE_STATIC],[Define if you need to hide the static definitions of inline functions]) - -AH_BOTTOM([/* Use 0 and 1 for EXIT_SUCCESS and EXIT_FAILURE if we don't have them */ -#if !HAVE_EXIT_SUCCESS_AND_FAILURE -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 -#endif]) - -AH_BOTTOM([/* Define one of these if you have a known IEEE arithmetic interface */ -#undef HAVE_GNUSPARC_IEEE_INTERFACE -#undef HAVE_GNUM68K_IEEE_INTERFACE -#undef HAVE_GNUPPC_IEEE_INTERFACE -#undef HAVE_GNUX86_IEEE_INTERFACE -#undef HAVE_SUNOS4_IEEE_INTERFACE -#undef HAVE_SOLARIS_IEEE_INTERFACE -#undef HAVE_HPUX11_IEEE_INTERFACE -#undef HAVE_HPUX_IEEE_INTERFACE -#undef HAVE_TRU64_IEEE_INTERFACE -#undef HAVE_IRIX_IEEE_INTERFACE -#undef HAVE_AIX_IEEE_INTERFACE -#undef HAVE_FREEBSD_IEEE_INTERFACE -#undef HAVE_OS2EMX_IEEE_INTERFACE -#undef HAVE_NETBSD_IEEE_INTERFACE -#undef HAVE_OPENBSD_IEEE_INTERFACE -#undef HAVE_DARWIN_IEEE_INTERFACE -#undef HAVE_DARWIN86_IEEE_INTERFACE]) - -AH_BOTTOM([/* Define a rounding function which moves extended precision values - out of registers and rounds them to double-precision. This should - be used *sparingly*, in places where it is necessary to keep - double-precision rounding for critical expressions while running in - extended precision. For example, the following code should ensure - exact equality, even when extended precision registers are in use, - - double q = GSL_COERCE_DBL(3.0/7.0) ; - if (q == GSL_COERCE_DBL(3.0/7.0)) { ... } ; - - It carries a penalty even when the program is running in double - precision mode unless you compile a separate version of the - library with HAVE_EXTENDED_PRECISION_REGISTERS turned off. */ - -#if HAVE_EXTENDED_PRECISION_REGISTERS -#define GSL_COERCE_DBL(x) (gsl_coerce_double(x)) -#else -#define GSL_COERCE_DBL(x) (x) -#endif]) - -AH_BOTTOM([/* Substitute gsl functions for missing system functions */ - -#if !HAVE_DECL_HYPOT -#define hypot gsl_hypot -#endif - -#if !HAVE_DECL_LOG1P -#define log1p gsl_log1p -#endif - -#if !HAVE_DECL_EXPM1 -#define expm1 gsl_expm1 -#endif - -#if !HAVE_DECL_ACOSH -#define acosh gsl_acosh -#endif - -#if !HAVE_DECL_ASINH -#define asinh gsl_asinh -#endif - -#if !HAVE_DECL_ATANH -#define atanh gsl_atanh -#endif - -#if !HAVE_DECL_LDEXP -#define ldexp gsl_ldexp -#endif - -#if !HAVE_DECL_FREXP -#define frexp gsl_frexp -#endif - -#if !HAVE_DECL_ISINF -#define isinf gsl_isinf -#endif - -#if !HAVE_DECL_ISFINITE -#define isfinite gsl_finite -#endif - -#if !HAVE_DECL_FINITE -#define finite gsl_finite -#endif - -#if !HAVE_DECL_ISNAN -#define isnan gsl_isnan -#endif]) - -AH_BOTTOM([#ifdef __GNUC__ -#define DISCARD_POINTER(p) do { ; } while(p ? 0 : 0); -#else -#define DISCARD_POINTER(p) /* ignoring discarded pointer */ -#endif]) - -AH_BOTTOM([#if defined(GSL_RANGE_CHECK_OFF) || !defined(GSL_RANGE_CHECK) -#define GSL_RANGE_CHECK 0 /* turn off range checking by default internally */ -#endif]) - -AH_BOTTOM([#define RETURN_IF_NULL(x) if (!x) { return ; } -]) - -AH_VERBATIM([GSL_DISABLE_DEPRECATED], -[/* Disable deprecated functions and enums while building */ -#define GSL_DISABLE_DEPRECATED 1]) - -dnl -AC_CONFIG_FILES([ \ -Makefile \ -gsl_version.h \ -gsl.spec \ -blas/Makefile \ -block/Makefile \ -bspline/Makefile \ -cblas/Makefile \ -cdf/Makefile \ -cheb/Makefile \ -combination/Makefile \ -complex/Makefile \ -const/Makefile \ -deriv/Makefile \ -dht/Makefile \ -diff/Makefile \ -doc/Makefile \ -doc/examples/Makefile \ -eigen/Makefile \ -err/Makefile \ -fit/Makefile \ -fft/Makefile \ -gsl/Makefile \ -histogram/Makefile \ -ieee-utils/Makefile \ -integration/Makefile \ -interpolation/Makefile \ -linalg/Makefile \ -matrix/Makefile \ -min/Makefile \ -monte/Makefile \ -multifit/Makefile \ -multifit_nlinear/Makefile \ -multilarge/Makefile \ -multilarge_nlinear/Makefile \ -multimin/Makefile \ -multiroots/Makefile \ -multiset/Makefile \ -ntuple/Makefile \ -ode-initval/Makefile \ -ode-initval2/Makefile \ -permutation/Makefile \ -poly/Makefile \ -qrng/Makefile \ -randist/Makefile \ -rng/Makefile \ -roots/Makefile \ -rstat/Makefile \ -siman/Makefile \ -sort/Makefile \ -spblas/Makefile \ -splinalg/Makefile \ -spmatrix/Makefile \ -specfunc/Makefile \ -statistics/Makefile \ -sum/Makefile \ -sys/Makefile \ -test/Makefile \ -utils/Makefile \ -vector/Makefile \ -wavelet/Makefile \ -]) - -AC_OUTPUT diff -Nru gsl-2.4+dfsg/debian/changelog gsl-2.5+dfsg/debian/changelog --- gsl-2.4+dfsg/debian/changelog 2017-08-09 15:07:24.000000000 +0000 +++ gsl-2.5+dfsg/debian/changelog 2019-10-31 21:41:07.000000000 +0000 @@ -1,3 +1,68 @@ +gsl (2.5+dfsg-6~18.04) bionic; urgency=medium + + * Backport. + + -- DNS Thu, 31 Oct 2019 22:41:07 +0100 + +gsl (2.5+dfsg-6) unstable; urgency=medium + + * filter/rmedian.c: Renamed structure element delete to delete_oldest + * movstat/apply.c: Idem + * movstat/gsl_movstat.h: Idem (Closes: #912341) + + * doc/gsl-randist.1: Applied patch suggested by Barak Pearlmutter + (Closes: #915539) + + -- Dirk Eddelbuettel Mon, 26 Nov 2018 20:45:48 -0600 + +gsl (2.5+dfsg-5) unstable; urgency=medium + + [ Steve Langasek ] + * Makefile.am: Resolve underlinkage of libgslcblas (Closes: #907119) + * debian/rules: Enforce current automake and autolocal for dh_autoreconf + + [ Dirk Eddelbuettel ] + * debian/*: Applied Steve's patch, with thanks + + -- Dirk Eddelbuettel Thu, 23 Aug 2018 20:30:39 -0500 + +gsl (2.5+dfsg-4) unstable; urgency=medium + + * debian/libgsl23.shlibs: Use correct suffix (Closes: #902623) + * debian/libgslcblas0.shlibs: Idem + + -- Dirk Eddelbuettel Thu, 28 Jun 2018 13:38:17 -0500 + +gsl (2.5+dfsg-3) unstable; urgency=medium + + * Rebuilding for unstable + + * debian/patches/series: Reactivate 'dont-disable-deprecated' to provide + otherwise deprecated symbols for the Perl GSL package (Closes: #902281) + + -- Dirk Eddelbuettel Tue, 26 Jun 2018 05:09:48 -0500 + +gsl (2.5+dfsg-2) experimental; urgency=medium + + * debian/patches/series: Reactivate 'dont-disable-deprecated' to provide + otherwise deprecated symbols for the Perl GSL package (Closes: #902281) + + -- Dirk Eddelbuettel Sun, 24 Jun 2018 07:45:08 -0500 + +gsl (2.5+dfsg-1) unstable; urgency=medium + + * New upstream release + + * doc/*.{rst,texi,info}: As before, removed files from the doc/ + directory now containing what Debian considers to be 'non-free' + documentation (ie texinfo pages) to create a source package that + complies with Debian's interpretation of what is free. + * doc/Makefile.am: Made all targets apart from man files 'empty' + + * configure.ac: Once again do no mark deprecated functions as such + + -- Dirk Eddelbuettel Sat, 16 Jun 2018 18:13:23 -0500 + gsl (2.4+dfsg-6) unstable; urgency=medium * debian/control: Version is as 'Replaces: libgsl23 (<< 2.4+dfsg-4)' diff -Nru gsl-2.4+dfsg/debian/compat gsl-2.5+dfsg/debian/compat --- gsl-2.4+dfsg/debian/compat 2015-07-18 21:05:11.000000000 +0000 +++ gsl-2.5+dfsg/debian/compat 2018-06-16 23:25:59.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru gsl-2.4+dfsg/debian/control gsl-2.5+dfsg/debian/control --- gsl-2.4+dfsg/debian/control 2017-08-09 15:07:24.000000000 +0000 +++ gsl-2.5+dfsg/debian/control 2018-06-25 11:27:30.000000000 +0000 @@ -2,9 +2,11 @@ Section: math Priority: optional Maintainer: Dirk Eddelbuettel -Standards-Version: 3.9.8 -Build-Depends: gawk | awk, debhelper (>= 9), gcc (>= 4:4.0), binutils (>= 2.12.90.0.9), dh-autoreconf -Homepage: http://www.gnu.org/software/gsl +Standards-Version: 4.1.4 +Build-Depends: gawk | awk, debhelper (>= 10), gcc (>= 4:4.0), binutils (>= 2.12.90.0.9) +Vcs-Browser: https://salsa.debian.org/edd/gsl +Vcs-Git: https://salsa.debian.org/edd/gsl.git +Homepage: https://www.gnu.org/software/gsl Package: libgsl23 Section: libs @@ -100,7 +102,7 @@ Package: libgsl-dbg Section: debug -Priority: extra +Priority: optional Architecture: any Multi-Arch: same Depends: libgsl23 (= ${binary:Version}), ${misc:Depends} @@ -122,7 +124,7 @@ Package: libgsl-prof Section: libdevel -Priority: extra +Priority: optional Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} diff -Nru gsl-2.4+dfsg/debian/libgsl23.shlib gsl-2.5+dfsg/debian/libgsl23.shlib --- gsl-2.4+dfsg/debian/libgsl23.shlib 2017-08-05 18:09:24.000000000 +0000 +++ gsl-2.5+dfsg/debian/libgsl23.shlib 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -libgsl 23 libgsl23 (>= 2.4) diff -Nru gsl-2.4+dfsg/debian/libgsl23.shlibs gsl-2.5+dfsg/debian/libgsl23.shlibs --- gsl-2.4+dfsg/debian/libgsl23.shlibs 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/debian/libgsl23.shlibs 2018-08-24 01:10:24.000000000 +0000 @@ -0,0 +1 @@ +libgsl 23 libgsl23 (>= 2.5) diff -Nru gsl-2.4+dfsg/debian/libgslcblas0.shlib gsl-2.5+dfsg/debian/libgslcblas0.shlib --- gsl-2.4+dfsg/debian/libgslcblas0.shlib 2017-08-05 18:09:16.000000000 +0000 +++ gsl-2.5+dfsg/debian/libgslcblas0.shlib 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -libgslcblas 0 libgslcblas0 (>= 2.4) diff -Nru gsl-2.4+dfsg/debian/libgslcblas0.shlibs gsl-2.5+dfsg/debian/libgslcblas0.shlibs --- gsl-2.4+dfsg/debian/libgslcblas0.shlibs 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/debian/libgslcblas0.shlibs 2018-08-24 01:10:24.000000000 +0000 @@ -0,0 +1 @@ +libgslcblas 0 libgslcblas0 (>= 2.4) diff -Nru gsl-2.4+dfsg/debian/patches/gsl-cblas-linkage gsl-2.5+dfsg/debian/patches/gsl-cblas-linkage --- gsl-2.4+dfsg/debian/patches/gsl-cblas-linkage 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/debian/patches/gsl-cblas-linkage 2018-08-24 01:41:46.000000000 +0000 @@ -0,0 +1,19 @@ +Description: add missing linkage on libgslcblas to libgsl.so + libgsl has missing symbols because it is not linked against libgslcblas. + Fix it so the library is properly stand-alone. +Author: Steve Langasek +Last-Modified: 2018-08-23 + +Index: gsl-2.5+dfsg/Makefile.am +=================================================================== +--- gsl-2.5+dfsg.orig/Makefile.am ++++ gsl-2.5+dfsg/Makefile.am +@@ -19,7 +19,7 @@ + + lib_LTLIBRARIES = libgsl.la + libgsl_la_SOURCES = version.c +-libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS) ++libgsl_la_LIBADD = $(GSL_LIBADD) $(SUBLIBS) cblas/libgslcblas.la + libgsl_la_LDFLAGS = $(GSL_LDFLAGS) -version-info $(GSL_LT_VERSION) + noinst_HEADERS = templates_on.h templates_off.h build.h + diff -Nru gsl-2.4+dfsg/debian/patches/manual-page-correction gsl-2.5+dfsg/debian/patches/manual-page-correction --- gsl-2.4+dfsg/debian/patches/manual-page-correction 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/debian/patches/manual-page-correction 2018-11-27 02:42:12.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Missing double hyphen in manual page +Author: Dirk Eddelbuettel +Bug-Debian: https://bugs.debian.org/913539 +Origin: other, email by Barak Pearlmutter +Last-Update: 2018-11-27 + +--- gsl-2.5+dfsg.orig/doc/gsl-randist.1 ++++ gsl-2.5+dfsg/doc/gsl-randist.1 +@@ -15,7 +15,7 @@ Here is an example. We generate 10000 r + distribution with a width of 30 and histogram them over the range -100 to + 100, using 200 bins. + +- gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat ++ gsl-randist 0 10000 cauchy 30 | gsl-histogram -- -100 100 200 > histogram.dat + + A plot of the resulting histogram will show the familiar shape of the + Cauchy distribution with fluctuations caused by the finite sample diff -Nru gsl-2.4+dfsg/debian/patches/renamed-delete gsl-2.5+dfsg/debian/patches/renamed-delete --- gsl-2.4+dfsg/debian/patches/renamed-delete 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/debian/patches/renamed-delete 2018-11-27 02:42:35.000000000 +0000 @@ -0,0 +1,77 @@ +Description: The struct member 'delete' conflicts in C++ code + Upstream patch +Author: Dirk Eddelbuettel +Bug-Debian: https://bugs.debian.org/907119 +Origin: upstream, http://git.savannah.gnu.org/cgit/gsl.git/commit/?id=d9a747a9d2819899e436bb546edd61bfcab0558e +Bug-Debian: https://bugs.debian.org/912341 +Last-Update: 2018-11-27 + +--- gsl-2.5+dfsg.orig/filter/rmedian.c ++++ gsl-2.5+dfsg/filter/rmedian.c +@@ -188,7 +188,7 @@ static int + rmedian_delete(void * vstate) + { + rmedian_state_t * state = (rmedian_state_t *) vstate; +- return (state->minmax_acc->delete)(state->minmax_state); ++ return (state->minmax_acc->delete_oldest)(state->minmax_state); + } + + static int +--- gsl-2.5+dfsg.orig/movstat/apply.c ++++ gsl-2.5+dfsg/movstat/apply.c +@@ -91,7 +91,7 @@ gsl_movstat_apply_accum(const gsl_movsta + for (i = 0; i < H; ++i) + (accum->insert)(x1, w->state); + } +- else if (accum->delete == NULL) /* FIXME XXX */ ++ else if (accum->delete_oldest == NULL) /* FIXME XXX */ + { + /* save last K - 1 samples of x for later (needed for in-place input/output) */ + int idx1 = GSL_MAX(n - J - H, 0); +@@ -125,7 +125,7 @@ gsl_movstat_apply_accum(const gsl_movsta + int idx1 = GSL_MAX(n - J, 0); + int idx2 = n - 1; + +- if (accum->delete == NULL) ++ if (accum->delete_oldest == NULL) + { + int wsize = n - GSL_MAX(n - J - H, 0); /* size of work array */ + +@@ -154,7 +154,7 @@ gsl_movstat_apply_accum(const gsl_movsta + if (i - H > 0) + { + /* delete oldest window sample as we move closer to edge */ +- (accum->delete)(w->state); ++ (accum->delete_oldest)(w->state); + } + + /* yi = acc_get [ work(i:K-2) ] */ +--- gsl-2.5+dfsg.orig/movstat/gsl_movstat.h ++++ gsl-2.5+dfsg/movstat/gsl_movstat.h +@@ -43,19 +43,19 @@ typedef enum + } gsl_movstat_end_t; + + /* accumulator struct +- * size - return number of bytes needed for accumulator with maximum of n elements +- * init - initialize accumulator state +- * insert - insert a single sample into accumulator; if there are already n +- * samples in accumulator, oldest sample is overwritten +- * delete - delete oldest sample from accumulator +- * get - return accumulated value ++ * size - return number of bytes needed for accumulator with maximum of n elements ++ * init - initialize accumulator state ++ * insert - insert a single sample into accumulator; if there are already n ++ * samples in accumulator, oldest sample is overwritten ++ * delete_oldest - delete oldest sample from accumulator ++ * get - return accumulated value + */ + typedef struct + { + size_t (*size) (const size_t n); + int (*init) (const size_t n, void * vstate); + int (*insert) (const double x, void * vstate); +- int (*delete) (void * vstate); ++ int (*delete_oldest) (void * vstate); + int (*get) (void * params, double * result, const void * vstate); + } gsl_movstat_accum; + diff -Nru gsl-2.4+dfsg/debian/patches/series gsl-2.5+dfsg/debian/patches/series --- gsl-2.4+dfsg/debian/patches/series 2017-07-27 11:57:18.000000000 +0000 +++ gsl-2.5+dfsg/debian/patches/series 2018-11-27 02:38:10.000000000 +0000 @@ -1 +1,6 @@ - +dont-disable-deprecated +## dont-disable-deprecated.full +## reset-so-number +gsl-cblas-linkage +manual-page-correction +renamed-delete diff -Nru gsl-2.4+dfsg/debian/rules gsl-2.5+dfsg/debian/rules --- gsl-2.4+dfsg/debian/rules 2017-08-05 18:11:09.000000000 +0000 +++ gsl-2.5+dfsg/debian/rules 2018-08-24 01:29:19.000000000 +0000 @@ -104,7 +104,7 @@ #[ -d doc ] || mkdir doc #cp -vax debian/Makefile.in.doc doc/Makefile.in - dh_autoreconf + AUTOMAKE=automake ACLOCAL=aclocal dh_autoreconf ./configure CFLAGS="$(CFLAGS)" \ LDFLAGS="$(LDFLAGS)" \ --prefix=/usr \ @@ -112,6 +112,7 @@ --enable-shared \ --enable-static \ --with-gnu-ld \ + --enable-maintainer-mode \ $(CONFFLAGS) # patch libtool re rpath (see lintian docu) @@ -130,7 +131,7 @@ #[ -d doc ] || mkdir doc #cp -vax debian/Makefile.in.doc doc/Makefile.in - dh_autoreconf + AUTOMAKE=automake ACLOCAL=aclocal dh_autoreconf ./configure CFLAGS="$(CFLAGS)" \ --prefix=/usr \ --disable-shared \ diff -Nru gsl-2.4+dfsg/doc/conf.py gsl-2.5+dfsg/doc/conf.py --- gsl-2.4+dfsg/doc/conf.py 2017-06-14 09:13:45.000000000 +0000 +++ gsl-2.5+dfsg/doc/conf.py 2018-06-03 01:22:59.000000000 +0000 @@ -47,7 +47,7 @@ # General information about the project. project = u'GSL' -copyright = u'1996-2017 The GSL Team' +copyright = u'1996-2018 The GSL Team' author = u'The GSL Team' title = u'GNU Scientific Library' @@ -56,9 +56,9 @@ # built documents. # # The short X.Y version. -version = u'2.4' +version = u'2.5' # The full version, including alpha/beta/rc tags. -release = u'2.4' +release = u'2.5' primary_domain = 'c' numfig = True diff -Nru gsl-2.4+dfsg/doc/examples/filt_edge.c gsl-2.5+dfsg/doc/examples/filt_edge.c --- gsl-2.4+dfsg/doc/examples/filt_edge.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/filt_edge.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,63 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 1000; /* length of time series */ + const size_t K = 7; /* window size */ + const double f = 5.0; /* frequency of square wave in Hz */ + gsl_filter_median_workspace *median_p = gsl_filter_median_alloc(K); + gsl_filter_rmedian_workspace *rmedian_p = gsl_filter_rmedian_alloc(K); + gsl_vector *t = gsl_vector_alloc(N); /* time */ + gsl_vector *x = gsl_vector_alloc(N); /* input vector */ + gsl_vector *y_median = gsl_vector_alloc(N); /* median filtered output */ + gsl_vector *y_rmedian = gsl_vector_alloc(N); /* recursive median filtered output */ + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + size_t i; + + /* generate input signal */ + for (i = 0; i < N; ++i) + { + double ti = (double) i / (N - 1.0); + double tmp = sin(2.0 * M_PI * f * ti); + double xi = (tmp >= 0.0) ? 1.0 : -1.0; + double ei = gsl_ran_gaussian(r, 0.1); + + gsl_vector_set(t, i, ti); + gsl_vector_set(x, i, xi + ei); + } + + gsl_filter_median(GSL_FILTER_END_PADVALUE, x, y_median, median_p); + gsl_filter_rmedian(GSL_FILTER_END_PADVALUE, x, y_rmedian, rmedian_p); + + /* print results */ + for (i = 0; i < N; ++i) + { + double ti = gsl_vector_get(t, i); + double xi = gsl_vector_get(x, i); + double medi = gsl_vector_get(y_median, i); + double rmedi = gsl_vector_get(y_rmedian, i); + + printf("%f %f %f %f\n", + ti, + xi, + medi, + rmedi); + } + + gsl_vector_free(t); + gsl_vector_free(x); + gsl_vector_free(y_median); + gsl_vector_free(y_rmedian); + gsl_rng_free(r); + gsl_filter_median_free(median_p); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/filt_edge.txt gsl-2.5+dfsg/doc/examples/filt_edge.txt --- gsl-2.4+dfsg/doc/examples/filt_edge.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/filt_edge.txt 2018-05-11 20:31:45.000000000 +0000 @@ -0,0 +1,1000 @@ +0.000000 1.013392 1.013392 1.013392 +0.001001 0.991190 1.013392 1.013392 +0.002002 1.167441 1.013392 1.013392 +0.003003 1.073364 1.013392 1.013392 +0.004004 1.099752 0.991190 1.013392 +0.005005 0.872250 0.996091 0.996091 +0.006006 0.760328 0.996091 0.996091 +0.007007 0.932072 0.996091 0.996091 +0.008008 0.996091 0.932072 0.996091 +0.009009 1.089356 0.933202 0.996091 +0.010010 0.998235 0.996091 0.996091 +0.011011 0.870344 0.998235 0.996091 +0.012012 0.933202 0.998235 0.996091 +0.013013 1.018171 0.945175 0.996091 +0.014014 1.083105 0.945175 0.996091 +0.015015 0.945175 0.945175 0.996091 +0.016016 0.936197 0.945175 0.996091 +0.017017 1.000709 0.945175 0.996091 +0.018018 0.933015 0.945175 0.996091 +0.019019 0.917224 0.963241 0.996091 +0.020020 1.061250 0.963241 0.996091 +0.021021 0.963241 0.941619 0.971051 +0.022022 0.971051 0.963241 0.971051 +0.023023 0.908313 0.971051 0.971051 +0.024024 0.941619 0.963241 0.971051 +0.025025 1.006462 0.971051 0.971051 +0.026026 1.004674 0.985577 0.971051 +0.027027 0.924927 0.985577 0.971051 +0.028028 0.985577 0.985577 0.973930 +0.029029 1.147556 0.985577 0.973930 +0.030030 0.979352 0.979352 0.973930 +0.031031 0.973930 0.985577 0.973930 +0.032032 0.986178 0.986178 0.973930 +0.033033 0.745660 0.979352 0.973930 +0.034034 1.057742 0.986178 0.977383 +0.035035 0.996389 0.996389 0.977383 +0.036036 0.977383 0.996389 0.977383 +0.037037 1.071500 1.057742 0.977383 +0.038038 1.157727 1.071500 0.977383 +0.039039 0.960773 1.071500 0.977383 +0.040040 1.118277 1.071500 0.977383 +0.041041 1.179311 1.118277 0.977383 +0.042042 0.926865 0.960773 0.977383 +0.043043 0.937018 1.118277 0.977383 +0.044044 1.207069 1.138309 0.977383 +0.045045 0.909699 0.962463 0.977383 +0.046046 1.173555 0.969569 0.977383 +0.047047 1.138309 1.125357 0.977383 +0.048048 0.962463 0.972615 0.977383 +0.049049 0.969569 0.995367 0.977383 +0.050050 1.125357 0.995367 0.977383 +0.051051 0.972615 0.995367 0.977383 +0.052052 0.995367 1.008585 0.995367 +0.053053 1.079898 1.053996 1.008585 +0.054054 1.053996 1.008585 1.008585 +0.055055 1.008585 1.053996 1.008585 +0.056056 1.135529 1.053996 1.008585 +0.057057 1.001385 1.008585 1.008585 +0.058058 1.075136 1.008585 1.008585 +0.059059 0.842509 1.001385 1.008585 +0.060060 0.976262 0.992040 1.008585 +0.061061 1.033649 0.976262 1.008585 +0.062062 0.992040 0.976262 1.008585 +0.063063 0.945913 0.992040 1.008585 +0.064064 0.861957 1.033649 1.008585 +0.065065 1.171655 1.041811 1.041811 +0.066066 1.041811 1.041811 1.041811 +0.067067 1.152496 1.068648 1.041811 +0.068068 1.068648 1.068648 1.041811 +0.069069 0.941144 1.068648 1.041811 +0.070070 1.131675 1.068648 1.041811 +0.071071 0.916702 0.991457 1.041811 +0.072072 1.077396 0.991457 1.041811 +0.073073 0.919648 1.039777 1.041811 +0.074074 0.991457 1.039777 1.041811 +0.075075 1.149620 1.077396 1.041811 +0.076076 1.039777 1.149620 1.041811 +0.077077 1.333843 1.149620 1.066747 +0.078078 1.180094 1.149620 1.066747 +0.079079 1.175628 1.066747 1.066747 +0.080080 1.066747 1.066747 1.066747 +0.081081 0.894983 1.045508 1.045508 +0.082082 1.032937 1.032937 1.045508 +0.083083 1.045508 0.938610 1.045508 +0.084084 0.765299 0.899866 0.938610 +0.085085 0.938610 0.938610 0.938610 +0.086086 0.783820 0.918244 0.938610 +0.087087 0.899866 0.918244 0.938610 +0.088088 0.953773 0.938610 0.938610 +0.089089 0.918244 0.918244 0.938610 +0.090090 1.018439 0.918244 0.938610 +0.091091 0.960508 0.953773 0.938610 +0.092092 0.833044 0.960508 0.938610 +0.093093 0.905485 1.000357 0.938610 +0.094094 1.000357 1.000357 1.000357 +0.095095 1.115574 1.011220 1.011220 +0.096096 1.187743 1.018121 1.011220 +0.097097 1.011220 1.018121 1.011220 +0.098098 1.018121 1.018121 1.011220 +0.099099 1.127830 1.011220 1.011220 +0.100100 -0.942894 -0.798267 -0.798267 +0.101101 -1.047091 -0.798267 -0.798267 +0.102102 -0.953664 -0.942894 -0.798267 +0.103103 -0.798267 -0.953664 -0.798267 +0.104104 -0.785030 -1.037108 -0.798267 +0.105105 -1.037108 -1.037108 -1.037108 +0.106106 -1.074429 -1.038247 -1.038247 +0.107107 -1.128072 -1.038247 -1.038247 +0.108108 -1.138866 -1.074429 -1.038247 +0.109109 -1.038247 -1.104828 -1.038247 +0.110110 -0.851868 -1.104828 -1.038247 +0.111111 -1.133167 -1.038247 -1.038247 +0.112112 -1.104828 -1.014377 -1.038247 +0.113113 -1.014377 -0.981914 -1.014377 +0.114114 -0.981914 -0.981914 -0.981914 +0.115115 -0.766508 -0.981914 -0.981914 +0.116116 -0.964830 -0.964830 -0.981914 +0.117117 -0.962859 -0.964830 -0.981914 +0.118118 -1.072111 -0.962859 -0.981914 +0.119119 -0.827322 -0.962859 -0.981914 +0.120120 -1.036341 -0.962859 -0.981914 +0.121121 -0.809783 -0.971401 -0.981914 +0.122122 -0.959242 -0.971401 -0.981914 +0.123123 -1.100144 -0.971401 -0.981914 +0.124124 -0.971401 -0.959242 -0.981914 +0.125125 -1.033599 -0.959242 -0.981914 +0.126126 -0.909272 -0.971401 -0.981914 +0.127127 -0.868429 -0.942727 -0.981914 +0.128128 -0.920571 -0.942727 -0.981914 +0.129129 -1.039569 -0.942727 -0.981914 +0.130130 -0.942727 -0.942727 -0.981914 +0.131131 -1.063445 -0.980697 -0.981914 +0.132132 -1.053542 -1.039569 -0.981914 +0.133133 -0.923584 -0.980697 -0.981914 +0.134134 -0.980697 -1.045511 -0.981914 +0.135135 -1.045511 -0.995902 -0.981914 +0.136136 -0.951093 -0.980697 -0.981914 +0.137137 -1.046745 -0.980697 -0.981914 +0.138138 -0.995902 -0.995902 -0.981914 +0.139139 -0.949519 -0.995902 -0.981914 +0.140140 -0.717364 -0.995902 -0.981914 +0.141141 -1.066168 -0.949519 -0.981914 +0.142142 -1.064500 -0.949519 -0.981914 +0.143143 -0.823432 -0.965808 -0.981914 +0.144144 -0.848632 -1.007814 -0.981914 +0.145145 -0.965808 -1.007814 -0.981914 +0.146146 -1.007814 -1.007814 -1.007814 +0.147147 -1.017617 -1.007814 -1.007814 +0.148148 -1.241573 -1.007814 -1.007814 +0.149149 -1.096119 -1.013401 -1.007814 +0.150150 -1.001898 -1.013401 -1.007814 +0.151151 -1.004153 -1.004153 -1.007814 +0.152152 -1.013401 -1.004153 -1.007814 +0.153153 -0.988305 -1.004153 -1.007814 +0.154154 -0.930549 -1.005780 -1.007814 +0.155155 -1.067372 -1.005780 -1.007814 +0.156156 -1.005780 -0.998717 -1.007814 +0.157157 -1.015813 -1.005780 -1.007814 +0.158158 -0.998717 -1.005780 -1.007814 +0.159159 -0.863679 -1.005780 -1.007814 +0.160160 -1.136045 -0.998717 -1.007814 +0.161161 -0.903092 -0.967850 -1.007814 +0.162162 -1.106479 -0.967850 -1.007814 +0.163163 -0.938953 -0.967850 -0.971655 +0.164164 -0.967850 -0.967850 -0.971655 +0.165165 -0.971655 -0.971655 -0.971655 +0.166166 -0.928571 -0.967850 -0.971655 +0.167167 -1.022612 -0.971655 -0.971655 +0.168168 -0.981399 -0.981399 -0.971655 +0.169169 -0.900799 -1.022612 -0.971655 +0.170170 -1.044069 -1.022612 -0.971655 +0.171171 -1.069476 -1.034055 -0.971655 +0.172172 -1.132120 -1.044069 -0.971655 +0.173173 -0.905177 -1.044069 -0.971655 +0.174174 -1.034055 -1.069476 -0.971655 +0.175175 -1.095702 -1.034055 -0.971655 +0.176176 -0.874021 -0.994997 -0.971655 +0.177177 -1.167346 -0.994997 -0.971655 +0.178178 -0.883632 -0.960145 -0.971655 +0.179179 -0.994997 -0.883632 -0.971655 +0.180180 -0.960145 -0.960145 -0.971655 +0.181181 -0.777616 -0.960145 -0.971655 +0.182182 -0.857104 -0.994997 -0.971655 +0.183183 -1.022139 -1.022139 -1.022139 +0.184184 -1.051866 -1.022139 -1.022139 +0.185185 -1.141736 -1.051866 -1.022139 +0.186186 -1.078396 -1.051866 -1.022139 +0.187187 -1.008043 -1.051866 -1.022139 +0.188188 -1.084173 -1.051096 -1.022139 +0.189189 -0.875380 -1.051096 -1.022139 +0.190190 -1.021183 -1.021183 -1.022139 +0.191191 -1.051096 -1.021183 -1.022139 +0.192192 -1.077697 -0.947963 -1.022139 +0.193193 -0.947963 -1.021183 -1.022139 +0.194194 -0.794787 -0.966380 -1.022139 +0.195195 -0.911884 -0.966380 -1.022139 +0.196196 -1.031894 -0.966380 -1.022139 +0.197197 -0.966380 -0.966380 -1.022139 +0.198198 -1.018746 -0.966380 -1.022139 +0.199199 -1.036727 -0.966380 -1.022139 +0.200200 1.006607 0.986276 0.986276 +0.201201 1.054580 0.986276 0.986276 +0.202202 1.007550 0.986276 0.986276 +0.203203 0.986276 1.006607 0.986276 +0.204204 0.954824 1.007550 0.986276 +0.205205 0.852908 0.986276 0.986276 +0.206206 1.065333 0.954824 0.986276 +0.207207 1.068682 0.929528 0.986276 +0.208208 0.830604 0.929528 0.986276 +0.209209 0.929528 1.065333 0.986276 +0.210210 0.926479 1.068682 0.986276 +0.211211 1.075258 1.075258 1.075258 +0.212212 1.130040 1.075258 1.075258 +0.213213 1.077117 1.075258 1.075258 +0.214214 1.103507 1.077117 1.075258 +0.215215 0.933721 1.077455 1.075258 +0.216216 1.064553 1.077117 1.075258 +0.217217 1.083792 1.064553 1.075258 +0.218218 1.077455 1.064553 1.075258 +0.219219 0.970880 1.064553 1.075258 +0.220220 1.029817 1.077455 1.075258 +0.221221 1.099270 1.029817 1.075258 +0.222222 0.850993 0.970880 1.075258 +0.223223 1.167110 0.978298 1.075258 +0.224224 0.853920 0.873921 0.978298 +0.225225 0.873921 0.873921 0.978298 +0.226226 0.978298 0.873921 0.978298 +0.227227 0.808870 0.873921 0.978298 +0.228228 0.987740 0.976703 0.978298 +0.229229 0.749353 0.978298 0.978298 +0.230230 1.032934 0.987740 0.978298 +0.231231 0.976703 0.989241 0.978298 +0.232232 1.032472 0.989241 0.978298 +0.233233 0.989241 0.989241 0.978298 +0.234234 1.014932 0.989241 0.978298 +0.235235 0.935244 1.014148 0.978298 +0.236236 0.986942 1.014148 0.986942 +0.237237 1.060568 1.014148 0.986942 +0.238238 1.014148 0.998139 0.986942 +0.239239 1.045752 1.014148 0.986942 +0.240240 0.933664 1.014148 0.986942 +0.241241 0.998139 0.998139 0.986942 +0.242242 1.121821 0.933664 0.986942 +0.243243 0.731363 0.933664 0.986942 +0.244244 0.876419 0.937800 0.986942 +0.245245 0.836826 0.937800 0.986942 +0.246246 1.106871 0.933816 0.986942 +0.247247 0.937800 0.937800 0.986942 +0.248248 0.964280 0.937800 0.986942 +0.249249 0.933816 0.964280 0.986942 +0.250250 1.267770 0.958790 0.986942 +0.251251 0.806962 0.964280 0.986942 +0.252252 1.038791 1.038791 0.986942 +0.253253 0.958790 1.038791 0.986942 +0.254254 1.096977 0.958790 0.986942 +0.255255 1.169623 1.038791 0.986942 +0.256256 0.876329 0.987048 0.986942 +0.257257 0.914208 0.987048 0.986942 +0.258258 1.116598 0.987048 0.986942 +0.259259 0.987048 0.961421 0.986942 +0.260260 0.879691 0.962462 0.986942 +0.261261 1.110347 0.968402 0.986942 +0.262262 0.961421 0.968402 0.979114 +0.263263 0.962462 0.968402 0.979114 +0.264264 0.968402 0.979114 0.979114 +0.265265 0.979114 0.968402 0.979114 +0.266266 1.032279 0.968402 0.979114 +0.267267 1.017372 0.979114 0.979114 +0.268268 0.945319 0.979114 0.979114 +0.269269 0.944262 1.017372 0.979114 +0.270270 1.138088 0.997787 0.979114 +0.271271 0.886344 0.997787 0.979114 +0.272272 1.040078 0.997787 0.979114 +0.273273 0.997787 0.997787 0.979114 +0.274274 1.121320 0.988147 0.979114 +0.275275 0.973989 0.997787 0.979114 +0.276276 0.988147 0.988147 0.979114 +0.277277 0.918430 0.988147 0.979114 +0.278278 1.056636 0.988147 0.979114 +0.279279 0.933528 0.988147 0.979114 +0.280280 1.053830 1.053830 0.979114 +0.281281 1.055011 1.053830 0.979114 +0.282282 0.907715 1.053830 0.979114 +0.283283 1.195056 1.055011 1.032876 +0.284284 1.032876 1.055011 1.032876 +0.285285 1.105013 1.055517 1.032876 +0.286286 1.055517 1.105013 1.032876 +0.287287 1.007373 1.055517 1.032876 +0.288288 1.116544 1.055517 1.032876 +0.289289 1.164682 1.037840 1.032876 +0.290290 1.037840 1.009883 1.032876 +0.291291 0.987761 1.037840 1.032876 +0.292292 1.009883 1.009883 1.032876 +0.293293 0.939728 1.009883 1.032876 +0.294294 1.081717 0.987761 1.032876 +0.295295 0.953627 0.953627 1.032876 +0.296296 1.085279 0.939728 1.032876 +0.297297 0.936744 0.936744 0.936744 +0.298298 0.897699 0.906055 0.906055 +0.299299 0.906055 0.897699 0.906055 +0.300300 -0.995125 -0.916487 -0.916487 +0.301301 -0.916487 -0.932416 -0.916487 +0.302302 -1.013257 -0.995125 -0.932416 +0.303303 -1.150853 -0.995125 -0.932416 +0.304304 -0.932416 -0.975364 -0.932416 +0.305305 -1.000858 -0.975364 -0.932416 +0.306306 -0.975364 -0.975364 -0.932416 +0.307307 -0.885650 -0.975364 -0.932416 +0.308308 -0.860636 -1.000858 -0.932416 +0.309309 -1.055208 -0.975364 -0.932416 +0.310310 -1.141977 -0.988565 -0.932416 +0.311311 -1.058503 -0.988565 -0.932416 +0.312312 -0.894889 -1.055208 -0.932416 +0.313313 -0.988565 -0.988565 -0.932416 +0.314314 -0.978403 -0.978403 -0.932416 +0.315315 -1.082404 -0.978403 -0.932416 +0.316316 -0.884420 -0.978403 -0.932416 +0.317317 -0.716201 -0.978403 -0.932416 +0.318318 -0.981999 -0.981999 -0.932416 +0.319319 -0.930800 -0.930800 -0.932416 +0.320320 -1.030369 -0.981999 -0.932416 +0.321321 -1.265205 -1.030369 -0.932416 +0.322322 -0.899489 -1.090589 -0.932416 +0.323323 -1.090589 -1.090589 -0.945577 +0.324324 -1.100610 -1.094045 -0.945577 +0.325325 -1.131515 -1.090589 -0.945577 +0.326326 -0.945577 -1.090589 -0.945577 +0.327327 -1.094045 -1.094045 -0.945577 +0.328328 -0.943864 -1.062146 -0.945577 +0.329329 -0.995991 -1.025363 -0.995991 +0.330330 -1.145327 -1.025363 -0.995991 +0.331331 -1.062146 -0.995991 -0.995991 +0.332332 -1.025363 -1.025363 -0.995991 +0.333333 -0.965019 -1.025363 -0.995991 +0.334334 -0.961221 -1.011833 -0.995991 +0.335335 -1.084413 -0.989153 -0.995991 +0.336336 -0.954786 -0.987399 -0.995991 +0.337337 -1.011833 -0.987399 -0.995991 +0.338338 -0.989153 -0.989153 -0.995991 +0.339339 -0.987399 -0.989153 -0.995991 +0.340340 -0.853203 -0.996738 -0.995991 +0.341341 -1.155231 -0.996738 -0.996738 +0.342342 -0.996738 -1.005604 -0.996738 +0.343343 -1.005604 -1.005604 -0.996738 +0.344344 -1.226129 -1.100704 -0.996738 +0.345345 -1.100704 -1.005604 -0.996738 +0.346346 -0.978910 -1.005604 -0.996738 +0.347347 -1.107348 -1.058052 -0.996738 +0.348348 -0.992635 -0.992635 -0.996738 +0.349349 -0.980931 -0.980931 -0.996738 +0.350350 -1.058052 -0.992635 -0.996738 +0.351351 -0.771305 -0.992635 -0.996738 +0.352352 -0.932188 -1.058052 -0.996738 +0.353353 -1.082284 -1.058052 -0.996738 +0.354354 -1.113189 -0.932188 -0.996738 +0.355355 -1.126075 -1.012862 -0.996738 +0.356356 -0.894258 -1.012862 -0.996738 +0.357357 -0.775181 -0.944488 -0.996738 +0.358358 -1.012862 -0.894258 -0.996738 +0.359359 -0.891133 -0.891133 -0.944488 +0.360360 -0.944488 -0.891133 -0.944488 +0.361361 -0.862502 -0.931726 -0.944488 +0.362362 -0.859313 -0.931726 -0.944488 +0.363363 -1.023125 -0.944488 -0.944488 +0.364364 -0.931726 -0.931726 -0.944488 +0.365365 -0.998059 -0.998059 -0.944488 +0.366366 -1.027395 -0.998059 -0.944488 +0.367367 -0.866360 -0.998059 -0.944488 +0.368368 -1.001268 -0.998059 -0.944488 +0.369369 -0.969452 -1.001268 -0.944488 +0.370370 -1.057421 -0.975792 -0.944488 +0.371371 -0.873957 -0.975792 -0.944488 +0.372372 -1.015086 -0.975792 -0.944488 +0.373373 -0.975792 -0.975792 -0.944488 +0.374374 -0.935769 -0.975792 -0.944488 +0.375375 -1.145432 -1.007669 -0.944488 +0.376376 -0.892147 -0.975792 -0.944488 +0.377377 -1.076760 -1.007669 -0.944488 +0.378378 -1.007669 -1.042330 -0.944488 +0.379379 -0.913363 -1.042330 -0.944488 +0.380380 -1.084825 -1.042330 -0.992801 +0.381381 -1.042330 -1.007669 -0.992801 +0.382382 -1.089807 -0.992801 -0.992801 +0.383383 -0.992801 -0.992801 -0.992801 +0.384384 -0.975382 -0.978509 -0.978509 +0.385385 -0.978509 -0.978509 -0.978509 +0.386386 -0.835577 -0.975382 -0.978509 +0.387387 -0.973500 -0.973500 -0.978509 +0.388388 -1.001632 -0.942696 -0.978509 +0.389389 -0.925964 -0.942696 -0.978509 +0.390390 -0.942696 -0.942696 -0.978509 +0.391391 -0.824995 -0.942696 -0.978509 +0.392392 -1.228095 -0.925964 -0.978509 +0.393393 -0.886478 -0.942696 -0.978509 +0.394394 -1.027876 -0.917555 -0.978509 +0.395395 -0.778815 -1.027876 -0.978509 +0.396396 -1.052251 -1.027876 -0.978509 +0.397397 -0.917555 -1.027876 -0.978509 +0.398398 -1.218049 -0.917555 -0.978509 +0.399399 -1.234098 -0.917555 -0.978509 +0.400400 1.033670 0.915335 0.915335 +0.401401 0.915335 0.995140 0.915335 +0.402402 1.079662 0.995140 0.915335 +0.403403 1.016567 0.995140 0.915335 +0.404404 0.995140 0.980236 0.915335 +0.405405 0.833239 0.980236 0.915335 +0.406406 0.827633 0.980236 0.915335 +0.407407 0.980236 0.980236 0.974061 +0.408408 0.974061 0.974061 0.974061 +0.409409 1.036462 0.980236 0.974061 +0.410410 1.013655 1.012310 0.974061 +0.411411 0.967479 1.013655 0.974061 +0.412412 1.012310 1.036462 1.012310 +0.413413 1.114161 1.013655 1.012310 +0.414414 1.084870 1.084870 1.012310 +0.415415 1.143169 1.084870 1.012310 +0.416416 0.928768 1.084870 1.012310 +0.417417 1.152667 0.990423 1.012310 +0.418418 0.990423 0.990423 0.994635 +0.419419 0.990405 0.990423 0.994635 +0.420420 0.900778 0.990423 0.994635 +0.421421 0.994635 0.990405 0.994635 +0.422422 1.081658 0.990405 0.994635 +0.423423 0.982925 0.982925 0.994635 +0.424424 0.969630 0.994635 0.994635 +0.425425 1.038684 0.998721 0.994635 +0.426426 0.952673 0.998721 0.994635 +0.427427 1.042233 1.038684 0.998721 +0.428428 0.998721 1.042233 0.998721 +0.429429 1.067383 1.045432 1.045432 +0.430430 1.053154 1.045432 1.045432 +0.431431 1.108807 1.045432 1.045432 +0.432432 1.045432 1.053154 1.045432 +0.433433 1.014645 1.045432 1.045432 +0.434434 0.985161 1.026470 1.045432 +0.435435 1.116414 1.014645 1.045432 +0.436436 1.026470 0.985161 1.026470 +0.437437 0.898915 0.983648 0.983648 +0.438438 0.983648 0.972407 0.983648 +0.439439 0.972407 0.972407 0.974419 +0.440440 0.938105 0.972407 0.974419 +0.441441 0.908041 0.974419 0.974419 +0.442442 0.974419 0.974419 0.974419 +0.443443 1.009199 0.974419 0.974419 +0.444444 1.081841 0.974419 0.974419 +0.445445 1.104344 0.974419 0.974419 +0.446446 0.817090 1.009199 0.974419 +0.447447 0.945641 1.024809 0.974419 +0.448448 0.944475 0.945641 0.974419 +0.449449 1.024809 0.945641 0.974419 +0.450450 1.088122 1.024809 0.974419 +0.451451 0.930830 1.088122 0.974419 +0.452452 1.190865 1.088122 0.974419 +0.453453 1.119551 1.088122 0.974419 +0.454454 1.173042 1.037794 0.974419 +0.455455 0.906440 1.037794 0.974419 +0.456456 1.037794 1.037794 0.974419 +0.457457 0.985984 0.985984 0.974419 +0.458458 0.911667 0.985984 0.974419 +0.459459 1.156843 0.985984 0.974419 +0.460460 0.918847 0.985984 0.974419 +0.461461 1.248386 0.918847 0.974419 +0.462462 0.880343 0.918847 0.974419 +0.463463 1.070315 0.918847 0.974419 +0.464464 0.899536 0.927855 0.945224 +0.465465 0.816511 0.899536 0.945224 +0.466466 0.927855 0.927855 0.945224 +0.467467 0.945224 0.921068 0.945224 +0.468468 0.882944 0.927855 0.945224 +0.469469 1.243633 0.945224 0.945224 +0.470470 0.921068 1.035685 0.945224 +0.471471 1.105427 1.073244 1.035685 +0.472472 1.035685 1.073244 1.035685 +0.473473 1.114231 1.035685 1.035685 +0.474474 1.073244 1.035685 1.035685 +0.475475 0.944953 1.035685 1.035685 +0.476476 0.836672 0.944953 1.035685 +0.477477 0.896687 0.944953 1.035685 +0.478478 1.078094 0.944953 1.035685 +0.479479 0.879165 0.970868 1.035685 +0.480480 1.061934 1.010889 1.035685 +0.481481 0.970868 1.010889 1.035685 +0.482482 1.010889 0.995403 1.035685 +0.483483 1.095526 0.995403 1.035685 +0.484484 0.995403 0.995403 1.017179 +0.485485 0.943299 0.995403 1.017179 +0.486486 0.952845 0.952845 1.017179 +0.487487 1.017179 0.952356 1.017179 +0.488488 0.952356 0.943299 0.952356 +0.489489 0.922158 0.952356 0.952356 +0.490490 0.924796 0.924796 0.952356 +0.491491 0.902148 0.924796 0.952356 +0.492492 1.116699 0.924796 0.952356 +0.493493 0.886781 1.032454 0.952356 +0.494494 1.056146 1.032454 1.012846 +0.495495 1.032454 1.056146 1.012846 +0.496496 1.128205 1.037536 1.012846 +0.497497 1.012846 1.037536 1.012846 +0.498498 1.092972 1.032454 1.012846 +0.499499 1.037536 1.012846 1.012846 +0.500501 -1.001848 -0.922699 -0.922699 +0.501502 -0.987462 -0.987462 -0.922699 +0.502503 -1.038674 -0.996367 -0.922699 +0.503504 -0.922699 -0.996367 -0.922699 +0.504505 -1.129106 -0.987462 -0.922699 +0.505506 -0.996367 -0.996367 -0.922699 +0.506507 -0.740711 -0.978921 -0.922699 +0.507508 -0.978921 -0.996367 -0.922699 +0.508509 -1.099845 -0.996367 -0.922699 +0.509510 -0.922510 -0.978921 -0.922699 +0.510511 -1.037193 -0.978921 -0.933620 +0.511512 -1.012562 -1.012562 -0.933620 +0.512513 -0.964857 -0.965026 -0.933620 +0.513514 -0.933620 -1.012562 -0.933620 +0.514515 -1.091809 -1.009397 -0.965026 +0.515516 -0.965026 -1.009397 -0.965026 +0.516517 -1.088903 -1.041278 -1.009397 +0.517518 -1.009397 -1.075060 -1.009397 +0.518519 -1.041278 -1.041278 -1.009397 +0.519520 -1.120630 -1.041278 -1.009397 +0.520521 -1.075060 -1.041278 -1.009397 +0.521522 -0.931622 -1.075060 -1.009397 +0.522523 -0.924344 -1.075060 -1.009397 +0.523524 -1.089267 -1.057970 -1.012578 +0.524525 -1.098603 -1.012578 -1.012578 +0.525526 -1.012578 -1.012578 -1.012578 +0.526527 -1.057970 -1.012578 -1.012578 +0.527528 -0.925645 -1.012578 -1.012578 +0.528529 -0.900765 -0.969156 -1.012578 +0.529530 -0.969156 -0.946823 -1.012578 +0.530531 -1.123824 -0.925645 -1.012578 +0.531532 -0.805045 -0.946823 -1.012578 +0.532533 -0.946823 -0.969156 -1.012578 +0.533534 -0.887435 -0.951774 -1.012578 +0.534535 -1.126562 -0.951774 -1.012578 +0.535536 -1.099649 -0.951774 -1.012578 +0.536537 -0.951774 -0.951774 -0.988341 +0.537538 -0.988341 -0.988341 -0.988341 +0.538539 -0.896448 -0.951774 -0.988341 +0.539540 -0.817105 -0.951774 -0.988341 +0.540541 -1.103667 -0.960359 -0.988341 +0.541542 -0.857447 -0.960359 -0.988341 +0.542543 -0.960359 -0.960359 -0.988341 +0.543544 -0.985688 -0.960359 -0.988341 +0.544545 -1.091140 -0.857447 -0.988341 +0.545546 -0.837472 -0.960359 -0.988341 +0.546547 -0.809949 -0.960556 -0.988341 +0.547548 -0.815240 -0.960556 -0.988341 +0.548549 -1.008858 -0.960556 -0.988341 +0.549550 -0.960556 -1.008858 -0.988341 +0.550551 -1.103693 -1.008858 -0.988341 +0.551552 -1.071774 -1.018721 -0.988341 +0.552553 -1.018721 -1.054117 -0.988341 +0.553554 -0.779820 -1.054117 -0.988341 +0.554555 -1.054117 -1.054117 -1.029304 +0.555556 -1.096938 -1.054117 -1.029304 +0.556557 -1.029304 -1.054117 -1.029304 +0.557558 -1.057701 -1.054117 -1.029304 +0.558559 -1.058982 -1.029304 -1.029304 +0.559560 -0.983257 -1.029304 -1.029304 +0.560561 -0.934961 -0.983257 -1.029304 +0.561562 -0.845732 -0.981656 -1.029304 +0.562563 -1.114829 -0.934961 -1.029304 +0.563564 -0.903578 -0.934961 -1.029304 +0.564565 -0.981656 -0.981656 -1.029304 +0.565566 -0.885808 -0.984766 -1.029304 +0.566567 -1.094164 -0.984766 -1.029304 +0.567568 -0.984766 -0.992331 -1.029304 +0.568569 -0.992331 -0.992331 -1.029304 +0.569570 -1.108422 -1.008850 -1.029304 +0.570571 -1.008850 -0.992331 -1.029304 +0.571572 -0.947116 -0.992331 -1.029304 +0.572573 -1.044118 -1.001552 -1.029304 +0.573574 -0.922465 -1.001552 -1.029304 +0.574575 -0.962390 -1.000724 -1.029304 +0.575576 -1.001552 -1.000724 -1.029304 +0.576577 -1.032196 -1.000724 -1.029304 +0.577578 -1.000724 -1.001552 -1.029304 +0.578579 -0.969995 -1.001552 -1.029304 +0.579580 -1.090725 -1.030514 -1.029304 +0.580581 -1.061230 -1.030514 -1.029304 +0.581582 -0.991319 -1.030514 -1.029304 +0.582583 -1.030514 -1.030514 -1.029304 +0.583584 -1.066191 -1.030514 -1.029304 +0.584585 -0.954107 -0.991319 -1.029304 +0.585586 -0.779156 -0.969716 -1.029304 +0.586587 -1.069758 -0.954107 -1.029304 +0.587588 -0.969716 -0.954107 -1.002956 +0.588589 -0.743242 -0.969716 -1.002956 +0.589590 -0.951760 -1.002956 -1.002956 +0.590591 -1.002956 -1.002956 -1.002956 +0.591592 -1.085492 -1.085492 -1.085492 +0.592593 -1.089551 -1.085492 -1.085492 +0.593594 -1.086053 -1.085492 -1.085492 +0.594595 -1.110056 -1.085492 -1.085492 +0.595596 -1.021996 -1.072438 -1.072438 +0.596597 -1.072438 -1.072438 -1.072438 +0.597598 -1.043094 -1.043094 -1.072438 +0.598599 -0.901986 -1.021996 -1.072438 +0.599600 -1.128909 -0.901986 -1.072438 +0.600601 0.970657 0.892529 0.892529 +0.601602 0.892529 0.920892 0.892529 +0.602603 0.920892 0.970657 0.920892 +0.603604 1.095492 0.970657 0.944694 +0.604605 1.066045 0.944694 0.944694 +0.605606 1.140103 0.944694 0.944694 +0.606607 0.944694 0.944694 0.944694 +0.607608 0.864106 0.944694 0.944694 +0.608609 0.781177 0.944694 0.944694 +0.609610 0.779575 0.944694 0.944694 +0.610611 0.947531 0.947531 0.947531 +0.611612 1.066546 0.950324 0.950324 +0.612613 0.950324 0.981624 0.950324 +0.613614 1.079367 0.981624 0.950324 +0.614615 0.981624 1.027965 0.950324 +0.615616 1.098933 1.027965 0.950324 +0.616617 0.920009 1.069023 0.950324 +0.617618 1.027965 1.027965 0.978972 +0.618619 1.069023 1.027965 0.978972 +0.619620 1.155675 1.027203 0.978972 +0.620621 0.978972 1.027203 0.978972 +0.621622 1.006711 1.009979 1.006711 +0.622623 1.027203 1.007877 1.006711 +0.623624 1.009979 1.006711 1.006711 +0.624625 1.007877 1.006711 1.006711 +0.625626 1.000107 1.007877 1.006711 +0.626627 0.816269 1.007877 1.006711 +0.627628 0.833719 1.007877 1.006711 +0.628629 1.112972 1.006380 1.006711 +0.629630 1.046157 1.006380 1.006711 +0.630631 1.117500 1.006380 1.006711 +0.631632 1.006380 1.046157 1.006711 +0.632633 0.840640 1.046157 1.006711 +0.633634 0.905722 1.006380 1.006711 +0.634635 1.148664 1.006380 1.006711 +0.635636 1.129631 0.991007 1.006711 +0.636637 0.991007 0.991007 1.006711 +0.637638 1.117614 0.991007 1.006711 +0.638639 0.822380 0.991007 1.006711 +0.639640 0.989991 0.989991 1.006711 +0.640641 0.806354 0.989991 1.006711 +0.641642 1.025584 0.989991 1.006711 +0.642643 0.980950 1.025584 1.006711 +0.643644 1.071078 1.025584 1.008575 +0.644645 1.046765 1.025584 1.008575 +0.645646 1.074255 1.033308 1.008575 +0.646647 1.008575 1.033308 1.008575 +0.647648 0.942786 1.033308 1.008575 +0.648649 1.033308 1.019651 1.008575 +0.649650 1.001322 1.008575 1.008575 +0.650651 1.076166 1.019651 1.008575 +0.651652 1.019651 1.033308 1.008575 +0.652653 0.883037 1.053398 1.008575 +0.653654 1.079249 1.053398 1.008575 +0.654655 1.053398 1.053398 1.008575 +0.655656 1.080504 1.053398 1.008575 +0.656657 0.952499 1.053398 1.008575 +0.657658 1.167163 0.989525 1.008575 +0.658659 0.989525 0.952976 0.989525 +0.659660 0.880931 0.952499 0.952976 +0.660661 0.952976 0.952976 0.952976 +0.661662 0.769248 0.952976 0.952976 +0.662663 0.734106 0.952976 0.952976 +0.663664 1.186583 0.952976 0.952976 +0.664665 0.985570 0.913157 0.952976 +0.665666 1.092416 0.985570 0.952976 +0.666667 0.913157 0.985570 0.952976 +0.667668 0.897221 0.985570 0.952976 +0.668669 1.006310 1.006310 0.970026 +0.669670 0.970026 0.970026 0.970026 +0.670671 1.023602 0.970026 0.970026 +0.671672 1.147413 1.006310 0.970026 +0.672673 0.874538 0.977717 0.970026 +0.673674 0.862297 0.989969 0.970026 +0.674675 1.182952 0.977717 0.970026 +0.675676 0.977717 0.977717 0.970026 +0.676677 0.989969 0.989969 0.970026 +0.677678 0.869557 0.989969 0.970026 +0.678679 1.046425 0.989969 0.970026 +0.679680 1.005145 0.989969 0.970026 +0.680681 0.894338 0.970871 0.970026 +0.681682 1.086951 0.970871 0.970026 +0.682683 0.948711 0.970871 0.970026 +0.683684 0.970871 0.948711 0.970026 +0.684685 0.933560 0.948711 0.970026 +0.685686 1.109971 0.948711 0.970026 +0.686687 0.814965 0.941825 0.970026 +0.687688 0.941825 0.941825 0.970026 +0.688689 1.064734 1.014226 0.970026 +0.689690 0.833250 1.014226 0.970026 +0.690691 1.014226 1.014226 0.970026 +0.691692 1.048965 1.014226 0.970026 +0.692693 1.155149 0.981877 0.970026 +0.693694 0.875025 0.981877 0.970026 +0.694695 0.981877 0.981877 0.970026 +0.695696 0.957818 0.981877 0.970026 +0.696697 0.911143 0.957818 0.970026 +0.697698 1.059730 0.957818 0.970026 +0.698699 1.006925 0.939637 0.970026 +0.699700 0.939637 0.911143 0.939637 +0.700701 -0.911019 -0.906186 -0.906186 +0.701702 -0.906186 -0.911019 -0.906186 +0.702703 -1.110617 -0.913814 -0.913814 +0.703704 -0.913814 -0.993275 -0.913814 +0.704705 -0.993275 -0.993275 -0.913814 +0.705706 -1.192603 -1.046887 -0.913814 +0.706707 -1.108023 -1.046887 -0.913814 +0.707708 -0.911053 -1.047154 -0.913814 +0.708709 -1.046887 -1.047154 -0.927873 +0.709710 -1.062364 -1.047154 -0.927873 +0.710711 -1.047154 -1.046887 -0.927873 +0.711712 -0.927873 -1.047154 -0.927873 +0.712713 -1.166649 -1.062364 -0.971158 +0.713714 -0.971158 -1.047154 -0.971158 +0.714715 -1.143378 -1.087565 -0.971158 +0.715716 -1.107369 -1.087565 -0.971158 +0.716717 -0.820283 -1.087565 -0.971158 +0.717718 -1.087565 -1.087565 -1.017027 +0.718719 -1.017027 -1.059867 -1.017027 +0.719720 -1.136362 -1.017027 -1.017027 +0.720721 -1.059867 -1.059867 -1.017027 +0.721722 -0.925779 -1.059867 -1.017027 +0.722723 -1.006464 -1.068214 -1.017027 +0.723724 -1.126647 -1.059867 -1.017027 +0.724725 -1.068214 -1.006464 -1.017027 +0.725726 -1.085730 -1.068214 -1.017027 +0.726727 -0.837002 -1.068214 -1.017027 +0.727728 -0.735864 -0.984632 -1.017027 +0.728729 -1.153167 -0.984632 -1.017027 +0.729730 -0.984632 -0.914208 -1.017027 +0.730731 -0.862189 -0.978263 -1.017027 +0.731732 -1.090935 -0.978263 -1.017027 +0.732733 -0.914208 -0.978263 -1.017027 +0.733734 -0.978263 -0.952004 -1.017027 +0.734735 -0.951601 -0.978263 -1.017027 +0.735736 -1.224286 -0.952004 -1.017027 +0.736737 -0.952004 -0.952004 -1.017027 +0.737738 -1.055500 -0.952004 -1.017027 +0.738739 -0.929464 -0.955044 -1.017027 +0.739740 -0.822103 -0.955044 -1.017027 +0.740741 -0.955044 -1.045408 -1.017027 +0.741742 -1.165534 -1.026513 -1.026513 +0.742743 -1.045408 -1.045408 -1.026513 +0.743744 -1.056825 -1.045408 -1.026513 +0.744745 -1.026513 -1.045408 -1.026513 +0.745746 -1.101514 -1.045408 -1.026513 +0.746747 -0.986148 -1.035299 -1.026513 +0.747748 -1.035299 -1.026513 -1.026513 +0.748749 -1.079721 -1.007938 -1.026513 +0.749750 -0.876128 -1.007938 -1.026513 +0.750751 -0.873911 -1.007938 -1.026513 +0.751752 -1.007938 -1.007938 -1.026513 +0.752753 -1.032951 -1.007938 -1.026513 +0.753754 -0.869400 -1.014131 -1.026513 +0.754755 -1.083610 -1.032951 -1.026513 +0.755756 -1.069374 -1.032951 -1.026513 +0.756757 -1.014131 -1.014131 -1.026513 +0.757758 -1.081904 -1.014131 -1.026513 +0.758759 -0.918121 -0.996725 -0.996725 +0.759760 -0.959004 -0.996725 -0.996725 +0.760761 -0.996725 -0.996725 -0.996725 +0.761762 -0.776560 -0.975081 -0.996725 +0.762763 -1.084557 -0.996725 -0.996725 +0.763764 -1.034342 -1.026880 -0.996725 +0.764765 -0.975081 -1.026880 -0.996725 +0.765766 -1.137779 -1.034342 -0.996725 +0.766767 -1.026880 -1.026880 -0.996725 +0.767768 -0.960985 -1.026880 -0.996725 +0.768769 -1.048023 -1.026880 -0.996725 +0.769770 -1.007062 -1.007062 -0.996725 +0.770771 -1.047944 -0.960985 -0.996725 +0.771772 -0.944100 -0.944100 -0.944100 +0.772773 -0.914600 -0.944100 -0.944100 +0.773774 -0.924960 -0.944100 -0.944100 +0.774775 -0.856741 -0.944100 -0.944100 +0.775776 -0.981180 -0.924960 -0.944100 +0.776777 -0.984263 -0.981180 -0.944100 +0.777778 -1.059917 -0.981180 -0.944100 +0.778779 -0.869323 -0.984263 -0.944100 +0.779780 -1.037951 -0.984263 -0.944100 +0.780781 -0.890921 -0.939045 -0.944100 +0.781782 -1.062185 -0.939045 -0.944100 +0.782783 -0.911323 -0.978142 -0.944100 +0.783784 -0.939045 -0.978142 -0.944100 +0.784785 -1.063107 -1.011504 -0.978142 +0.785786 -0.978142 -1.011504 -0.978142 +0.786787 -1.011504 -1.011504 -0.978142 +0.787788 -1.017804 -1.017804 -0.978142 +0.788789 -1.117121 -1.011504 -0.978142 +0.789790 -0.940740 -1.017804 -0.978142 +0.790791 -1.113807 -1.017804 -0.978142 +0.791792 -0.901391 -1.058149 -0.978142 +0.792793 -1.106908 -0.974865 -0.978142 +0.793794 -0.876389 -1.058149 -0.978142 +0.794795 -1.058149 -0.974865 -0.978142 +0.795796 -0.974865 -0.974865 -0.978142 +0.796797 -1.189802 -0.974865 -0.978142 +0.797798 -0.912651 -0.974865 -0.978142 +0.798799 -0.879006 -0.912651 -0.978142 +0.799800 -0.985442 -0.879006 -0.978142 +0.800801 1.023632 0.843021 0.843021 +0.801802 0.995685 0.949317 0.843021 +0.802803 1.018838 0.995685 0.843021 +0.803804 0.843021 1.018838 0.843021 +0.804805 0.949317 1.018838 0.949317 +0.805806 1.048800 1.018838 0.949317 +0.806807 1.136285 0.958832 0.949317 +0.807808 1.032274 1.032274 0.949317 +0.808809 0.862087 1.048800 0.949317 +0.809810 0.958832 1.032274 0.958832 +0.810811 1.079200 1.032274 0.967741 +0.811812 1.112963 1.031519 0.967741 +0.812813 0.967741 1.065816 0.967741 +0.813814 1.183002 1.065816 0.996525 +0.814815 1.031519 1.031519 0.996525 +0.815816 1.065816 1.023044 0.996525 +0.816817 0.996525 1.031519 0.996525 +0.817818 0.974504 1.023044 0.996525 +0.818819 1.023044 1.023044 0.996525 +0.819820 1.120328 1.023044 0.996525 +0.820821 0.996234 1.023044 0.996525 +0.821822 1.070633 1.060572 0.996525 +0.822823 1.134608 1.060572 0.996525 +0.823824 0.798514 1.060572 0.996525 +0.824825 1.060572 1.070633 0.996525 +0.825826 0.977756 1.060572 0.996525 +0.826827 1.078943 0.994731 0.996525 +0.827828 1.164112 1.003613 0.996525 +0.828829 0.994731 1.003613 0.996525 +0.829830 0.949198 1.003613 0.996525 +0.830831 1.003613 1.000293 0.996525 +0.831832 1.056715 1.000293 0.996525 +0.832833 0.848661 1.003613 0.996525 +0.833834 1.000293 1.003613 0.996525 +0.834835 1.079153 1.019520 0.996525 +0.835836 1.020737 1.019520 0.996525 +0.836837 0.888400 1.019520 0.996525 +0.837838 1.019520 1.020737 0.996525 +0.838839 1.081925 1.019520 0.996525 +0.839840 0.932174 1.005562 0.996525 +0.840841 1.106511 1.005562 0.996525 +0.841842 0.940557 0.996572 0.996525 +0.842843 1.005562 0.981819 0.996525 +0.843844 0.926743 0.981819 0.996525 +0.844845 0.996572 0.981819 0.996525 +0.845846 0.981819 0.981819 0.996525 +0.846847 0.950211 0.950211 0.996525 +0.847848 1.015902 0.981819 0.996525 +0.848849 0.893365 0.981819 0.996525 +0.849850 0.833039 0.971493 0.996525 +0.850851 1.147515 1.015902 0.996525 +0.851852 1.047047 1.047047 0.996525 +0.852853 0.971493 1.047047 0.996525 +0.853854 1.070280 1.047047 0.996525 +0.854855 1.069243 1.041830 0.996525 +0.855856 0.899169 0.971493 0.996525 +0.856857 1.041830 0.989923 0.996525 +0.857858 0.871786 0.971376 0.989923 +0.858859 0.971376 0.971376 0.989923 +0.859860 0.989923 0.980163 0.989923 +0.860861 0.912046 0.971376 0.989923 +0.861862 1.119451 0.971376 0.989923 +0.862863 0.980163 0.980163 0.989923 +0.863864 0.887588 0.923543 0.989923 +0.864865 0.923543 0.923543 0.989923 +0.865866 1.054477 0.923543 0.989923 +0.866867 0.783186 0.923543 0.989923 +0.867868 0.902512 0.985315 0.989923 +0.868869 1.102924 0.985315 0.989923 +0.869870 1.098880 0.963032 0.989923 +0.870871 0.985315 0.963032 0.985315 +0.871872 0.948365 0.985315 0.985315 +0.872873 0.963032 0.985315 0.985315 +0.873874 0.826784 0.985315 0.985315 +0.874875 0.989051 0.989051 0.989051 +0.875876 1.078874 0.989051 0.989051 +0.876877 1.013207 1.013207 0.989051 +0.877878 1.046607 1.013207 0.989051 +0.878879 0.981190 1.013207 0.989051 +0.879880 1.056491 1.013207 0.989051 +0.880881 0.984530 0.984530 0.989051 +0.881882 0.939341 0.981190 0.989051 +0.882883 1.109094 0.961929 0.989051 +0.883884 0.961929 0.961929 0.989051 +0.884885 0.785377 0.947221 0.989051 +0.885886 0.923587 0.961929 0.989051 +0.886887 1.015101 0.961929 0.989051 +0.887888 0.947221 0.972248 0.989051 +0.888889 1.087944 1.015101 0.989051 +0.889890 0.972248 1.025127 0.989051 +0.890891 1.025127 1.068689 1.025127 +0.891892 1.068689 1.068689 1.025127 +0.892893 1.155018 1.068340 1.025127 +0.893894 1.100955 1.068340 1.025127 +0.894895 0.994063 1.068340 1.025127 +0.895896 1.068340 1.055374 1.025127 +0.896897 1.055374 1.020238 1.025127 +0.897898 1.020238 0.994063 1.020238 +0.898899 0.989032 0.989032 0.989032 +0.899900 0.953212 0.953212 0.953212 +0.900901 -1.007789 -1.007789 -1.007789 +0.901902 -1.176085 -1.094983 -1.094983 +0.902903 -1.164879 -1.094983 -1.094983 +0.903904 -1.164542 -1.094983 -1.094983 +0.904905 -1.094983 -1.124927 -1.094983 +0.905906 -1.006529 -1.094983 -1.094983 +0.906907 -0.968188 -1.067852 -1.094983 +0.907908 -1.124927 -1.067852 -1.094983 +0.908909 -1.067852 -1.037228 -1.094983 +0.909910 -1.037228 -1.037228 -1.094983 +0.910911 -1.103390 -1.037228 -1.094983 +0.911912 -0.945288 -0.967433 -0.967433 +0.912913 -0.967433 -0.967433 -0.967433 +0.913914 -0.806734 -0.967433 -0.967433 +0.914915 -0.901846 -0.945288 -0.967433 +0.915916 -1.042688 -0.967433 -0.967433 +0.916917 -1.066534 -1.042688 -0.967433 +0.917918 -0.921212 -1.063397 -0.967433 +0.918919 -1.170383 -1.063397 -0.967433 +0.919920 -1.072656 -1.063397 -0.967433 +0.920921 -1.063397 -1.034496 -0.967433 +0.921922 -0.938396 -1.034496 -0.967433 +0.922923 -0.914668 -1.017289 -0.967433 +0.923924 -1.034496 -0.964569 -0.967433 +0.924925 -1.017289 -0.964569 -0.967433 +0.925926 -0.849914 -1.017289 -0.967433 +0.926927 -0.964569 -1.017289 -0.967433 +0.927928 -1.046299 -0.976907 -0.967433 +0.928929 -1.158337 -0.976907 -0.967433 +0.929930 -0.976907 -0.977310 -0.967433 +0.930931 -0.846939 -0.977310 -0.967433 +0.931932 -1.015479 -0.977310 -0.967433 +0.932933 -0.977310 -0.977310 -0.967433 +0.933934 -0.943085 -0.977310 -0.967433 +0.934935 -0.979259 -0.977310 -0.967433 +0.935936 -1.096315 -0.977310 -0.967433 +0.936937 -0.832212 -0.979259 -0.967433 +0.937938 -0.953367 -0.979259 -0.967433 +0.938939 -1.112492 -0.953367 -0.967433 +0.939940 -1.157141 -0.926518 -0.967433 +0.940941 -0.926518 -0.953367 -0.967433 +0.941942 -0.845823 -0.926518 -0.967433 +0.942943 -0.884902 -0.926518 -0.967433 +0.943944 -0.978584 -0.884902 -0.967433 +0.944945 -0.847677 -0.884902 -0.967433 +0.945946 -1.016207 -0.950823 -0.967433 +0.946947 -0.852127 -0.978584 -0.967433 +0.947948 -0.950823 -1.016207 -0.967433 +0.948949 -1.146084 -1.033939 -1.033939 +0.949950 -1.033939 -1.033939 -1.033939 +0.950951 -1.117612 -1.033939 -1.033939 +0.951952 -1.078361 -1.033939 -1.033939 +0.952953 -0.975721 -0.997481 -0.997481 +0.953954 -0.884575 -0.997481 -0.997481 +0.954955 -0.911318 -0.975721 -0.997481 +0.955956 -0.997481 -0.943935 -0.997481 +0.956957 -1.079103 -0.924027 -0.997481 +0.957958 -0.943935 -0.943935 -0.997481 +0.958959 -0.880973 -0.997481 -0.997481 +0.959960 -0.924027 -1.059478 -0.997481 +0.960961 -1.073152 -1.059478 -1.059478 +0.961962 -1.124449 -1.059478 -1.059478 +0.962963 -1.059478 -1.059478 -1.059478 +0.963964 -1.236161 -1.059478 -1.059478 +0.964965 -0.958308 -1.059478 -1.059478 +0.965966 -0.873004 -1.059478 -1.059478 +0.966967 -0.943995 -1.013754 -1.059478 +0.967968 -1.082743 -1.013754 -1.059478 +0.968969 -1.067188 -1.030715 -1.059478 +0.969970 -1.013754 -1.030715 -1.044710 +0.970971 -1.030715 -1.044710 -1.044710 +0.971972 -1.044710 -1.030715 -1.044710 +0.972973 -0.956291 -1.030715 -1.044710 +0.973974 -1.140589 -1.044710 -1.044710 +0.974975 -1.012261 -1.044710 -1.044710 +0.975976 -1.066830 -1.012261 -1.044710 +0.976977 -1.217543 -1.026077 -1.044710 +0.977978 -0.944184 -1.012261 -1.026077 +0.978979 -0.911439 -0.978617 -1.026077 +0.979980 -1.026077 -0.978617 -1.026077 +0.980981 -0.839689 -0.978617 -1.026077 +0.981982 -0.978617 -0.978617 -1.026077 +0.982983 -0.981761 -0.978617 -1.026077 +0.983984 -1.044297 -0.978617 -1.026077 +0.984985 -0.965432 -0.981761 -1.026077 +0.985986 -0.892152 -1.044297 -1.026077 +0.986987 -1.051986 -1.044297 -1.026077 +0.987988 -1.101437 -0.984559 -1.026077 +0.988989 -1.134384 -1.035690 -1.026077 +0.989990 -0.837896 -1.035690 -1.026077 +0.990991 -0.984559 -1.008052 -1.026077 +0.991992 -1.035690 -0.984559 -1.026077 +0.992993 -1.008052 -0.951003 -1.008052 +0.993994 -0.951003 -0.984559 -1.008052 +0.994995 -0.896396 -0.951003 -1.008052 +0.995996 -0.939782 -0.951003 -1.008052 +0.996997 -1.069954 -0.951003 -1.008052 +0.997998 -0.868794 -0.978381 -1.008052 +0.998999 -0.978381 -1.061624 -1.008052 +1.000000 -1.061624 -1.061624 -1.061624 diff -Nru gsl-2.4+dfsg/doc/examples/gaussfilt2.c gsl-2.5+dfsg/doc/examples/gaussfilt2.c --- gsl-2.4+dfsg/doc/examples/gaussfilt2.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/gaussfilt2.c 2018-05-11 20:25:45.000000000 +0000 @@ -0,0 +1,71 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 1000; /* length of time series */ + const size_t K = 61; /* window size */ + const double alpha = 3.0; /* Gaussian kernel has +/- 3 standard deviations */ + gsl_vector *x = gsl_vector_alloc(N); /* input vector */ + gsl_vector *y = gsl_vector_alloc(N); /* filtered output vector */ + gsl_vector *dy = gsl_vector_alloc(N); /* first derivative filtered vector */ + gsl_vector *d2y = gsl_vector_alloc(N); /* second derivative filtered vector */ + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + gsl_filter_gaussian_workspace *gauss_p = gsl_filter_gaussian_alloc(K); + size_t i; + + /* generate input signal */ + for (i = 0; i < N; ++i) + { + double xi = (i > N / 2) ? 0.5 : 0.0; + double ei = gsl_ran_gaussian(r, 0.1); + + gsl_vector_set(x, i, xi + ei); + } + + /* apply filters */ + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha, 0, x, y, gauss_p); + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha, 1, x, dy, gauss_p); + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha, 2, x, d2y, gauss_p); + + /* print results */ + for (i = 0; i < N; ++i) + { + double xi = gsl_vector_get(x, i); + double yi = gsl_vector_get(y, i); + double dyi = gsl_vector_get(dy, i); + double d2yi = gsl_vector_get(d2y, i); + double dxi; + + /* compute finite difference of x vector */ + if (i == 0) + dxi = gsl_vector_get(x, i + 1) - xi; + else if (i == N - 1) + dxi = gsl_vector_get(x, i) - gsl_vector_get(x, i - 1); + else + dxi = 0.5 * (gsl_vector_get(x, i + 1) - gsl_vector_get(x, i - 1)); + + printf("%.12e %.12e %.12e %.12e %.12e\n", + xi, + yi, + dxi, + dyi, + d2yi); + } + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(dy); + gsl_vector_free(d2y); + gsl_rng_free(r); + gsl_filter_gaussian_free(gauss_p); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/gaussfilt2.txt gsl-2.5+dfsg/doc/examples/gaussfilt2.txt --- gsl-2.4+dfsg/doc/examples/gaussfilt2.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/gaussfilt2.txt 2018-05-12 23:44:02.000000000 +0000 @@ -0,0 +1,1000 @@ +1.339186081187e-02 1.871557820404e-03 -2.220195999501e-02 -1.573169611469e-03 -8.780933065889e-05 +-8.810099183144e-03 2.415680115678e-04 7.702448990675e-02 -1.653816610174e-03 -7.005130799944e-05 +1.674408406254e-01 -1.454282712577e-03 4.108710495620e-02 -1.713695984914e-03 -4.919451563066e-05 +7.336411072926e-02 -3.306034888695e-03 -3.384418873259e-02 -1.783635876377e-03 -3.472562516214e-05 +9.975246316020e-02 -5.081926575132e-03 -1.005571594148e-01 -1.797742614170e-03 -9.791367133915e-06 +-1.277502081003e-01 -6.886517573974e-03 -1.697119957168e-01 -1.794540678705e-03 1.394740395800e-05 +-2.396715282733e-01 -8.684487585528e-03 2.991109581368e-02 -1.770188198653e-03 3.677209095397e-05 +-6.792801647292e-02 -1.040504637514e-02 1.178811982150e-01 -1.710981218632e-03 6.179293643257e-05 +-3.909131843359e-03 -1.201573660787e-02 7.864178551250e-02 -1.615736647016e-03 8.884204822403e-05 +8.935555455208e-02 -1.360525848411e-02 1.072176192190e-03 -1.520044775751e-03 1.081313502520e-04 +-1.764779458978e-03 -1.501991219708e-02 -1.095056227149e-01 -1.385387202482e-03 1.303213239924e-04 +-1.296556908777e-01 -1.626198081420e-02 -3.251663557094e-02 -1.221246546222e-03 1.529854510433e-04 +-6.679805060086e-02 -1.744091505144e-02 7.391328435427e-02 -1.068685416631e-03 1.654942663557e-04 +1.817087783080e-02 -1.845705073427e-02 7.495156481747e-02 -9.038477536258e-04 1.751758671492e-04 +8.310507903407e-02 -1.918407911513e-02 -3.649786248524e-02 -6.949241925893e-04 1.912854247622e-04 +-5.482484713968e-02 -1.982637352378e-02 -7.345411465170e-02 -5.099625338587e-04 1.960049564819e-04 +-6.380315026934e-02 -2.016464203437e-02 2.776685015461e-02 -2.866171416268e-04 2.071097411276e-04 +7.088531695428e-04 -2.028979940521e-02 -1.591109584209e-03 -5.724068925701e-05 2.162677520576e-04 +-6.698536943776e-02 -2.025923242644e-02 -4.174254315412e-02 1.575094262484e-04 2.185205888168e-04 +-8.277623313869e-02 -2.000995387708e-02 6.411768623691e-02 3.744948162908e-04 2.190930556687e-04 +6.125000303605e-02 -1.947452200865e-02 2.300869606146e-02 6.118521903759e-04 2.232633096190e-04 +-3.675884101578e-02 -1.876761828155e-02 -4.509967197398e-02 8.326570840256e-04 2.212724176753e-04 +-2.894934091191e-02 -1.783113384070e-02 -2.746431303284e-02 1.053487569511e-03 2.180154419193e-04 +-9.168746708146e-02 -1.663824928790e-02 -1.471560248396e-02 1.281262021665e-03 2.155843598936e-04 +-5.838054587982e-02 -1.523059769679e-02 4.907449804867e-02 1.502285947755e-03 2.104581433189e-04 +6.461529015869e-03 -1.362501860026e-02 3.152746592858e-02 1.711034228145e-03 2.014748297262e-04 +4.674385977342e-03 -1.175926667966e-02 -4.076711344134e-02 1.926285906608e-03 1.940885263869e-04 +-7.507269786680e-02 -9.741891073338e-03 -9.548827356906e-03 2.115225424765e-03 1.798184279671e-04 +-1.442326873647e-02 -7.510499062373e-03 1.113143887795e-01 2.298069934070e-03 1.648311423671e-04 +1.475560796922e-01 -5.207561936769e-03 -3.112314377764e-03 2.433507631725e-03 1.387413154366e-04 +-2.064789749200e-02 -2.723606303483e-03 -8.681290378986e-02 2.558311348821e-03 1.126430419545e-04 +-2.606972788753e-02 -1.030257826429e-04 3.413050151456e-03 2.662808533086e-03 8.490266321611e-05 +-1.382179718908e-02 2.596464419364e-03 -1.141349969088e-01 2.730271334044e-03 5.338954370435e-05 +-2.543397217052e-01 5.268954596640e-03 3.578182543003e-02 2.776465611888e-03 1.236646176699e-05 +5.774185367097e-02 7.960356274602e-03 1.253643676972e-01 2.760073528894e-03 -3.056491722833e-05 +-3.610986310676e-03 1.074241071818e-02 -4.017955524345e-02 2.743474156440e-03 -6.558367109374e-05 +-2.261725681593e-02 1.350731785655e-02 3.755560401180e-02 2.651947528600e-03 -9.764599140462e-05 +7.150022171291e-02 1.625039095980e-02 9.017197273503e-02 2.531536878966e-03 -1.228282378203e-04 +1.577266886541e-01 1.876714402116e-02 -5.536380393083e-02 2.392749558747e-03 -1.544773942329e-04 +-3.922738614874e-02 2.105217343415e-02 -1.972480153745e-02 2.213329136277e-03 -1.892465936792e-04 +1.182770855792e-01 2.319506509447e-02 1.092693774449e-01 2.035746477432e-03 -2.162343890414e-04 +1.793113687411e-01 2.508229440944e-02 -9.570584115491e-02 1.796523467735e-03 -2.416656010038e-04 +-7.313459673059e-02 2.683164719697e-02 -1.211465684341e-01 1.542744324677e-03 -2.528145296266e-04 +-6.298176812702e-02 2.823196053893e-02 1.401020269054e-01 1.266102492149e-03 -2.653794257844e-04 +2.070694570803e-01 2.935433718760e-02 -1.365941630819e-02 9.978300408839e-04 -2.722888410824e-04 +-9.030060074339e-02 3.025509025609e-02 -1.675745165959e-02 7.536387375223e-04 -2.687876332880e-04 +1.735545537611e-01 3.091113613083e-02 1.143047433780e-01 4.883915044989e-04 -2.571809741572e-04 +1.383088860127e-01 3.144231497398e-02 -1.055456088744e-01 2.760503833692e-04 -2.288973332126e-04 +-3.753666398769e-02 3.168720635546e-02 -8.436995298190e-02 8.203308679792e-05 -1.999750310869e-04 +-3.043101995114e-02 3.177386057518e-02 8.144689443517e-02 -8.714389997872e-05 -1.626518900041e-04 +1.253571248826e-01 3.166774027672e-02 1.523251013207e-03 -2.323373680662e-04 -1.233393076262e-04 +-2.738451792472e-02 3.131325651773e-02 -6.499503151252e-02 -3.446447640491e-04 -9.068062957442e-05 +-4.632938142394e-03 3.095652626726e-02 5.364138246776e-02 -4.148376469146e-04 -4.858016700655e-05 +7.989824701079e-02 3.055386156076e-02 2.931426353365e-02 -4.399746821099e-04 -5.503686238907e-06 +5.399558892491e-02 3.004365219459e-02 -3.565660655810e-02 -4.658613897120e-04 2.891960632728e-05 +8.585033894587e-03 2.959014119311e-02 4.076676657457e-02 -4.330336720089e-04 6.391502934445e-05 +1.355291220741e-01 2.909626166452e-02 -3.599973905726e-03 -3.814324162442e-04 8.699160863910e-05 +1.385086083134e-03 2.871656951911e-02 -3.019637628587e-02 -2.947924315440e-04 1.073351548449e-04 +7.513636950232e-02 2.848256166847e-02 -7.943800195185e-02 -1.923264719514e-04 1.244195890968e-04 +-1.574909178206e-01 2.832252708080e-02 -4.943709740400e-02 -7.557450556358e-05 1.299515117566e-04 +-2.373782530568e-02 2.827197268808e-02 9.556998854168e-02 7.195075201348e-05 1.252628926726e-04 +3.364905926279e-02 2.839464912051e-02 7.888929013239e-03 1.861012499984e-04 1.154102993742e-04 +-7.959967279201e-03 2.857010988481e-02 -4.386814174634e-02 2.680805549799e-04 9.164445557554e-05 +-5.408722422989e-02 2.884210172953e-02 -6.504171349934e-02 3.320073117016e-04 5.981109875036e-05 +-1.380433942779e-01 2.928146600021e-02 1.128712051287e-01 3.477716370906e-04 2.916720818601e-05 +1.716551860274e-01 2.966878263266e-02 8.992728733895e-02 3.755401784967e-04 -1.465283608251e-05 +4.181118040001e-02 3.011342084624e-02 -9.579763641416e-03 3.609077382076e-04 -5.780120992919e-05 +1.524956587446e-01 3.044935035391e-02 1.341822636362e-02 2.768320148499e-04 -1.079659429754e-04 +6.864763312725e-02 3.064820832293e-02 -1.056756279152e-01 1.526795900951e-04 -1.608963833680e-04 +-5.885559708574e-02 3.071731461534e-02 3.151357890540e-02 1.720664675615e-07 -2.095349267326e-04 +1.316747909381e-01 3.064369705685e-02 -1.222140869860e-02 -2.271917632214e-04 -2.483091508045e-04 +-8.329841448294e-02 3.022662065650e-02 -2.713938060011e-02 -4.876768968775e-04 -2.876917035402e-04 +7.739602973783e-02 2.955247624900e-02 1.473436918277e-03 -7.640368646928e-04 -3.154200358312e-04 +-8.035154064639e-02 2.874189341622e-02 -4.296952862004e-02 -1.066668830659e-03 -3.174968047473e-04 +-8.543027502252e-03 2.763249012690e-02 1.149856650852e-01 -1.361632944326e-03 -3.052271367386e-04 +1.496197895241e-01 2.603642057367e-02 2.415985342709e-02 -1.642793749927e-03 -2.939498493657e-04 +3.977667935192e-02 2.424823288261e-02 9.211159858135e-02 -1.940009896307e-03 -2.600551802797e-04 +3.338429866868e-01 2.207167812716e-02 7.015841164175e-02 -2.177366495845e-03 -2.230132113904e-04 +1.800935026354e-01 1.968515943263e-02 -7.910756281289e-02 -2.376408465567e-03 -1.731535658420e-04 +1.756278610610e-01 1.722847354302e-02 -5.667306833665e-02 -2.525129338530e-03 -1.054404414581e-04 +6.674736596213e-02 1.473850218041e-02 -1.403223357728e-01 -2.577358336631e-03 -2.538564400394e-05 +-1.050168104847e-01 1.206120817707e-02 -1.690515616878e-02 -2.568820516554e-03 4.449794975256e-05 +3.293705362457e-02 9.490046346518e-03 7.526245716532e-02 -2.502138487845e-03 1.189879303270e-04 +4.550810384591e-02 7.054784988395e-03 -1.338188928364e-01 -2.349030256266e-03 1.905547324162e-04 +-2.347007320482e-01 4.793917081331e-03 -5.344901379397e-02 -2.115317992673e-03 2.525681723330e-04 +-6.138992374203e-02 2.900259156721e-03 9.260336589885e-03 -1.798666991899e-03 3.121509289343e-04 +-2.161800588684e-01 1.277929045051e-03 -1.937219414059e-02 -1.459227772024e-03 3.541075699427e-04 +-1.001343120232e-01 -2.719625174994e-05 8.497664802117e-02 -1.072317248001e-03 3.770508214232e-04 +-4.622676282608e-02 -9.411313531490e-04 9.189102942768e-03 -6.984246874668e-04 3.842130030982e-04 +-8.175610613768e-02 -1.395953477289e-03 3.233298332326e-02 -2.860940694787e-04 3.803908914441e-04 +1.843920382043e-02 -1.459465065641e-03 2.113220426750e-02 6.371117880009e-05 3.614767319837e-04 +-3.949169760269e-02 -1.128468849121e-03 -9.269746735876e-02 4.304174778314e-04 3.313296209648e-04 +-1.669557308971e-01 -5.328247181917e-04 -2.751154337991e-02 7.475970915718e-04 2.842015429647e-04 +-9.451478436250e-02 3.060639438584e-04 8.365636512283e-02 9.905662526818e-04 2.256303061926e-04 +3.569993485712e-04 1.429847529450e-03 1.050443655017e-01 1.184342883857e-03 1.673133548275e-04 +1.155739466408e-01 2.717732096965e-03 9.369306802902e-02 1.302007663652e-03 1.077870837367e-04 +1.877431354066e-01 4.047380179628e-03 -5.217702680601e-02 1.408411808873e-03 4.503591438342e-05 +1.121989302880e-02 5.513801734057e-03 -8.481090581584e-02 1.447706075482e-03 -5.397428463681e-06 +1.812132377494e-02 6.936330311721e-03 5.830527600021e-02 1.445247991918e-03 -5.163097897937e-05 +1.278304450292e-01 8.309711379610e-03 1.949222689298e-02 1.377743207154e-03 -8.839161697230e-05 +5.710577756089e-02 9.683743925279e-03 -8.746060896531e-02 1.278780620319e-03 -1.073518886997e-04 +-4.709077290139e-02 1.083514758391e-02 -5.384970040374e-03 1.169576767204e-03 -1.250427074487e-04 +4.633583748014e-02 1.194511139035e-02 1.244116413153e-01 1.027603602715e-03 -1.256695203332e-04 +2.017325097293e-01 1.291928601412e-02 8.431732455616e-02 9.227311549852e-04 -1.182640196020e-04 +2.149704865925e-01 1.382003644701e-02 -1.194204208023e-01 8.059496604060e-04 -1.001617942053e-04 +-3.710833187533e-02 1.456161910202e-02 -1.446997940231e-01 7.084272681736e-04 -8.174277179946e-05 +-7.442910145369e-02 1.520552148700e-02 -4.548202703200e-02 6.592940680493e-04 -6.217318942569e-05 +-1.280723859393e-01 1.580391943501e-02 -3.221867459784e-02 6.068314165534e-04 -4.132223173378e-05 +-1.388664506494e-01 1.628629586942e-02 4.491276361623e-02 6.109015421777e-04 -2.920244979253e-05 +-3.824685870686e-02 1.684950064837e-02 1.434992647736e-01 6.168383022635e-04 -1.309897763538e-05 +1.481320788979e-01 1.753061138966e-02 -4.746000928867e-02 6.673046075419e-04 7.053827047688e-06 +-1.331668772842e-01 1.815244029918e-02 -1.264801431343e-01 6.787611852633e-04 1.456123039590e-05 +-1.048282073707e-01 1.884528710936e-02 5.939482018676e-02 6.769841194981e-04 1.989200423297e-05 +-1.437723691069e-02 1.959957996907e-02 6.145699464946e-02 7.226264843872e-04 2.192136097253e-05 +1.808578192825e-02 2.038446451240e-02 1.239345945525e-01 7.659961839768e-04 1.845496164137e-05 +2.334919521944e-01 2.125011614817e-02 8.542052619537e-03 7.601969073070e-04 1.567300609918e-05 +3.516988716732e-02 2.203239175548e-02 -9.817540673567e-02 7.613438859780e-04 2.282302630988e-06 +3.714113872303e-02 2.285509655623e-02 -5.364025222138e-02 7.310962720226e-04 -8.804606815248e-06 +-7.211061727544e-02 2.350426134241e-02 6.776851888394e-02 6.709494848491e-04 -3.234352703243e-05 +1.726781764909e-01 2.412827373191e-02 1.788498587988e-02 6.115736632638e-04 -5.316259952696e-05 +-3.634064551569e-02 2.473619949593e-02 8.769559371904e-03 5.410004286741e-04 -6.815528687603e-05 +1.902172952347e-01 2.523267115184e-02 3.854931981830e-02 4.666041637255e-04 -8.334746011555e-05 +4.075799412091e-02 2.566262965055e-02 -1.451807727500e-01 3.717670397791e-04 -9.348082120019e-05 +-1.001442502652e-01 2.604612391132e-02 -6.079719953604e-03 2.588705061742e-04 -9.581127184836e-05 +2.859855421370e-02 2.631791782388e-02 3.327253427390e-02 1.599619129124e-04 -9.562864262339e-05 +-3.359918171739e-02 2.639959176380e-02 3.106467067680e-02 5.422718083639e-05 -9.986941333048e-05 +9.072789556730e-02 2.636341064804e-02 8.258527535324e-02 -3.478397448066e-05 -1.031958052396e-04 +1.315713689891e-01 2.620889049798e-02 -5.649239243746e-03 -1.199092022419e-04 -1.066326593138e-04 +7.942941707981e-02 2.603323878112e-02 -8.556998604908e-02 -2.231960979720e-04 -1.028300439517e-04 +-3.956860310906e-02 2.581391165524e-02 -1.107819786190e-02 -3.040531659108e-04 -9.466981646095e-05 +5.727302135601e-02 2.536098096431e-02 -1.193795669092e-02 -4.016844164659e-04 -9.887873350308e-05 +-6.344451649090e-02 2.493472924459e-02 -5.540756616063e-02 -4.803421336860e-04 -9.426956096898e-05 +-5.354211096524e-02 2.437584667391e-02 6.993002597026e-02 -5.922184909094e-04 -9.422692235098e-05 +7.641553544962e-02 2.374852023757e-02 3.642280421815e-02 -6.734752354137e-04 -9.328802926790e-05 +1.930349747106e-02 2.297665541481e-02 -6.096347811159e-02 -7.419504278373e-04 -9.782498093587e-05 +-4.551142077357e-02 2.212821314542e-02 1.480172770990e-02 -8.135330295160e-04 -1.016018439504e-04 +4.890695289085e-02 2.130826351998e-02 -6.169654981857e-04 -9.078494442464e-04 -9.486611779088e-05 +-4.674535176994e-02 2.036799167588e-02 -2.240449560054e-02 -1.011171103199e-03 -8.909867780968e-05 +4.097961689768e-03 1.936332265092e-02 4.861319243066e-02 -1.108134943728e-03 -7.913257920560e-05 +5.048103309137e-02 1.830630761606e-02 1.392691930104e-01 -1.184560740511e-03 -6.401870479764e-05 +2.826363477106e-01 1.708435185065e-02 -5.832444044916e-02 -1.253181614618e-03 -5.358840128930e-05 +-6.616784780695e-02 1.572719402911e-02 -1.735679685433e-01 -1.294293150520e-03 -4.621948010436e-05 +-6.449958937596e-02 1.439755599266e-02 1.213677796306e-01 -1.362954718097e-03 -2.927619350873e-05 +1.765677114543e-01 1.309943190153e-02 1.079337835445e-01 -1.381051186886e-03 -4.160175939721e-06 +1.513679777130e-01 1.170931542457e-02 -7.118799994705e-02 -1.380820959208e-03 1.613307123524e-05 +3.419171156019e-02 1.029177997157e-02 -7.959091370786e-02 -1.364611502469e-03 3.434976941703e-05 +-7.813849702685e-03 8.927479474851e-03 -2.590456780356e-02 -1.278904300528e-03 5.389833020785e-05 +-1.761742404694e-02 7.593590650136e-03 -1.168795172901e-01 -1.232058726509e-03 7.000867618067e-05 +-2.415728842828e-01 6.439431935802e-03 -3.925089711962e-02 -1.132804109400e-03 9.249422744228e-05 +-9.611921828617e-02 5.381692721457e-03 1.198375106059e-01 -1.038177037181e-03 1.115910102287e-04 +-1.897863070918e-03 4.362670771751e-03 4.598288591432e-02 -8.973555974496e-04 1.201304097098e-04 +-4.153446457531e-03 3.637682078127e-03 -5.751355901644e-03 -7.466407180202e-04 1.374393410753e-04 +-1.340057487421e-02 2.961939872520e-03 7.924170023270e-03 -5.681046684931e-04 1.417911809545e-04 +1.169489358901e-02 2.442088588915e-03 4.142580316102e-02 -4.237241241764e-04 1.418329360469e-04 +6.945103144784e-02 2.098774029568e-03 -3.953361239770e-02 -2.999333364678e-04 1.401294608773e-04 +-6.737233120639e-02 1.795423281697e-03 -3.761561869230e-02 -1.794244438931e-04 1.263991278641e-04 +-5.780205936755e-03 1.653472320963e-03 2.577985818788e-02 -7.272397802643e-05 1.123790816760e-04 +-1.581261483063e-02 1.601152697177e-03 3.531734114753e-03 4.018609925233e-05 9.398322605724e-05 +1.283262292751e-03 1.605144557864e-03 7.606669657136e-02 1.281076729612e-04 7.069710082618e-05 +1.363207783121e-01 1.795112456969e-03 -6.866412811447e-02 2.149430160106e-04 5.575899414047e-05 +-1.360449939362e-01 2.038875059967e-03 -1.970658074797e-02 2.560643862503e-04 4.061978490402e-05 +9.690761681616e-02 2.271249020163e-03 1.478294064879e-02 2.880889039399e-04 2.220982817770e-05 +-1.064791126386e-01 2.554386014467e-03 -1.793023194208e-02 2.866214385933e-04 7.751706574770e-06 +6.104715293200e-02 2.883331919331e-03 6.931464952454e-02 2.893608783261e-04 -1.590083656990e-06 +3.215018641048e-02 3.236177693813e-03 -1.635108738045e-02 3.173991933551e-04 -7.046248985918e-06 +2.834497817111e-02 3.581736694466e-03 1.963962279546e-02 3.207334272166e-04 -1.073917296646e-05 +7.142943200140e-02 3.897192712795e-03 -2.547844854603e-02 2.992814703804e-04 -1.394362490799e-05 +-2.261191892094e-02 4.188004457922e-03 -2.641403369137e-02 2.935966449706e-04 -1.622849324172e-05 +1.860136461866e-02 4.480398296531e-03 6.090666922823e-02 2.699736542221e-04 -1.568581640753e-05 +9.920141953552e-02 4.724905527246e-03 -3.133537646025e-02 2.499403829415e-04 -1.671854055423e-05 +-4.406938830183e-02 4.952987596249e-03 -8.433878266717e-02 2.395250939177e-04 -1.725854000061e-05 +-6.947614579882e-02 5.115779051270e-03 -4.402519579645e-02 2.588105599755e-04 -2.213210735091e-05 +-1.321197798947e-01 5.389095485591e-03 8.214939194939e-02 2.326057984675e-04 -1.680956884695e-05 +9.482263809997e-02 5.628722925628e-03 4.903240640553e-02 2.086121985907e-04 -1.317393167653e-05 +-3.405496708369e-02 5.753106404145e-03 -9.526237551516e-02 2.080407333176e-04 -1.841625215489e-05 +-9.570211293036e-02 5.837347691392e-03 8.001686162523e-02 1.862911985200e-04 -2.618807838998e-05 +1.259787561668e-01 6.028558265940e-03 -3.582197078666e-02 1.728142813905e-04 -2.387900683323e-05 +-1.673460545037e-01 6.222706233294e-03 -4.805528100591e-03 1.578946412059e-04 -2.009286505821e-05 +1.163676999656e-01 6.301305030731e-03 8.617454965467e-02 1.141144586747e-04 -2.429243474580e-05 +5.003044805673e-03 6.451021559237e-03 -3.825653675848e-02 5.576360835742e-05 -2.031758411206e-05 +3.985462644862e-02 6.495004853214e-03 1.086905996284e-01 1.458593784544e-05 -2.283006127744e-05 +2.223842440624e-01 6.531587580015e-03 5.152089576082e-02 -3.253693151459e-07 -2.394102321633e-05 +1.428964179703e-01 6.577869771682e-03 -1.222614099360e-01 -8.996791483192e-06 -2.248701360912e-05 +-2.213857580950e-02 6.595888216284e-03 -9.738115224897e-02 -2.372054508238e-05 -2.167967521708e-05 +-5.186588652768e-02 6.603173436623e-03 -5.979876392803e-02 -3.132976859342e-05 -2.016107124217e-05 +-1.417361036656e-01 6.509420094081e-03 -1.326502004684e-02 -5.376167902934e-05 -2.545937408092e-05 +-7.839592662136e-02 6.493471000814e-03 6.684660950803e-02 -7.804400720984e-05 -2.248592874778e-05 +-8.042884649495e-03 6.443077212778e-03 -2.888590368219e-03 -9.061253127830e-05 -2.068088880429e-05 +-8.417310735779e-02 6.381590618285e-03 6.633151534258e-02 -1.029190030795e-04 -1.813593308335e-05 +1.246201460357e-01 6.256262829331e-03 3.149493148419e-02 -1.247411497699e-04 -1.898856899062e-05 +-2.118324438940e-02 6.090714484028e-03 -8.785831506140e-02 -1.256544490959e-04 -2.110828872938e-05 +-5.109648408714e-02 6.043558753592e-03 -2.825698987287e-02 -1.460652228794e-04 -1.102026049623e-05 +-7.769722413513e-02 5.794653669878e-03 5.156694972481e-02 -1.652715439885e-04 -1.510426786667e-05 +5.203741536248e-02 5.731696003366e-03 1.414550812785e-01 -1.665338281246e-04 -1.137905700952e-06 +2.052129384218e-01 5.480877637195e-03 1.803941362587e-02 -1.773713914530e-04 -5.640034429313e-07 +8.811624261422e-02 5.238062478592e-03 -1.185532301880e-01 -1.872924599352e-04 2.703604945794e-06 +-3.189352195412e-02 5.034713487491e-03 -2.724812977604e-02 -1.800100168248e-04 1.053746889224e-05 +3.361998306215e-02 4.753397381968e-03 6.573732102553e-03 -1.825199993979e-04 1.220605033552e-05 +-1.874605774901e-02 4.580566557858e-03 -3.517372703263e-02 -1.693633253368e-04 2.213289104754e-05 +-3.672747100311e-02 4.306364004937e-03 1.267674048807e-02 -1.742163773811e-04 2.159203221505e-05 +6.607423227128e-03 4.126085783579e-03 4.565350486069e-02 -1.352720367319e-04 2.538632357638e-05 +5.457953871826e-02 4.008329130630e-03 4.715317621101e-04 -1.153674739248e-04 2.946870545396e-05 +7.550486751349e-03 3.944973697461e-03 -3.415198071262e-02 -8.846579055446e-05 3.225276861957e-05 +-1.372442270698e-02 3.910521950872e-03 -2.636340418378e-02 -7.301299253889e-05 3.096953923197e-05 +-4.517632161622e-02 3.827101682079e-03 -6.668374035758e-02 -3.504438035405e-05 1.886036151732e-05 +-1.470919034221e-01 3.781781640556e-03 5.525441159763e-02 -3.473219800640e-05 3.854343848737e-06 +6.533250157905e-02 3.771568147043e-03 1.078867558600e-01 -5.133347904280e-05 -1.258684545052e-05 +6.868160829776e-02 3.695891889713e-03 -1.173640343607e-01 -5.430914663849e-05 -3.699642034207e-05 +-1.693955671424e-01 3.680207439208e-03 -6.957703741121e-02 -1.183596576916e-04 -5.600964789157e-05 +-7.047246652465e-02 3.511683100920e-03 4.793716938770e-02 -1.696188260614e-04 -8.401823615578e-05 +-7.352122836696e-02 3.264789825046e-03 7.286520789335e-02 -2.744011324345e-04 -1.111466437490e-04 +7.525794926205e-02 2.917000532555e-03 1.017808428790e-01 -3.934441447194e-04 -1.352045878800e-04 +1.300404573910e-01 2.433946764713e-03 9.296152143915e-04 -4.995639800688e-04 -1.557844852689e-04 +7.711717969083e-02 1.688348016243e-03 -1.326676716347e-02 -6.824656785619e-04 -1.799548758996e-04 +1.035069230641e-01 8.671207797737e-04 -7.169788785993e-02 -8.842616462577e-04 -1.887957149295e-04 +-6.627859602902e-02 -1.671526203570e-04 -1.947674096703e-02 -1.100088450568e-03 -1.918761425581e-04 +6.455344113001e-02 -1.268375250810e-03 7.503527004843e-02 -1.289004400436e-03 -1.765366267331e-04 +8.379194406784e-02 -2.645353598540e-03 6.450751074183e-03 -1.474682203135e-03 -1.609680244343e-04 +7.745494327837e-02 -4.210334286989e-03 -5.645574818672e-02 -1.630655730402e-03 -1.396267980931e-04 +-2.911955230561e-02 -5.908084829327e-03 -2.381884276758e-02 -1.773710915415e-03 -1.107007070285e-04 +2.981725774322e-02 -7.653660970284e-03 6.419499709035e-02 -1.819840197418e-03 -7.145036061396e-05 +9.927044187508e-02 -9.581492931470e-03 -8.941195703950e-02 -1.899401050732e-03 -3.769421255893e-05 +-1.490066563358e-01 -1.145911746076e-02 3.391988309650e-02 -1.917087288243e-03 5.293682213602e-06 +1.671102080681e-01 -1.335972717084e-02 1.463114463528e-03 -1.905124904419e-03 4.591661525312e-05 +-1.460804274087e-01 -1.520957600819e-02 -1.465945687265e-01 -1.822282366578e-03 8.483738755988e-05 +-1.260789293849e-01 -1.697538620990e-02 6.218904996191e-02 -1.676493948597e-03 1.193616934232e-04 +-2.170232748490e-02 -1.867043798552e-02 -3.252535618092e-02 -1.548260682000e-03 1.443443003428e-04 +-1.911296417467e-01 -2.016971098771e-02 4.721009209825e-03 -1.405420611649e-03 1.674063440861e-04 +-1.226030906525e-02 -2.144745069587e-02 -2.975848305381e-02 -1.209777338914e-03 1.880006958290e-04 +-2.506466078543e-01 -2.256062238412e-02 2.259723278080e-02 -1.019026208568e-03 1.997049668550e-04 +3.293415649636e-02 -2.352012940086e-02 1.136747279474e-01 -8.360942273116e-04 2.014185501143e-04 +-2.329715195959e-02 -2.420877168775e-02 -2.311743928977e-04 -6.198563966755e-04 2.031520299857e-04 +3.247180771056e-02 -2.476285382691e-02 6.269130800161e-03 -4.188626542197e-04 1.944474007504e-04 +-1.075889035926e-02 -2.510505909339e-02 -8.769687299189e-03 -2.330405629185e-04 1.836229993411e-04 +1.493243311218e-02 -2.525774235600e-02 -2.699853486825e-02 -6.084081312085e-05 1.709375187200e-04 +-6.475596009576e-02 -2.522983556102e-02 -1.399535809997e-02 9.598298288855e-05 1.578413447408e-04 +-1.305828308776e-02 -2.499484434178e-02 6.266219549015e-02 2.359572954375e-04 1.486678030794e-04 +6.056843088455e-02 -2.470071653442e-02 1.360301381143e-02 3.861411103471e-04 1.327269097146e-04 +1.414774453511e-02 -2.429722411709e-02 -7.408354877708e-03 5.118942049806e-04 1.157163860282e-04 +4.575172112913e-02 -2.369881299373e-02 -4.024176537456e-02 5.968889955588e-04 1.064787001182e-04 +-6.633578621402e-02 -2.296641560255e-02 -2.380635489066e-02 7.082254209643e-04 1.007497697572e-04 +-1.860988652191e-03 -2.223611077399e-02 9.407856757571e-02 7.807565913562e-04 8.770664507498e-05 +1.218213489374e-01 -2.142033369421e-02 -1.333878309862e-01 8.754782587892e-04 7.513716194002e-05 +-2.686366506246e-01 -2.055266935303e-02 -1.227012695458e-01 9.580529905182e-04 6.043074683887e-05 +-1.235811901542e-01 -1.953749151250e-02 5.273135516607e-02 1.037259566965e-03 5.201087001924e-05 +-1.631739402925e-01 -1.852128213682e-02 1.152258463810e-01 1.091442156055e-03 3.828361465470e-05 +1.068705026078e-01 -1.739595052460e-02 5.048690949776e-02 1.116306301027e-03 2.932152901422e-05 +-6.220012129697e-02 -1.632430975853e-02 -7.129524009086e-02 1.135402042169e-03 1.263535778143e-05 +-3.571997757391e-02 -1.518700932724e-02 -1.992069013867e-03 1.157632161215e-03 -7.611442989527e-07 +-6.618425932470e-02 -1.408673224247e-02 1.517450973834e-01 1.149597687847e-03 -1.791999807324e-05 +2.677702171928e-01 -1.291478087843e-02 -6.342677562326e-02 1.129498789550e-03 -2.797222025176e-05 +-1.930378105712e-01 -1.178665058696e-02 -1.144895803219e-01 1.105747981573e-03 -3.899989945884e-05 +3.879105654894e-02 -1.077569029269e-02 7.591379799814e-02 1.059210227882e-03 -5.547170823209e-05 +-4.121021457494e-02 -9.610334522868e-03 2.909272478441e-02 1.010024222579e-03 -5.321633720521e-05 +9.697650611776e-02 -8.668163203473e-03 1.054164703062e-01 9.748630280822e-04 -6.290283282504e-05 +1.696227260375e-01 -7.630737501136e-03 -1.103239184424e-01 9.098485063205e-04 -5.716110145599e-05 +-1.236713307670e-01 -6.683547654679e-03 -1.277072532175e-01 8.473550499970e-04 -5.098808762995e-05 +-8.579178039754e-02 -5.850875532669e-03 1.201346261794e-01 7.965692467331e-04 -4.674395673685e-05 +1.165979215919e-01 -4.962399544343e-03 3.641996579428e-02 7.488628626564e-04 -3.092843116771e-05 +-1.295184880899e-02 -4.150497600399e-03 -1.184533154980e-01 7.427620423049e-04 -1.603134057307e-05 +-1.203087094041e-01 -3.314902547856e-03 6.164963825827e-02 7.123420957819e-04 4.770170556316e-06 +1.103474277076e-01 -2.614300935814e-03 4.086466704419e-02 7.251859684710e-04 1.642675795077e-05 +-3.857937531571e-02 -1.866510535485e-03 -7.394260614128e-02 7.477221210509e-04 3.188851593209e-05 +-3.753778457500e-02 -1.137785454319e-03 3.490857590899e-03 7.822681122016e-04 4.361340905322e-05 +-3.159766013391e-02 -2.915168801719e-04 8.325700765324e-03 8.427572849749e-04 6.080436802876e-05 +-2.088638304435e-02 5.584206279814e-04 3.193810702655e-02 9.056269403274e-04 7.190263315958e-05 +3.227855391920e-02 1.560976905279e-03 1.912909609474e-02 9.878989522824e-04 8.748454539560e-05 +1.737180914514e-02 2.570280862318e-03 -4.347978529296e-02 1.069959807376e-03 9.376053383105e-05 +-5.468101666672e-02 3.622700446507e-03 -3.655508660641e-02 1.158644747409e-03 9.262741915143e-05 +-5.573836406768e-02 4.781444753701e-03 9.638440509506e-02 1.240457804813e-03 8.871422429389e-05 +1.380877935234e-01 6.052751638592e-03 -2.895891980351e-02 1.332191332920e-03 8.226576531803e-05 +-1.136562036747e-01 7.483464945861e-03 -4.900509880406e-02 1.414367578487e-03 7.732189867637e-05 +4.007759591529e-02 8.929021010344e-03 5.572163905216e-02 1.482961928237e-03 6.258957503846e-05 +-2.212925570379e-03 1.033340646654e-02 4.062106635113e-02 1.528704481336e-03 3.484220812828e-05 +1.213197286176e-01 1.199374016362e-02 -1.189894495471e-02 1.533787877489e-03 2.110080914495e-05 +-2.601081547980e-02 1.357349948228e-02 -6.658638374860e-02 1.528105237100e-03 -4.245401671084e-06 +-1.185303887964e-02 1.515854014055e-02 -2.777966511835e-02 1.494539270284e-03 -3.124563122078e-05 +-8.157014571650e-02 1.664744911949e-02 3.424454829802e-02 1.471899125070e-03 -6.535336328267e-05 +5.663605771639e-02 1.816325278863e-02 7.548878748236e-03 1.401726647664e-03 -9.281308544093e-05 +-6.647238822003e-02 1.950022133868e-02 -1.403166946418e-03 1.281413043419e-03 -1.265668495724e-04 +5.382972382356e-02 2.067160728326e-02 6.074183165901e-02 1.113269059946e-03 -1.611794334663e-04 +5.501127509799e-02 2.158550743001e-02 -7.305727294292e-02 9.562769668098e-04 -2.005599017292e-04 +-9.228482206229e-02 2.254717809900e-02 7.002246362194e-02 7.376514718131e-04 -2.155681934339e-04 +1.950562023419e-01 2.316595986977e-02 6.258038252090e-02 5.174026513890e-04 -2.355251402606e-04 +3.287594297951e-02 2.358633199430e-02 -4.502171656378e-02 2.737938234190e-04 -2.460020216702e-04 +1.050127692143e-01 2.366757806384e-02 1.132063288508e-02 2.339716640366e-05 -2.569172088527e-04 +5.551720874966e-02 2.355839084665e-02 -4.881986281058e-02 -2.003651943428e-04 -2.552570166132e-04 +7.373043593134e-03 2.339863096766e-02 3.051321877695e-02 -4.250130931252e-04 -2.297608472917e-04 +1.165436463036e-01 2.289798635514e-02 7.865466650334e-02 -6.512804737976e-04 -2.058456555524e-04 +1.646823765998e-01 2.214066063604e-02 -3.935176467356e-02 -8.228322786336e-04 -1.790639178184e-04 +3.784011695644e-02 2.122467388804e-02 -8.846090148298e-02 -9.901401932086e-04 -1.446106742318e-04 +-1.223942636615e-02 2.009026204260e-02 -1.397844439126e-02 -1.162791133481e-03 -1.109317058331e-04 +9.883228173914e-03 1.888708773397e-02 -2.401631012736e-02 -1.229327108075e-03 -7.049633115165e-05 +-6.027204662086e-02 1.760202647280e-02 3.591678489644e-02 -1.294421814411e-03 -2.977872471768e-05 +8.171679796680e-02 1.626726428805e-02 6.949308729666e-03 -1.320625128722e-03 9.044684486179e-06 +-4.637342916153e-02 1.490953870539e-02 1.781347705235e-03 -1.313094482642e-03 4.314817824542e-05 +8.527949337727e-02 1.365464596113e-02 -8.441172273892e-03 -1.248174136993e-03 7.811335848887e-05 +-6.325577370931e-02 1.239795767602e-02 -9.379017351845e-02 -1.165254038981e-03 1.009473044823e-04 +-1.023008536596e-01 1.130601781890e-02 -1.534485146126e-02 -1.044588055303e-03 1.221728774387e-04 +-9.394547663184e-02 1.034463336714e-02 5.358791415272e-02 -9.204616720357e-04 1.364800173638e-04 +4.874974645806e-03 9.447161105805e-03 8.872941411206e-02 -8.061790190734e-04 1.372099549363e-04 +8.351335159228e-02 8.636236893560e-03 -9.066082958008e-03 -6.651575538779e-04 1.259532826759e-04 +-1.325719127021e-02 8.058248314768e-03 -1.171832470357e-01 -5.597022738281e-04 1.158503558108e-04 +-1.508531424790e-01 7.555772179967e-03 4.042068414992e-02 -4.447363571459e-04 9.568129656459e-05 +6.758417702962e-02 7.172801268327e-03 7.499746737925e-02 -3.564027085041e-04 7.170744647461e-05 +-8.582077205386e-04 6.770289589297e-03 -2.147393921617e-02 -2.980059376251e-04 3.597496410241e-05 +2.463629859728e-02 6.513652302206e-03 5.760394732882e-02 -2.743905681903e-04 6.512703490850e-06 +1.143496869371e-01 6.235721205305e-03 5.736371186627e-02 -2.869287336421e-04 -2.610812883278e-05 +1.393637223298e-01 5.961897602013e-03 -8.477899183525e-02 -3.359027762545e-04 -5.517702391262e-05 +-5.520829673338e-02 5.580402471826e-03 -1.406702961452e-01 -3.986763495050e-04 -8.576169735184e-05 +-1.419768699605e-01 5.221516265486e-03 -1.647308272665e-03 -4.843164422453e-04 -1.032004560216e-04 +-5.850291327871e-02 4.595766096191e-03 1.235438815610e-01 -6.122304011550e-04 -1.281035842952e-04 +1.051108931615e-01 3.900663114111e-03 3.496901034100e-02 -7.407851686916e-04 -1.412552596908e-04 +1.143510740330e-02 3.116032718147e-03 -4.175714144659e-02 -8.946647319896e-04 -1.425696528811e-04 +2.159661026838e-02 1.986033147557e-03 -4.691977256827e-02 -1.046444243117e-03 -1.525081828992e-04 +-8.240443773324e-02 8.093331939240e-04 4.699148087235e-02 -1.204244830447e-03 -1.462228740641e-04 +1.155795720131e-01 -4.904623766814e-04 1.831018963506e-01 -1.328996504841e-03 -1.313594438938e-04 +2.837993549680e-01 -1.947249965279e-03 -4.878947320973e-02 -1.457548065076e-03 -1.128959196337e-04 +1.800062559362e-02 -3.455891026098e-03 -1.072995048458e-01 -1.555056150858e-03 -8.488653421815e-05 +6.920034527635e-02 -5.077984537900e-03 -2.418462244590e-02 -1.610181899256e-03 -5.632046065472e-05 +-3.036861929819e-02 -6.790460657902e-03 -1.672029190880e-01 -1.640765175407e-03 -2.939953369411e-05 +-2.652054928996e-01 -8.351014832581e-03 6.543970845794e-02 -1.618745274037e-03 1.167058553411e-05 +1.005107976177e-01 -9.923980141238e-03 8.730828990300e-02 -1.581927166504e-03 4.873859156025e-05 +-9.058891309362e-02 -1.151587560070e-02 -1.005605631679e-01 -1.526944843815e-03 7.736421921491e-05 +-1.006103287182e-01 -1.302996351903e-02 -2.046311537405e-02 -1.456815193182e-03 1.022070701836e-04 +-1.315151438417e-01 -1.451473532139e-02 7.751663317179e-02 -1.352240662340e-03 1.162775576197e-04 +5.442293762542e-02 -1.574398256421e-02 1.873504174496e-02 -1.218725371355e-03 1.360576844260e-04 +-9.404506035180e-02 -1.682093428252e-02 8.567690555066e-04 -1.038880126287e-03 1.510352223570e-04 +5.613647573643e-02 -1.776803002682e-02 4.902695902659e-02 -8.923904334086e-04 1.586872459176e-04 +4.008857701367e-03 -1.849886478873e-02 -1.007318629848e-01 -7.286916922647e-04 1.664905887063e-04 +-1.453272502332e-01 -1.908918151498e-02 -3.307729415584e-02 -5.653426880796e-04 1.685770879724e-04 +-6.214573061031e-02 -1.951155369320e-02 5.998232172185e-02 -3.804277121591e-04 1.680407294547e-04 +-2.536260678954e-02 -1.977369656842e-02 4.856360221234e-02 -1.878482432644e-04 1.651918790119e-04 +3.498147381436e-02 -1.988556015739e-02 3.207100035938e-02 -2.911339682992e-05 1.607383801165e-04 +3.877939392923e-02 -1.975522024692e-02 -5.969747101024e-02 1.235445414394e-04 1.638685571357e-04 +-8.441346820611e-02 -1.957150148098e-02 3.217539234833e-03 2.931298618537e-04 1.595471445653e-04 +4.521447239890e-02 -1.921057366460e-02 3.629019984386e-02 4.487600686966e-04 1.585792758316e-04 +-1.183306851839e-02 -1.863101732456e-02 -1.718386788950e-02 6.283606110863e-04 1.643696552161e-04 +1.084673661990e-02 -1.795775799092e-02 1.221710970300e-02 8.063910837239e-04 1.658065699799e-04 +1.260115088760e-02 -1.709945630111e-02 6.797496672093e-02 9.936539367633e-04 1.695525897142e-04 +1.467966700618e-01 -1.602712438831e-02 -8.391597498902e-02 1.153930346775e-03 1.769515878335e-04 +-1.552307990904e-01 -1.468117297395e-02 -7.176749061743e-02 1.336416234625e-03 1.914629469254e-04 +3.261688826900e-03 -1.323579592618e-02 7.481338604589e-02 1.522156638752e-03 1.966128837894e-04 +-5.604026998657e-03 -1.163877069491e-02 -1.146955043745e-01 1.733193528877e-03 1.949602303456e-04 +-2.261293199221e-01 -9.783593498697e-03 -4.754995624482e-02 1.936826270377e-03 1.940211230007e-04 +-1.007039394883e-01 -7.822452809069e-03 1.236095341746e-01 2.110355411670e-03 1.807017497477e-04 +2.108974842706e-02 -5.549021198784e-03 -3.322277533118e-03 2.290307513993e-03 1.722764016356e-04 +-1.073484945545e-01 -3.247696847982e-03 -6.862168520767e-03 2.454278751659e-03 1.456129169348e-04 +7.365411385529e-03 -8.211653166289e-04 6.320882841679e-02 2.614735870193e-03 1.103824288509e-04 +1.906916227905e-02 1.876363068008e-03 -3.270889391396e-02 2.723259975813e-03 8.144812287224e-05 +-5.805237644238e-02 4.574152136965e-03 1.048127717210e-01 2.782631988755e-03 4.001783747444e-05 +2.286947057211e-01 7.361209129852e-03 6.293208172002e-02 2.793573510554e-03 -2.031669167425e-06 +6.781178699766e-02 1.019325991231e-02 -1.554895382379e-01 2.730185035416e-03 -4.313482633154e-05 +-8.228437075476e-02 1.286392721080e-02 -9.050048281356e-02 2.673455410111e-03 -9.536373816889e-05 +-1.131891786295e-01 1.552210889836e-02 -2.189514569244e-02 2.547636555179e-03 -1.408878728218e-04 +-1.260746621396e-01 1.803373996986e-02 1.094656137463e-01 2.375351702061e-03 -1.849467032064e-04 +1.057420488632e-01 2.042509526346e-02 1.754468744276e-01 2.176280709748e-03 -2.200355091139e-04 +2.248190867155e-01 2.247857131883e-02 -5.930185005315e-02 1.945338562585e-03 -2.595168307645e-04 +-1.286165124314e-02 2.431866343059e-02 -5.797604126319e-02 1.659693397951e-03 -2.884244990846e-04 +1.088670041891e-01 2.584426137646e-02 3.418696556474e-02 1.374012174289e-03 -3.116202802195e-04 +5.551227988634e-02 2.708380259574e-02 1.431548195458e-02 1.062399806661e-03 -3.242719385413e-04 +1.374979680983e-01 2.810817661375e-02 4.258742064213e-02 7.434512370234e-04 -3.189058671516e-04 +1.406871211706e-01 2.861162194176e-02 -8.031170020236e-02 3.894933519679e-04 -3.203686520566e-04 +-2.312543230646e-02 2.890126581749e-02 -3.620646043493e-02 8.686005389242e-05 -3.037925742388e-04 +6.827420030075e-02 2.881555847863e-02 1.253327222671e-02 -2.072584660513e-04 -2.847419899698e-04 +1.941112146955e-03 2.855595172496e-02 -4.783440251597e-02 -4.448860710956e-04 -2.494206160575e-04 +-2.739460473120e-02 2.799669691286e-02 6.584931521468e-02 -6.918552497010e-04 -2.119700779547e-04 +1.336397425763e-01 2.722732329475e-02 1.306321130409e-02 -8.681169249494e-04 -1.693388487533e-04 +-1.268182123023e-03 2.618900917006e-02 -5.154577479586e-02 -1.045232829335e-03 -1.313495171230e-04 +3.054819298460e-02 2.497807383498e-02 -2.807660684008e-02 -1.184114246152e-03 -9.474124149089e-05 +-5.742139580318e-02 2.376464980766e-02 4.774715620457e-02 -1.251449973694e-03 -5.085802761892e-05 +1.260425053937e-01 2.240908060277e-02 2.116783802194e-02 -1.277861403421e-03 -1.685660219653e-05 +-1.508571975930e-02 2.121545251709e-02 -5.091736577445e-02 -1.280707883255e-03 2.784473535702e-05 +2.420777384483e-02 1.996048937307e-02 3.965841101173e-02 -1.233967702633e-03 6.008545587960e-05 +6.423110226415e-02 1.876078430013e-02 -8.481976581652e-02 -1.161746844546e-03 8.564153283725e-05 +-1.454317577882e-01 1.764519134474e-02 2.181117286561e-02 -1.111489737866e-03 1.044262658011e-04 +1.078534479954e-01 1.654395400873e-02 3.433594171555e-02 -1.035683860247e-03 1.089892475150e-04 +-7.675987435711e-02 1.554706912917e-02 -5.776131819609e-02 -9.275489424835e-04 1.056617692919e-04 +-7.669188396814e-03 1.469466661796e-02 8.169856119452e-02 -8.404895130043e-04 9.801649452000e-05 +8.663724803194e-02 1.391428641963e-02 -3.857778529326e-02 -7.451971842936e-04 8.133938135387e-05 +-8.482475898333e-02 1.320589571712e-02 -6.448384273347e-02 -6.713891409335e-04 5.780702929022e-05 +-4.233043743501e-02 1.256347805569e-02 -2.491275881111e-03 -6.374640647930e-04 3.031217678598e-05 +-8.980731074555e-02 1.186656060246e-02 2.476489977807e-02 -5.979888359967e-04 -7.453500946046e-06 +7.199362121134e-03 1.128811833206e-02 5.721275876690e-02 -5.990808893612e-04 -3.688345541154e-05 +2.461820678824e-02 1.073021060989e-02 7.145796735285e-03 -6.480356447050e-04 -6.137128159345e-05 +2.149095559170e-02 1.014746550312e-02 6.990228710022e-02 -7.157178183354e-04 -8.030064946866e-05 +1.644227809887e-01 9.397303378448e-03 2.504452246126e-03 -8.298788222332e-04 -1.014765614749e-04 +2.649986008396e-02 8.546719521990e-03 -8.302755866669e-02 -9.094572412759e-04 -1.161898574990e-04 +-1.632336344686e-03 7.499719233917e-03 2.376790650475e-02 -1.008503993144e-03 -1.302703187937e-04 +7.403567309346e-02 6.426105353760e-03 2.946822373660e-02 -1.140765686802e-03 -1.275984564289e-04 +5.730411112851e-02 5.143347185659e-03 5.048464916234e-02 -1.265580433831e-03 -1.227847543138e-04 +1.750049714181e-01 3.798808927201e-03 -1.426994504185e-01 -1.374111747043e-03 -1.044757615147e-04 +-2.280947897085e-01 2.368123351090e-03 -3.074162294943e-02 -1.440197093271e-03 -7.710280186845e-05 +1.135217255193e-01 8.415899304672e-04 1.001092417782e-01 -1.487441788649e-03 -4.495557134202e-05 +-2.787630615215e-02 -6.673114152411e-04 5.383180031254e-02 -1.517800127825e-03 -2.703674753622e-06 +2.211853261443e-01 -2.184150667149e-03 -1.218733484475e-02 -1.485867930738e-03 4.220530234805e-05 +-5.225097584165e-02 -3.662696853503e-03 -6.937012311654e-02 -1.426136289029e-03 8.772338972017e-05 +8.244507991127e-02 -5.009541098246e-03 -8.289900808988e-02 -1.312555590375e-03 1.356078549604e-04 +-2.180489920214e-01 -6.291390298161e-03 -1.582717344794e-01 -1.142051333870e-03 1.740358765838e-04 +-2.340983890475e-01 -7.309557990208e-03 1.258596251792e-01 -9.398809606511e-04 2.139080195940e-04 +3.367025833693e-02 -8.123464395667e-03 7.471664078202e-02 -6.998943768298e-04 2.453347540179e-04 +-8.466510748345e-02 -8.629486740811e-03 2.299605656055e-02 -4.340677682499e-04 2.728687243369e-04 +7.966237145803e-02 -8.945677160208e-03 5.061594098714e-02 -1.351737777525e-04 2.836018835133e-04 +1.656677449083e-02 -8.926572944929e-03 -4.226128632719e-02 1.515114320346e-04 2.881387312061e-04 +-4.860201196352e-03 -8.646199693560e-03 -9.166375112951e-02 4.376389132607e-04 2.802720322942e-04 +-1.667607277682e-01 -8.040075187528e-03 -8.375363496694e-02 7.325626985783e-04 2.662896618261e-04 +-1.723674711302e-01 -7.118588893526e-03 7.349834220449e-02 9.764888467808e-04 2.477494553476e-04 +-1.976404335919e-02 -6.103414913619e-03 7.321441740866e-02 1.206531789981e-03 2.097314657150e-04 +-2.593863631290e-02 -4.780090324216e-03 2.811296973037e-02 1.388267033288e-03 1.745050643542e-04 +3.646189610155e-02 -3.321041131305e-03 1.979662176214e-02 1.538029061698e-03 1.327431498227e-04 +1.365460721137e-02 -1.779614560612e-03 -3.449136464717e-02 1.649944177026e-03 8.524549297859e-05 +-3.252083319279e-02 -1.072599235247e-04 -6.723833784757e-04 1.692942380497e-03 4.176070349082e-05 +1.230984045442e-02 1.601928314590e-03 7.334114138209e-02 1.705700239098e-03 -1.366975277530e-07 +1.141614495714e-01 3.334307212869e-03 3.628021251289e-02 1.677590529736e-03 -3.682304323863e-05 +8.487026548020e-02 5.021316286246e-03 1.450366573114e-02 1.634099719271e-03 -6.993903353842e-05 +1.431687810337e-01 6.653502532716e-03 -7.805107222934e-02 1.565087991453e-03 -9.698820165583e-05 +-7.123187897848e-02 8.077649959487e-03 4.749039441053e-03 1.433655085477e-03 -1.276622226738e-04 +1.526668599158e-01 9.366030176267e-03 3.082760374992e-02 1.305273037019e-03 -1.536945837682e-04 +-9.576671478635e-03 1.055860500188e-02 -8.113101915313e-02 1.139528982261e-03 -1.703408582119e-04 +-9.595178390504e-03 1.162269174427e-02 -4.482269174105e-02 9.670129060242e-04 -1.793990020440e-04 +-9.922205496074e-02 1.251373366359e-02 2.115039500771e-03 8.034898364966e-04 -1.845706120721e-04 +-5.365099388963e-03 1.317499990995e-02 9.044021707046e-02 6.142829014836e-04 -1.906627754985e-04 +8.165837918018e-02 1.372137567865e-02 -5.854836342987e-03 4.667372538508e-04 -1.886370956768e-04 +-1.707477207494e-02 1.422230012899e-02 -5.601421358070e-02 2.731021069033e-04 -1.732293757802e-04 +-3.037004798123e-02 1.444939513008e-02 2.787949562236e-02 1.372745668520e-04 -1.643193111938e-04 +3.868421916978e-02 1.447367059984e-02 -8.478233463705e-03 -3.748368495543e-05 -1.568139089197e-04 +-4.732651490864e-02 1.430390807415e-02 1.774284820574e-03 -1.614430379392e-04 -1.506480368073e-04 +4.223278881093e-02 1.408040373187e-02 2.302378221091e-02 -3.120449147848e-04 -1.349259757851e-04 +-1.278950486817e-03 1.363728847247e-02 1.257505973216e-02 -4.424130387693e-04 -1.241185399094e-04 +6.738290827524e-02 1.327682631581e-02 2.721653724353e-02 -5.588438056498e-04 -9.422484141409e-05 +5.315412400024e-02 1.271473917977e-02 2.071197015464e-02 -6.777411368939e-04 -7.028707376820e-05 +1.088068485845e-01 1.210447588166e-02 -3.860967712829e-03 -7.014652574349e-04 -4.190472716712e-05 +4.543218857458e-02 1.136072171457e-02 -4.708094577134e-02 -7.555296885010e-04 -1.861745831236e-05 +1.464495704184e-02 1.060523914016e-02 -3.013541676924e-02 -7.440005907336e-04 7.293895476548e-06 +-1.483864496390e-02 9.819467007056e-03 5.088443454834e-02 -7.344813496860e-04 3.125100781211e-05 +1.164138261385e-01 9.025295649688e-03 2.065421472225e-02 -7.143925408455e-04 5.236206446109e-05 +2.646978448059e-02 8.363858218752e-03 -1.087491933764e-01 -6.759878228046e-04 7.935496884205e-05 +-1.010845606143e-01 7.763231029892e-03 -2.141080609202e-02 -6.108189975973e-04 1.029807244452e-04 +-1.635182770344e-02 7.161136511464e-03 3.674560820994e-02 -5.173348088566e-04 1.149036500915e-04 +-2.759334419440e-02 6.819802388317e-03 -2.277157343257e-02 -3.673143317690e-04 1.339570215110e-04 +-6.189497456859e-02 6.473669526663e-03 -3.218272384718e-02 -2.368110121352e-04 1.358596170466e-04 +-9.195879188876e-02 6.347260860384e-03 1.815685275932e-02 -8.545372045127e-05 1.382338982027e-04 +-2.558126904995e-02 6.356573285953e-03 5.057903249850e-02 5.140265770673e-05 1.336315384006e-04 +9.199273108238e-03 6.519548772722e-03 5.371117688913e-02 1.953759482774e-04 1.240125697535e-04 +8.184108472831e-02 6.769255948798e-03 4.757219047974e-02 3.320074890046e-04 1.049976799073e-04 +1.043436540677e-01 7.098013714352e-03 -1.323753287223e-01 4.275612577544e-04 7.842797747803e-05 +-1.829095727162e-01 7.441147309866e-03 -7.935140073382e-02 4.859625317079e-04 4.242433920368e-05 +-5.435914739992e-02 7.920954928062e-03 6.369243296966e-02 4.928921020664e-04 1.139460048292e-05 +-5.552470677691e-02 8.398927644467e-03 3.958419633197e-02 5.142045988530e-04 -2.219307255537e-05 +2.480924526401e-02 8.846435111118e-03 7.182360140381e-02 4.597925251828e-04 -5.631237376197e-05 +8.812249603071e-02 9.303750559386e-03 -4.698959540118e-02 3.959452889208e-04 -8.301690448041e-05 +-6.916994553836e-02 9.673354595891e-03 5.137113983306e-02 2.860075661659e-04 -1.064713334235e-04 +1.908647756968e-01 9.908965122241e-03 9.436037301356e-02 1.694070795280e-04 -1.270717056157e-04 +1.195508004888e-01 1.002775722762e-02 -8.911165623861e-03 5.529637542302e-05 -1.410194996069e-04 +1.730424444491e-01 1.001463385270e-02 -1.065554124036e-01 -9.215866183908e-05 -1.477314732829e-04 +-9.356002431854e-02 9.833037745977e-03 -6.762401165258e-02 -2.512275951398e-04 -1.491350078657e-04 +3.779442114395e-02 9.474329770374e-03 3.977207289003e-02 -4.003497674297e-04 -1.460830907229e-04 +-1.401587853848e-02 9.025789312033e-03 -6.306360439385e-02 -5.435393017389e-04 -1.323926920493e-04 +-8.833278764374e-02 8.383646962718e-03 8.542959561939e-02 -6.700441571771e-04 -1.186118883189e-04 +1.568433127003e-01 7.623414567049e-03 3.590103578789e-03 -7.891915443544e-04 -1.008744801361e-04 +-8.115258048616e-02 6.731959786820e-03 4.577133398215e-02 -8.822432238888e-04 -8.315065588722e-05 +2.483859806646e-01 5.751109956936e-03 -1.925212991419e-02 -9.615106119688e-04 -6.504380930815e-05 +-1.196568403145e-01 4.777020857033e-03 -8.903569083813e-02 -9.888099700687e-04 -4.188103334688e-05 +7.031459898835e-02 3.705852369093e-03 9.596666606616e-03 -1.030011138909e-03 -2.525934559997e-05 +-1.004635071013e-01 2.686576031710e-03 -1.269020190611e-01 -1.036777293589e-03 -5.177048734541e-06 +-1.834894391338e-01 1.669226174896e-03 1.415913439030e-02 -1.031065203554e-03 1.191744389193e-05 +-7.214523832071e-02 6.650939962570e-04 6.435658187995e-02 -9.839755450828e-04 2.510179503877e-05 +-5.477627537394e-02 -3.074746653538e-04 -2.245531975766e-02 -9.491765812874e-04 3.480854505032e-05 +-1.170558778360e-01 -1.163573119579e-03 1.492045045969e-01 -9.085398495256e-04 4.782999453449e-05 +2.436327338198e-01 -2.025377017172e-03 1.906205185713e-02 -8.550853357215e-04 5.380611008136e-05 +-7.893177412177e-02 -2.844869735464e-03 -6.910278703910e-02 -8.029643516901e-04 5.699601636642e-05 +1.054271597416e-01 -3.371171744656e-03 5.730854756870e-02 -6.832898117679e-04 7.816667817721e-05 +3.568532101563e-02 -3.779549517942e-03 4.401999726641e-03 -5.505509926032e-04 1.021580742959e-04 +1.142311591949e-01 -4.012694963115e-03 1.877928565310e-02 -3.694223878525e-04 1.330426994769e-04 +7.324389232184e-02 -4.151171808349e-03 -8.463895919199e-02 -1.778172661223e-04 1.629569124774e-04 +-5.504675918911e-02 -4.046787693150e-03 -1.182857685290e-01 7.215804740346e-05 2.024392794934e-04 +-1.633276447361e-01 -3.565013171725e-03 -2.413322485119e-02 4.024277789583e-04 2.593589356927e-04 +-1.033132088915e-01 -2.734355225907e-03 1.207108580053e-01 7.344652713637e-04 3.274641987063e-04 +7.809407127448e-02 -1.632101370848e-03 -8.760669474301e-03 1.135473164828e-03 3.954948972672e-04 +-1.208345478401e-01 -1.442816628053e-05 -8.080024033537e-03 1.631715920812e-03 4.770846598401e-04 +6.193402320741e-02 2.064344638669e-03 4.585113901993e-02 2.206293004982e-03 5.598725735466e-04 +-2.913226980024e-02 4.750302836072e-03 -2.552259890320e-02 2.876295558873e-03 6.472691407509e-04 +1.088882540100e-02 8.223398885568e-03 6.232933058642e-02 3.626214120645e-03 7.446194594461e-04 +9.552639137260e-02 1.242401322887e-02 -7.742936745527e-03 4.504500291123e-03 8.362038811719e-04 +-4.597048090056e-03 1.750181805376e-02 -7.611364513107e-02 5.445997082885e-03 9.234907592416e-04 +-5.670089888954e-02 2.360270986618e-02 -2.127875489173e-02 6.494379309464e-03 1.007679621257e-03 +-4.715455787351e-02 3.082507214254e-02 3.694001176225e-02 7.579398966958e-03 1.086365698521e-03 +1.717912463497e-02 3.916172193076e-02 -2.445393348657e-04 8.759728990737e-03 1.148941992147e-03 +-4.764363654325e-02 4.871004038283e-02 -4.751071540588e-02 9.984717120917e-03 1.194415308512e-03 +-7.784230617679e-02 5.949172079031e-02 -1.378025829864e-02 1.122657801598e-02 1.217651520647e-03 +-7.520415314053e-02 7.146268091778e-02 -1.000483118612e-02 1.251002421727e-02 1.209915351644e-03 +-9.785196854903e-02 8.485058894022e-02 9.595137140726e-02 1.376777841374e-02 1.187780419285e-03 +1.166985896740e-01 9.937584709824e-02 -7.683755555629e-03 1.502376865200e-02 1.128371424661e-03 +-1.132194796603e-01 1.151702285398e-01 -3.027638451987e-02 1.614776563469e-02 1.046941138879e-03 +5.614582063426e-02 1.319765193185e-01 7.283693175017e-02 1.719334315493e-02 9.299583533409e-04 +3.245438384007e-02 1.498594294793e-01 3.602956877136e-02 1.810235853324e-02 7.937697384858e-04 +1.282049581770e-01 1.685860108839e-01 -9.804060628377e-03 1.884803399391e-02 6.335389505649e-04 +1.284626258331e-02 1.879966736699e-01 -1.761645197372e-02 1.945119961640e-02 4.531980676792e-04 +9.297205422953e-02 2.079229913729e-01 1.234467862729e-02 1.987121014111e-02 2.583693167320e-04 +3.753561983789e-02 2.281601981988e-01 -4.741000551627e-02 2.007604842249e-02 5.406217645732e-05 +-1.847956803011e-03 2.483124372121e-01 2.375010835743e-01 2.009029615810e-02 -1.694043253863e-04 +5.125377869864e-01 2.686148061724e-01 2.315871218596e-01 1.989225548091e-02 -3.685931987519e-04 +4.613262869162e-01 2.884976672112e-01 3.238174071326e-02 1.949952431767e-02 -5.675792472007e-04 +5.773012684129e-01 3.079400510909e-01 -4.521601708472e-02 1.891647057837e-02 -7.459053294134e-04 +3.708942527468e-01 3.265817161875e-01 -3.683424857368e-02 1.814171519112e-02 -9.130838110424e-04 +5.036327712656e-01 3.443943831472e-01 1.941971331671e-01 1.721127241711e-02 -1.053435758111e-03 +7.592885190810e-01 3.613186243123e-01 8.723125336616e-03 1.616077094223e-02 -1.157296804451e-03 +5.210790219388e-01 3.771645620310e-01 -1.795668727796e-01 1.500536319956e-02 -1.229522742435e-03 +4.001547735218e-01 3.918450881793e-01 2.820549822887e-02 1.381090486642e-02 -1.270459979156e-03 +5.774900183965e-01 4.052916508233e-01 3.132590132995e-02 1.261981146236e-02 -1.283225942097e-03 +4.628065761817e-01 4.174837885870e-01 -4.502613513866e-02 1.137310363056e-02 -1.269880722630e-03 +4.874377481192e-01 4.284895981131e-01 3.616813253004e-02 1.020350906129e-02 -1.228685800263e-03 +5.351428412417e-01 4.383346399485e-01 3.947122613496e-02 9.064362559528e-03 -1.164825436279e-03 +5.663802003891e-01 4.470513067512e-01 -6.347610975406e-02 7.999166124057e-03 -1.084939217950e-03 +4.081906217336e-01 4.546706059148e-01 -1.570309662054e-02 7.015513842376e-03 -9.977522676693e-04 +5.349740071481e-01 4.614968856025e-01 1.453107732675e-03 6.147210306977e-03 -8.905292217981e-04 +4.110968371990e-01 4.675387473744e-01 -2.218568568701e-02 5.387291748808e-03 -7.760163141727e-04 +4.906026357740e-01 4.728727365255e-01 2.381281334618e-02 4.742785704863e-03 -6.613204222428e-04 +4.587224638913e-01 4.775121588510e-01 -5.561642199975e-02 4.192548741383e-03 -5.581654147437e-04 +3.793697917745e-01 4.816945542440e-01 -1.689118333193e-02 3.742057559295e-03 -4.584777773702e-04 +4.249400972275e-01 4.854211101552e-01 9.450426207188e-02 3.364531019073e-03 -3.725266658193e-04 +5.683783159183e-01 4.888243950410e-01 7.535781219804e-02 3.071310663763e-03 -2.980893090735e-04 +5.756557216236e-01 4.920004597254e-01 -7.882265266589e-02 2.850664714367e-03 -2.345193314382e-04 +4.107330105865e-01 4.950212847406e-01 -8.712934659425e-02 2.740454228795e-03 -1.820098463547e-04 +4.013970284351e-01 4.979099230249e-01 3.834436660366e-02 2.617871727701e-03 -1.426575036430e-04 +4.874217437939e-01 5.006189929903e-01 2.031640164097e-02 2.539604340318e-03 -1.224971333539e-04 +4.420298317170e-01 5.032957724307e-01 4.346640447164e-02 2.482432287465e-03 -1.104592813604e-04 +5.743545527371e-01 5.058757604933e-01 7.860274948758e-02 2.438264190945e-03 -1.118618682777e-04 +5.992353306922e-01 5.084466822093e-01 -2.175549887224e-02 2.376664295483e-03 -1.181579262276e-04 +5.308435549927e-01 5.109589338535e-01 -1.115295634215e-01 2.323078895386e-03 -1.316205047988e-04 +3.761762038492e-01 5.134495680337e-01 8.205580167910e-02 2.254181603207e-03 -1.468942062142e-04 +6.949551583509e-01 5.159155265879e-01 8.850032021208e-02 2.175946904166e-03 -1.615597517154e-04 +5.531768442734e-01 5.180076086377e-01 -4.119483818578e-02 2.098405473696e-03 -2.020181796856e-04 +6.125654819793e-01 5.201126017259e-01 -8.986962110593e-02 2.003609540329e-03 -2.329424501225e-04 +3.734376020616e-01 5.220350769728e-01 -1.061073854668e-01 1.880476867733e-03 -2.673357536937e-04 +4.003507110457e-01 5.239279265385e-01 8.739406509658e-02 1.716429394092e-03 -2.890995913478e-04 +5.482257322547e-01 5.255103813415e-01 5.565409328125e-02 1.518008628130e-03 -3.184923362766e-04 +5.116588976082e-01 5.268451554409e-01 2.766304296466e-02 1.332395171078e-03 -3.477882359892e-04 +6.035518181840e-01 5.280553511535e-01 8.561800907283e-02 1.095448775286e-03 -3.642986343705e-04 +6.828949157539e-01 5.290091916374e-01 -1.036092261707e-01 8.167268546502e-04 -3.764883541977e-04 +3.963333658427e-01 5.296649851122e-01 -2.017093189072e-02 5.589131432569e-04 -3.864208972631e-04 +6.425530519724e-01 5.301239571963e-01 7.165399784376e-02 2.907180237443e-04 -3.849729832240e-04 +5.396413615302e-01 5.302652715749e-01 -6.412031313450e-02 1.645298656857e-05 -3.818160106555e-04 +5.143124257034e-01 5.301732013437e-01 -6.539071942301e-02 -2.309559423105e-04 -3.704160115690e-04 +4.088599226842e-01 5.298125280424e-01 7.410786681474e-02 -4.659194914434e-04 -3.549696578033e-04 +6.625281593329e-01 5.292600074501e-01 1.405953667627e-01 -7.037558944625e-04 -3.306383356067e-04 +6.900506562097e-01 5.284273574711e-01 1.111605056164e-02 -9.065045698517e-04 -3.071355189658e-04 +6.847602604562e-01 5.274588930204e-01 -9.945409402982e-02 -1.092246599695e-03 -2.754279040981e-04 +4.911424681501e-01 5.263085309052e-01 -7.265791117773e-02 -1.233036646847e-03 -2.428773529750e-04 +5.394444381008e-01 5.249907942108e-01 -4.741757927135e-02 -1.359659605733e-03 -2.120291954998e-04 +3.963073096074e-01 5.236008760206e-01 -5.560936001205e-02 -1.459812464482e-03 -1.786222201461e-04 +4.282257180767e-01 5.221433137735e-01 4.248584371751e-02 -1.513648133596e-03 -1.462690760818e-04 +4.812789970424e-01 5.205833474051e-01 1.459771209173e-01 -1.526943737005e-03 -1.218178805151e-04 +7.201799599112e-01 5.190036503559e-01 -1.769784809460e-02 -1.521139029595e-03 -1.016846972883e-04 +4.458833008532e-01 5.175429754163e-01 -1.585590909455e-01 -1.498952343238e-03 -7.695697890432e-05 +4.030617780201e-01 5.161968315753e-01 1.240626418000e-02 -1.432049723967e-03 -5.054349781534e-05 +4.706958292132e-01 5.147729627671e-01 1.961874174439e-02 -1.370464184102e-03 -4.030539073577e-05 +4.422992615089e-01 5.134742674758e-01 -1.483889286814e-02 -1.292410794682e-03 -3.020782292010e-05 +4.410180434769e-01 5.123152287685e-01 3.722186603915e-02 -1.162782284722e-03 -1.997481129022e-05 +5.167429935872e-01 5.111899967818e-01 6.201024192390e-02 -1.048652946425e-03 -1.865156394108e-05 +5.650385273247e-01 5.101789265201e-01 6.876272403755e-02 -9.477798269213e-04 -1.873294004116e-05 +6.542684416623e-01 5.092823642240e-01 -8.993361450944e-02 -8.745678293846e-04 -1.902035600424e-05 +3.851712983058e-01 5.083522361909e-01 -2.892339807514e-02 -7.711537341636e-04 -3.095224793877e-05 +5.964216455120e-01 5.075675486465e-01 6.658635057689e-02 -6.935313006891e-04 -3.857419291498e-05 +5.183439994596e-01 5.068264891550e-01 8.885366680933e-03 -6.209115101875e-04 -4.907669462911e-05 +6.141923788739e-01 5.062702258221e-01 -5.625390549142e-02 -5.712826818035e-04 -4.959000021621e-05 +4.058361884768e-01 5.057320106854e-01 -4.947937122921e-02 -5.264590047849e-04 -5.320135410227e-05 +5.152336364155e-01 5.052013302869e-01 5.091646380508e-02 -4.666223075741e-04 -6.052566908439e-05 +5.076691160869e-01 5.048015728640e-01 -6.182786892944e-02 -3.987431024253e-04 -6.130607066030e-05 +3.915778985566e-01 5.043386136983e-01 -8.259317336599e-03 -3.519765023263e-04 -7.161472204999e-05 +4.911504814137e-01 5.039354559177e-01 8.065287947979e-02 -2.944019158033e-04 -8.114911036268e-05 +5.528836575162e-01 5.036442749215e-01 -1.763445234772e-02 -2.857519227662e-04 -8.527957681756e-05 +4.558815767183e-01 5.032911770132e-01 1.232581747749e-02 -2.539212727165e-04 -9.833036651441e-05 +5.775352924712e-01 5.030743951976e-01 4.086433556034e-02 -2.230704329295e-04 -1.038696492764e-04 +5.376102478390e-01 5.028807112693e-01 -3.954353141528e-02 -2.048455557459e-04 -1.109294108045e-04 +4.984482296406e-01 5.027688862131e-01 -3.490294009740e-02 -1.952905581539e-04 -1.139058164436e-04 +4.678043676442e-01 5.024950383331e-01 4.141164471926e-04 -1.896728354013e-04 -1.322098651715e-04 +4.992764625350e-01 5.021727301955e-01 3.110024670897e-02 -2.106456189361e-04 -1.547878945143e-04 +5.300048610621e-01 5.017829125617e-01 -4.500071328271e-02 -2.661992078636e-04 -1.809331762857e-04 +4.092750359696e-01 5.013869573495e-01 -4.561742764466e-02 -3.683344623129e-04 -2.027453294330e-04 +4.387700057728e-01 5.009364237669e-01 4.970292799631e-02 -4.659459433282e-04 -2.217170467366e-04 +5.086808919622e-01 5.004786169599e-01 1.535794303108e-02 -5.808841565998e-04 -2.316301875072e-04 +4.694858918349e-01 4.998391083820e-01 -3.743597848595e-02 -7.171197955473e-04 -2.446272918009e-04 +4.338089349903e-01 4.990971728043e-01 3.820340350601e-02 -8.426562809655e-04 -2.521359910401e-04 +5.458926988470e-01 4.981050610706e-01 1.435174218779e-01 -9.621729259892e-04 -2.650865882816e-04 +7.208437787461e-01 4.971299004103e-01 -5.782558382578e-02 -1.103768863554e-03 -2.599242174542e-04 +4.302415311954e-01 4.959512008218e-01 -9.527986089258e-02 -1.265571293247e-03 -2.541818183473e-04 +5.302840569609e-01 4.946400938292e-01 1.632583735248e-01 -1.398231589104e-03 -2.422059753105e-04 +7.567582782450e-01 4.932307806350e-01 8.978112421007e-03 -1.513542589402e-03 -2.224367171070e-04 +5.482402818029e-01 4.917558613337e-01 -1.298572426704e-01 -1.594952392831e-03 -1.941898157809e-04 +4.970437929042e-01 4.901113214537e-01 -6.686602192044e-02 -1.661144038993e-03 -1.687807726314e-04 +4.145082379620e-01 4.884104925180e-01 -4.329721711495e-02 -1.691301514985e-03 -1.398695394356e-04 +4.104493586743e-01 4.866744468619e-01 -2.808090664285e-04 -1.679013255174e-03 -1.094524984184e-04 +4.139466198292e-01 4.850468762209e-01 -1.025283395563e-02 -1.664414580309e-03 -6.927785904642e-05 +3.899436907631e-01 4.833838749787e-01 3.202873601018e-02 -1.588562739087e-03 -3.547134004833e-05 +4.780040918495e-01 4.818357821857e-01 1.880908661737e-02 -1.487797267216e-03 1.894978253048e-07 +4.275618639978e-01 4.802929849351e-01 -1.054927871376e-02 -1.366953349079e-03 2.481406989115e-05 +4.569055344220e-01 4.789587372960e-01 8.522607450135e-02 -1.242101280621e-03 5.213083062453e-05 +5.980140130005e-01 4.778502363342e-01 -4.290711148239e-02 -1.044615485558e-03 8.013935633642e-05 +3.710913114572e-01 4.769253985077e-01 -6.367836689794e-02 -8.306882552365e-04 1.021128411108e-04 +4.706572792046e-01 4.762943747525e-01 1.071879212136e-02 -5.994866365982e-04 1.249799920679e-04 +3.925288956999e-01 4.758231349528e-01 -2.488263175625e-02 -3.527880910565e-04 1.357478575973e-04 +4.208920156921e-01 4.755092072567e-01 1.014814612155e-01 -1.139579617015e-04 1.332263505929e-04 +5.954918181309e-01 4.754923971967e-01 7.257652093847e-02 1.177969711131e-04 1.289366542810e-04 +5.660450575691e-01 4.757720940080e-01 2.230561906021e-02 3.864317650712e-04 1.227471987439e-04 +6.401030562514e-01 4.763212401725e-01 -6.067551223454e-02 6.401756349189e-04 1.128396312418e-04 +4.446940331000e-01 4.770697108650e-01 -1.379985825597e-01 8.594494075818e-04 9.497263274382e-05 +3.641058911319e-01 4.780939464754e-01 -8.175874537526e-02 1.072099362704e-03 7.753072984892e-05 +2.811765423495e-01 4.791800647298e-01 -4.226539607583e-02 1.229400173867e-03 4.535170886370e-05 +2.795750989802e-01 4.804709756755e-01 8.317699739164e-02 1.377575563374e-03 1.357231276992e-05 +4.475305371327e-01 4.818517049686e-01 1.434852908486e-01 1.456005772682e-03 -2.364552842860e-05 +5.665456806775e-01 4.833793369680e-01 1.396487710138e-03 1.527540340741e-03 -5.751318287478e-05 +4.503235125530e-01 4.849187117773e-01 6.410875526119e-03 1.565985347804e-03 -9.546486141383e-05 +5.793674317297e-01 4.865305093094e-01 1.565031345307e-02 1.574815203352e-03 -1.283094482687e-04 +4.816241394591e-01 4.881359541164e-01 9.782725575223e-03 1.545064866668e-03 -1.585512311785e-04 +5.989328828802e-01 4.896725308275e-01 -3.080774487281e-02 1.501636099871e-03 -1.877370153520e-04 +4.200086497135e-01 4.910654619430e-01 -3.548386752687e-02 1.440569002882e-03 -2.189585098563e-04 +5.279651478264e-01 4.924487116478e-01 7.450705194836e-02 1.313237947984e-03 -2.378212801712e-04 +5.690227536102e-01 4.937033701364e-01 6.385482047853e-02 1.191433925926e-03 -2.518790079902e-04 +6.556747887835e-01 4.947418363695e-01 -4.502540925036e-02 1.077311084044e-03 -2.674144244882e-04 +4.789719351095e-01 4.957611374771e-01 -7.448201879104e-02 9.400577968429e-04 -2.672992892072e-04 +5.067107512014e-01 4.966358986477e-01 2.411572378584e-02 7.931675165275e-04 -2.618573424693e-04 +5.272033826812e-01 4.973336262752e-01 1.633981026425e-03 6.274981881409e-04 -2.543163263907e-04 +5.099787132543e-01 4.979583544547e-01 -9.663162987187e-03 4.963106263370e-04 -2.374163147166e-04 +5.078770567068e-01 4.984482533786e-01 -4.935660138421e-03 3.805139403347e-04 -2.184865348960e-04 +5.001073929774e-01 4.988521068255e-01 -9.580420214561e-02 2.859512099701e-04 -1.957895873315e-04 +3.162686524156e-01 4.990873221654e-01 -8.319430196716e-02 2.067428501044e-04 -1.786886522125e-04 +3.337187890431e-01 4.993638170103e-01 1.483519229221e-01 1.682868400657e-04 -1.523629874622e-04 +6.129724982597e-01 4.995266637071e-01 1.062193367282e-01 1.359197212674e-04 -1.323467375097e-04 +5.461574624995e-01 4.995725772568e-01 2.263717307951e-03 1.229901221598e-04 -1.211380013601e-04 +6.174999328756e-01 4.997172296936e-01 -1.988877823032e-02 1.070836992570e-04 -1.026198657194e-04 +5.063799060389e-01 4.997405050480e-01 -1.384297245466e-01 9.374936085866e-05 -9.663469739300e-05 +3.406404837825e-01 4.997626881208e-01 -5.032881234843e-02 7.159567688815e-05 -9.418161397440e-05 +4.057222813420e-01 4.999546932107e-01 1.540116357363e-01 1.121908894473e-04 -8.228846312769e-05 +6.486637552550e-01 5.000464111831e-01 1.119541157546e-01 1.545107750352e-04 -8.463594752266e-05 +6.296305128512e-01 5.002359521033e-01 -7.882819105646e-02 2.044482542287e-04 -8.495266233291e-05 +4.910073731421e-01 5.003710657564e-01 -6.008370204867e-03 2.367090254436e-04 -9.568316286722e-05 +6.176137724414e-01 5.005895050672e-01 -8.431377633407e-02 2.348568547346e-04 -1.043317645777e-04 +3.223798204739e-01 5.008759001645e-01 -6.381155819097e-02 2.285897713380e-04 -1.110352141507e-04 +4.899906560595e-01 5.011631150466e-01 -8.012841501296e-03 2.005981205190e-04 -1.201249199392e-04 +3.063541374714e-01 5.014414858792e-01 1.779643864186e-02 1.686347498980e-04 -1.308556199591e-04 +5.255835333432e-01 5.016821051449e-01 8.729804218539e-02 1.582486311914e-04 -1.442438137079e-04 +4.809502218421e-01 5.017455495675e-01 2.274706752116e-02 1.104858650189e-04 -1.699310213209e-04 +5.710776683855e-01 5.017810059038e-01 3.290751202917e-02 2.363428322454e-05 -1.926302143048e-04 +5.467652459005e-01 5.018183988469e-01 1.588808141082e-03 -3.018832715785e-05 -2.076502075061e-04 +5.742552846677e-01 5.017359615642e-01 -1.909498443553e-02 -1.342687744006e-04 -2.229699800252e-04 +5.085752770294e-01 5.015092623515e-01 -6.573451899650e-02 -2.387536950684e-04 -2.382669988529e-04 +4.427862466747e-01 5.011762570367e-01 1.236643274878e-02 -3.905285538865e-04 -2.482621835721e-04 +5.333081425270e-01 5.007301689223e-01 2.926787939281e-02 -5.163265930385e-04 -2.520327395277e-04 +5.013220054603e-01 5.001255364784e-01 2.142907189589e-02 -6.444515818089e-04 -2.527972038384e-04 +5.761662863188e-01 4.993157770432e-01 9.164526253494e-03 -7.763886728023e-04 -2.540769611571e-04 +5.196510579673e-01 4.985177754889e-01 -9.656478563259e-02 -8.991310850387e-04 -2.381118336072e-04 +3.830367150536e-01 4.975354457345e-01 2.979921389653e-02 -1.018761984559e-03 -2.223697829012e-04 +5.792494857604e-01 4.964452019863e-01 8.518086699848e-02 -1.115508820295e-03 -2.023165154412e-04 +5.533984490505e-01 4.952579424016e-01 6.271910318497e-04 -1.197048236540e-03 -1.795122164146e-04 +5.805038678241e-01 4.940799957551e-01 -5.044957516810e-02 -1.231333840653e-03 -1.482668715120e-04 +4.524992987143e-01 4.927553304978e-01 4.332941067771e-02 -1.273195878786e-03 -1.249060215592e-04 +6.671626891795e-01 4.915168701122e-01 1.851264306214e-02 -1.293989800862e-03 -9.318296094764e-05 +4.895245848386e-01 4.903219277566e-01 -1.431159727684e-01 -1.266252121345e-03 -6.045277697736e-05 +3.809307436427e-01 4.889764027662e-01 -1.827436691218e-02 -1.209599864660e-03 -4.659463072649e-05 +4.529758510143e-01 4.877961362282e-01 -5.584113553130e-02 -1.123579683225e-03 -2.829801093227e-05 +2.692484725801e-01 4.867024845871e-01 -1.094350770901e-01 -1.009301164738e-03 -1.472505536182e-05 +2.341056968341e-01 4.858128312698e-01 2.086674402181e-01 -8.804514063529e-04 1.925921319064e-06 +6.865833530163e-01 4.849895346045e-01 1.257322131736e-01 -7.910678155805e-04 9.385747024283e-06 +4.855701231813e-01 4.842843178825e-01 -4.708360049439e-02 -6.769308369332e-04 1.175019832914e-05 +5.924161520275e-01 4.836032745402e-01 -3.620645387990e-02 -5.416906563363e-04 1.083002896530e-06 +4.131572154215e-01 4.830370613056e-01 -9.759740221334e-02 -4.269757311013e-04 -1.403196553234e-05 +3.972213476009e-01 4.826888316073e-01 4.657624752670e-02 -3.233126905477e-04 -2.317867087382e-05 +5.063097104749e-01 4.823743949830e-01 3.640252368075e-02 -2.240931838598e-04 -3.979669953217e-05 +4.700263949624e-01 4.822175218501e-01 8.646310700680e-03 -1.807607320060e-04 -5.098616974998e-05 +5.236023318763e-01 4.821094767337e-01 8.869320949721e-02 -1.127539825580e-04 -6.348939222716e-05 +6.474128139568e-01 4.821256806603e-01 -7.453224077923e-02 -7.454042141927e-05 -6.904792061769e-05 +3.745378503178e-01 4.820149379410e-01 -1.425577491402e-01 -4.620021274497e-05 -8.650713591108e-05 +3.622973156764e-01 4.820261828426e-01 1.542072908259e-01 -1.257615188892e-05 -9.355393273849e-05 +6.829524319697e-01 4.820033461929e-01 5.771005154990e-02 1.445340882876e-05 -1.021016576100e-04 +4.777174187762e-01 4.819233623083e-01 -9.649171895198e-02 5.938825117259e-06 -1.129791201637e-04 +4.899689940658e-01 4.818583600255e-01 -5.407996428894e-02 1.686625581986e-06 -1.195474722223e-04 +3.695574901983e-01 4.818952447264e-01 2.822799664986e-02 1.169689965562e-05 -1.148662280680e-04 +5.464249873655e-01 4.819062048518e-01 6.779350735027e-02 3.153544586280e-06 -1.101389396664e-04 +5.051445048988e-01 4.818746576975e-01 -7.604334893410e-02 6.997679213279e-06 -1.075502422093e-04 +3.943382894973e-01 4.818656311932e-01 4.090310905261e-02 1.263468441476e-05 -1.028100723675e-04 +5.869507230041e-01 4.818930905222e-01 2.718617788150e-02 4.647264592633e-05 -9.613363612649e-05 +4.487106452603e-01 4.818702850301e-01 -5.803999345862e-02 4.975763687435e-05 -9.580551376655e-05 +4.708707360868e-01 4.819821180780e-01 -7.575075257313e-03 6.438609683178e-05 -8.714984053759e-05 +4.335604947456e-01 4.819717814039e-01 6.955025115886e-02 8.348428575309e-05 -9.248919717028e-05 +6.099712384045e-01 4.820018899949e-01 -5.929763379802e-02 9.806532509896e-05 -9.861538227701e-05 +3.149652271496e-01 4.821616611749e-01 -8.407306974625e-02 1.460071611181e-04 -9.839078882329e-05 +4.418250989120e-01 4.822925611568e-01 1.248842767463e-01 1.452398082115e-04 -1.046522129164e-04 +5.647337806423e-01 4.823800486620e-01 -5.428777175810e-02 1.677304379883e-04 -1.177471807909e-04 +3.332495553958e-01 4.824884588833e-01 -2.525388009111e-02 1.426770183550e-04 -1.310553216170e-04 +5.142260204601e-01 4.826342242714e-01 1.078579513570e-01 1.020891530199e-04 -1.412920923230e-04 +5.489654581098e-01 4.827698634096e-01 7.046143957785e-02 7.530580747932e-05 -1.509331660037e-04 +6.551488996158e-01 4.828982315699e-01 -8.696998607218e-02 9.568250480287e-06 -1.579206428042e-04 +3.750254859654e-01 4.829153647288e-01 -8.663586583637e-02 -8.307019749973e-05 -1.686644230529e-04 +4.818771679430e-01 4.827121424725e-01 4.139608736885e-02 -1.331399355524e-04 -1.907377729190e-04 +4.578176607031e-01 4.825064168738e-01 -3.536716217223e-02 -2.263066035226e-04 -2.042808618899e-04 +4.111428435986e-01 4.822766343092e-01 5.095604593202e-02 -2.878619232637e-04 -2.095926060154e-04 +5.597297525672e-01 4.820871718466e-01 4.789129643097e-02 -3.566894056555e-04 -2.006548102345e-04 +5.069254364605e-01 4.816541460647e-01 -6.004627742057e-02 -4.709485081388e-04 -2.002608621860e-04 +4.396371977260e-01 4.811466611085e-01 4.102802461146e-02 -5.499050042769e-04 -1.942017801088e-04 +5.889814856834e-01 4.806303154006e-01 7.708830881385e-02 -6.077823503483e-04 -1.780201997671e-04 +5.938138153537e-01 4.799459287167e-01 -9.979933659433e-02 -6.718392520120e-04 -1.661336381074e-04 +3.893828124948e-01 4.792419962756e-01 -3.813928004785e-03 -6.861046480038e-04 -1.479989624151e-04 +5.861859593442e-01 4.785946185683e-01 5.867130626435e-02 -7.159236549561e-04 -1.194866943895e-04 +5.067254250235e-01 4.779478733037e-01 -1.393943486338e-01 -7.139143578618e-04 -8.778104721240e-05 +3.073972620765e-01 4.770931252800e-01 -5.737403535671e-02 -6.832627373795e-04 -7.347365529711e-05 +3.919773543101e-01 4.764644183237e-01 1.407747629987e-01 -6.226488440347e-04 -4.356165462519e-05 +5.889467880739e-01 4.758612816396e-01 3.056787684621e-02 -5.447589876689e-04 -1.801247634131e-05 +4.531131080025e-01 4.754439105305e-01 -7.565550554900e-02 -4.377228913232e-04 1.327065455230e-05 +4.376357769759e-01 4.751385466803e-01 -1.337579249415e-04 -2.685207424401e-04 4.050484641027e-05 +4.528455921526e-01 4.749702344167e-01 6.724568553288e-02 -9.471713613701e-05 6.260388820104e-05 +5.721271480417e-01 4.749289816357e-01 -5.974718298256e-02 6.013180964506e-05 7.671486499561e-05 +3.333512261875e-01 4.750388284189e-01 -2.164247686903e-02 2.613261259763e-04 8.289812113918e-05 +5.288421943036e-01 4.753923163325e-01 1.163515700237e-02 4.506128215959e-04 8.739568945541e-05 +3.566215401922e-01 4.759424544539e-01 -6.810542654902e-02 6.473937390461e-04 8.572048694734e-05 +3.926313412056e-01 4.766663769507e-01 1.615478965771e-01 8.255348998522e-04 7.606271715736e-05 +6.797173333464e-01 4.775558966496e-01 9.901779724768e-03 1.023708363498e-03 5.837665500504e-05 +4.124349006551e-01 4.787086914754e-01 -9.837219674682e-02 1.165266238100e-03 4.244165609971e-05 +4.829729398527e-01 4.799326704782e-01 -2.439833694886e-02 1.294470837172e-03 1.474061321216e-05 +3.636382267574e-01 4.813212796685e-01 -2.141989425362e-02 1.432866980658e-03 -1.448303997538e-05 +4.401331513455e-01 4.829100929147e-01 1.052911750200e-01 1.517805706621e-03 -3.898265364344e-05 +5.742205767973e-01 4.844523928718e-01 2.670118937917e-02 1.577584374966e-03 -7.542889500115e-05 +4.935355301039e-01 4.860136201872e-01 -1.004336378636e-01 1.600732785044e-03 -1.142923419257e-04 +3.733533010700e-01 4.876165122651e-01 -3.087464853091e-02 1.617839506138e-03 -1.496408734641e-04 +4.317862330420e-01 4.892160108138e-01 2.045830572360e-02 1.544486860189e-03 -1.807574592141e-04 +4.142699125172e-01 4.906981535975e-01 1.156058038354e-01 1.453466395593e-03 -2.127611728361e-04 +6.629978407129e-01 4.921062431134e-01 1.749330461561e-01 1.337060426068e-03 -2.385648985341e-04 +7.641360048294e-01 4.933709590660e-01 -1.580824310081e-01 1.183388073573e-03 -2.607047577341e-04 +3.468329786968e-01 4.944957794469e-01 -1.243841886523e-01 1.046746352142e-03 -2.765925411326e-04 +5.153676275248e-01 4.954763587470e-01 1.454889071353e-01 8.870693640912e-04 -2.850691627518e-04 +6.378107929675e-01 4.962994443855e-01 -5.315125872929e-02 7.104978589463e-04 -2.861028813833e-04 +4.090651100662e-01 4.969953562318e-01 -2.600927143368e-02 5.804359377419e-04 -2.774669417243e-04 +5.857922501001e-01 4.974285664047e-01 5.633599659817e-02 4.227501475869e-04 -2.713877095286e-04 +5.217371032626e-01 4.977973141472e-01 -1.869647588110e-02 2.598682266530e-04 -2.523653845881e-04 +5.483992983379e-01 4.979751886880e-01 -1.230113459881e-01 1.456829033993e-04 -2.333369936758e-04 +2.757144112864e-01 4.980028831386e-01 -2.016930196847e-04 2.295892319628e-05 -2.136988942279e-04 +5.479959122985e-01 4.980324207339e-01 8.439290434961e-02 -8.497811306652e-05 -1.835378198114e-04 +4.445002199856e-01 4.979705956483e-01 1.127018245133e-02 -1.456816007950e-04 -1.541907239285e-04 +5.705362772012e-01 4.977595010256e-01 1.166983007574e-01 -1.689420330784e-04 -1.342677356359e-04 +6.778968215004e-01 4.975976051616e-01 -1.279013860204e-02 -1.811832193313e-04 -1.104323219905e-04 +5.449559999971e-01 4.974218167656e-01 -1.717155449833e-01 -1.780794756881e-04 -9.071387161888e-05 +3.344657315337e-01 4.972994389186e-01 -4.518182146101e-02 -1.420058723231e-04 -7.212279982849e-05 +4.545923570751e-01 4.971958213588e-01 5.435487937811e-02 -7.328993400980e-05 -5.988687437203e-05 +4.431754902900e-01 4.972400749086e-01 9.447141820423e-03 -1.959489784598e-05 -4.460500223545e-05 +4.734866407159e-01 4.973111201215e-01 -2.234461370660e-02 7.581468993129e-05 -3.735738049511e-05 +3.984862628768e-01 4.974818435823e-01 2.018257762078e-02 1.430167155831e-04 -3.238850557406e-05 +5.138517959575e-01 4.977083483368e-01 3.310748162463e-02 2.162252059991e-04 -3.284290074324e-05 +4.647012261260e-01 4.978796397198e-01 -4.678649921415e-02 3.063020952805e-04 -4.741877623611e-05 +4.202787975292e-01 4.983056456941e-01 7.958522554889e-02 3.793345359058e-04 -4.908701038897e-05 +6.238716772238e-01 4.987056545313e-01 1.029049676436e-01 4.348471257114e-04 -5.963538243506e-05 +6.260887328164e-01 4.992601125642e-01 -6.590473441715e-02 4.868046338471e-04 -6.244251158350e-05 +4.920622083895e-01 4.997640303640e-01 -7.952000215669e-02 5.210214227961e-04 -7.307375497892e-05 +4.670487285030e-01 5.003199928016e-01 6.926885252066e-02 5.784502108426e-04 -8.177352359323e-05 +6.305999134308e-01 5.009436112378e-01 -2.532912152022e-02 6.167305422917e-04 -8.624427446212e-05 +4.163904854626e-01 5.015879268549e-01 -9.998674131757e-02 6.230491616381e-04 -8.920784138849e-05 +4.306264307957e-01 5.022558347524e-01 3.473945531693e-02 6.441008680529e-04 -8.990652149154e-05 +4.858693960964e-01 5.029356848279e-01 -6.265390876748e-03 6.591961866167e-04 -8.938976540822e-05 +4.180956490422e-01 5.035468746759e-01 4.800500872247e-02 6.998756142698e-04 -9.485119972434e-05 +5.818794135414e-01 5.041191928461e-01 6.145018994230e-02 7.333235909213e-04 -1.044368566696e-04 +5.409960289268e-01 5.049353859220e-01 -3.930211848836e-02 7.389890915602e-04 -9.487704943475e-05 +5.032751765646e-01 5.056297997978e-01 9.122180662469e-02 7.477402929892e-04 -9.733528318781e-05 +7.234396421762e-01 5.063856915189e-01 -4.391622457335e-02 7.938079411455e-04 -9.776893565723e-05 +4.154427274180e-01 5.071710111914e-01 -1.288906606563e-01 7.887148315614e-04 -9.941516615223e-05 +4.656583208636e-01 5.079942766570e-01 5.473820147534e-02 8.286048535651e-04 -1.019952976674e-04 +5.249191303686e-01 5.087961379158e-01 -5.171886572247e-02 8.344593333115e-04 -1.107336521908e-04 +3.622205894187e-01 5.096271577931e-01 -2.589935547907e-02 8.435991756229e-04 -1.208525304436e-04 +4.731204194105e-01 5.104556052554e-01 8.839737517315e-02 7.849163173285e-04 -1.336591108419e-04 +5.390153397650e-01 5.112519114306e-01 -1.057158217046e-02 7.749786643345e-04 -1.502520618035e-04 +4.519772550696e-01 5.120785652679e-01 -2.303861484257e-02 7.417047613407e-04 -1.640537347498e-04 +4.929381100798e-01 5.127763149543e-01 3.949430031339e-05 6.927343558312e-04 -1.860139399944e-04 +4.520562436702e-01 5.133829878097e-01 3.148073123620e-02 6.339379318852e-04 -2.104614131909e-04 +5.558995725522e-01 5.139500443654e-01 6.667166829578e-02 5.343831198976e-04 -2.301820710664e-04 +5.853995802618e-01 5.144871589727e-01 9.570320707945e-03 3.976785131788e-04 -2.412617931142e-04 +5.750402139681e-01 5.147648550337e-01 2.892995598797e-02 2.394813881207e-04 -2.601119182208e-04 +6.432594922377e-01 5.149262348658e-01 -2.810995522959e-02 7.652618508358e-05 -2.725657332558e-04 +5.188203035089e-01 5.149533005223e-01 -6.376137518407e-02 -8.071155105095e-05 -2.785504825344e-04 +5.157367418695e-01 5.148844295312e-01 -3.936884123191e-02 -2.372398970715e-04 -2.739301109175e-04 +4.400826210451e-01 5.145783544600e-01 5.747032386998e-02 -3.883108965387e-04 -2.702124791069e-04 +6.306773896095e-01 5.140645898834e-01 1.098321257208e-02 -5.602594274143e-04 -2.650386405833e-04 +4.620490461893e-01 5.134396804733e-01 -1.079931399245e-02 -7.165832651703e-04 -2.511447424357e-04 +6.090787616246e-01 5.126528662322e-01 -1.211692564298e-02 -8.203359963630e-04 -2.348903131442e-04 +4.378151949033e-01 5.117856186549e-01 -1.020102927086e-02 -9.003899351410e-04 -2.122290742782e-04 +5.886767030829e-01 5.108298179596e-01 6.156994710610e-02 -9.884047447710e-04 -1.864665475984e-04 +5.609550891155e-01 5.099029527037e-01 -7.589183700152e-02 -1.023778454697e-03 -1.510864732458e-04 +4.368930290798e-01 5.088378946926e-01 -1.954857160337e-02 -1.026403713742e-03 -1.239417608834e-04 +5.218579459088e-01 5.078693039045e-01 2.580144755866e-02 -1.018667045108e-03 -8.896627925366e-05 +4.884959241972e-01 5.068902618907e-01 -1.983110983890e-02 -9.844841763348e-04 -5.847123841946e-05 +4.821957262310e-01 5.059323342948e-01 -5.280853174917e-02 -9.185059448205e-04 -3.319163259681e-05 +3.828788606988e-01 5.050962351952e-01 3.853190654556e-02 -8.293142754582e-04 -7.705236196456e-06 +5.592595393221e-01 5.043509999661e-01 1.657134641743e-03 -6.870349694316e-04 1.258418014589e-05 +3.861931299823e-01 5.037160516589e-01 1.967453358197e-02 -5.463680137562e-04 2.714439689167e-05 +5.986086064860e-01 5.032737989233e-01 3.449612897018e-03 -3.870139978812e-04 4.146536730653e-05 +3.930923557763e-01 5.029537808215e-01 1.250126832502e-02 -1.842899264282e-04 4.822737660229e-05 +6.236111431361e-01 5.027911635944e-01 2.437955308998e-02 -5.162751107579e-05 5.019494284959e-05 +4.418514619563e-01 5.028611198097e-01 -4.923804988841e-02 1.199157050250e-04 5.386346124623e-05 +5.251350433593e-01 5.030476604622e-01 -6.582664488559e-02 2.883150647834e-04 4.940300204557e-05 +3.101981721851e-01 5.034980027983e-01 3.110722511720e-02 4.474746786010e-04 4.966570278254e-05 +5.873494935937e-01 5.041085750775e-01 1.553978231356e-01 6.277827177619e-04 4.647904583414e-05 +6.209938184563e-01 5.048007932302e-01 -3.639561421094e-02 7.882780300714e-04 3.401186274569e-05 +5.145582651718e-01 5.056552077570e-01 -4.868079770559e-02 9.203954451012e-04 2.038936012109e-05 +5.236322230451e-01 5.066452179425e-01 -9.436560868010e-03 1.048896393537e-03 4.767551901735e-06 +4.956851434358e-01 5.077925675629e-01 -2.397155694675e-03 1.163736339579e-03 -9.718814437748e-06 +5.188379116557e-01 5.089208290385e-01 -7.633207688219e-02 1.246117592108e-03 -3.605275568365e-05 +3.430209896714e-01 5.101756047512e-01 -3.476031673628e-02 1.324175294173e-03 -6.022612261970e-05 +4.493172781832e-01 5.115346056620e-01 1.028894415144e-01 1.387020273684e-03 -8.227740616211e-05 +5.487998727001e-01 5.128970962538e-01 9.348403866086e-02 1.426833889424e-03 -1.085130954060e-04 +6.362853555049e-01 5.142682499022e-01 -8.262938903161e-03 1.410174140502e-03 -1.358429248918e-04 +5.322739948938e-01 5.156680688697e-01 -1.370993287104e-01 1.382569512535e-03 -1.599219302493e-04 +3.620866980841e-01 5.170807081682e-01 -3.672092428325e-02 1.331466590546e-03 -1.796666503347e-04 +4.588321463273e-01 5.183035254376e-01 1.085566599856e-01 1.260277008513e-03 -2.094354884705e-04 +5.792000180553e-01 5.195731321666e-01 7.706541208000e-02 1.166080831860e-03 -2.268946605458e-04 +6.129629704873e-01 5.206182953075e-01 -5.572946656931e-02 1.048290480016e-03 -2.521424109708e-04 +4.677410849167e-01 5.216184029130e-01 3.501938785369e-02 8.977706653425e-04 -2.677036429491e-04 +6.830017461947e-01 5.223761846321e-01 3.188878695870e-02 7.376716377370e-04 -2.878664731175e-04 +5.315186588341e-01 5.230044172785e-01 -5.859288428056e-02 5.655220983275e-04 -3.014827412268e-04 +5.658159776336e-01 5.234884016135e-01 -1.749701291806e-02 3.671335008460e-04 -3.082097189928e-04 +4.965246329980e-01 5.237293016353e-01 -4.565592438340e-02 1.680244775122e-04 -3.152224671702e-04 +4.745041288668e-01 5.238083016593e-01 1.325948544355e-02 -3.089396271594e-05 -3.152937504394e-04 +5.230436038851e-01 5.236366365569e-01 7.291186069121e-02 -2.448830280603e-04 -3.156099626405e-04 +6.203278502492e-01 5.232570143986e-01 -1.340472761541e-02 -4.759186376873e-04 -3.125459241181e-04 +4.962341486542e-01 5.227300434373e-01 -2.484724082159e-02 -6.434445739970e-04 -3.020768612919e-04 +5.706333686060e-01 5.220535891545e-01 6.918716669473e-02 -8.291624829769e-04 -2.857607942556e-04 +6.346084820437e-01 5.210968565615e-01 -1.360598316828e-01 -9.859035834469e-04 -2.758261108981e-04 +2.985137052404e-01 5.200999909510e-01 -3.701814711504e-02 -1.139028552304e-03 -2.539417753635e-04 +5.605721878136e-01 5.188852798767e-01 8.962125671351e-02 -1.246192177444e-03 -2.370052354558e-04 +4.777562186674e-01 5.175563155228e-01 9.185212818326e-03 -1.376129589147e-03 -2.182726954283e-04 +5.789426134503e-01 5.161428373919e-01 9.317772882562e-02 -1.460019415586e-03 -1.972009882077e-04 +6.641116763187e-01 5.146510101408e-01 -4.210581655138e-02 -1.566844787203e-03 -1.752358056906e-04 +4.947309803475e-01 5.130164671940e-01 -1.074569629605e-01 -1.611404793681e-03 -1.597990474685e-04 +4.491977503977e-01 5.113423281705e-01 4.441176746246e-03 -1.634591308561e-03 -1.446271676323e-04 +5.036133338400e-01 5.096528578159e-01 5.375886363718e-02 -1.663768731299e-03 -1.292519196767e-04 +5.567154776721e-01 5.080307813102e-01 -7.747613103253e-02 -1.649845557537e-03 -1.084822783201e-04 +3.486610717749e-01 5.063802670037e-01 -2.821118121530e-02 -1.636627073786e-03 -9.202515265122e-05 +5.002931152415e-01 5.047022526024e-01 1.152460974671e-01 -1.617675504770e-03 -8.100131678396e-05 +5.791532667092e-01 5.031218773105e-01 1.022196623499e-02 -1.601852524905e-03 -6.597594204300e-05 +5.207370477115e-01 5.015876568475e-01 -9.537638895243e-02 -1.544375364144e-03 -5.250350224527e-05 +3.884004888043e-01 4.999643363167e-01 -6.082946629564e-04 -1.500176770234e-03 -5.285372055626e-05 +5.195204583855e-01 4.984089107889e-01 9.676213969409e-02 -1.433025737899e-03 -5.445066681058e-05 +5.819247681925e-01 4.970426247263e-01 -4.367312518408e-02 -1.352209799782e-03 -4.781938681134e-05 +4.321742080174e-01 4.958142244542e-01 1.229314489529e-02 -1.283090770206e-03 -3.754058440266e-05 +6.065110579831e-01 4.945776248378e-01 4.191359737483e-03 -1.209996825688e-03 -3.594036342890e-05 +4.405569274923e-01 4.933587711296e-01 -5.047476266394e-02 -1.128972215769e-03 -4.094639980879e-05 +5.055615326552e-01 4.922136820015e-01 -6.906900513135e-03 -1.048223535158e-03 -4.768303969625e-05 +4.267431264661e-01 4.911328468511e-01 -4.494584059489e-03 -1.007570886032e-03 -5.608128313858e-05 +4.965723645362e-01 4.900895768339e-01 2.753786057036e-02 -9.332920198079e-04 -6.765705327917e-05 +4.818188476068e-01 4.892042913258e-01 -2.318045505477e-02 -8.740045408734e-04 -7.176310361306e-05 +4.502114544267e-01 4.883358287528e-01 1.704162578612e-02 -8.241078498690e-04 -7.910976553370e-05 +5.159020991790e-01 4.875511397430e-01 -2.842336665854e-02 -7.840435290592e-04 -8.304514052855e-05 +3.933647211096e-01 4.867827765614e-01 -9.143166709608e-02 -7.586094378171e-04 -8.806549533375e-05 +3.330387649869e-01 4.860549588854e-01 1.270749580452e-01 -7.230130213026e-04 -9.124537459149e-05 +6.475146371999e-01 4.852976401400e-01 1.070041403717e-01 -6.893555192242e-04 -9.772440569559e-05 +5.470470457302e-01 4.845916991197e-01 -8.801061459083e-02 -6.795816984065e-04 -9.984491036580e-05 +4.714934080183e-01 4.839457567335e-01 1.161629307648e-02 -6.410219269491e-04 -9.652750310654e-05 +5.702796318832e-01 4.832543016530e-01 4.887478348733e-02 -6.104933599130e-04 -9.667032425702e-05 +5.692429749929e-01 4.826254062614e-01 -8.555516046937e-02 -6.363187575817e-04 -9.078660505650e-05 +3.991693109444e-01 4.819490479483e-01 -1.370645714953e-02 -6.117515510189e-04 -8.843299362826e-05 +5.418300606939e-01 4.813664599269e-01 -1.369181909692e-02 -5.802840096254e-04 -7.906710412584e-05 +3.717856727506e-01 4.807569416321e-01 -3.522708307967e-02 -5.376356253507e-04 -7.386125738273e-05 +4.713758945345e-01 4.802274334745e-01 5.906858304877e-02 -4.620052418794e-04 -6.542605775818e-05 +4.899228388481e-01 4.797821346177e-01 -2.966483768223e-02 -4.097007857011e-04 -5.474950529436e-05 +4.120462191701e-01 4.794327073043e-01 6.476387153753e-02 -3.448282379823e-04 -4.208707744821e-05 +6.194505819232e-01 4.791557636805e-01 3.405863211635e-02 -2.567444240866e-04 -3.105232612740e-05 +4.801634834028e-01 4.789931675840e-01 -1.159313016917e-01 -1.413909412281e-04 -1.983475762354e-05 +3.875879785399e-01 4.789955402694e-01 -2.831028111363e-02 -4.345698958809e-05 -5.340302879291e-06 +4.235429211755e-01 4.790055346305e-01 8.344444629555e-02 6.883203862118e-05 -1.473228359674e-06 +5.544768711310e-01 4.791365320546e-01 -7.017830068952e-02 2.017104288042e-04 4.379995964767e-07 +2.831863197965e-01 4.794145209667e-01 -7.598222112953e-02 3.282166362815e-04 2.299191406267e-06 +4.025124288719e-01 4.798474025965e-01 1.598687451548e-01 4.376788640971e-04 5.111844647620e-06 +6.029238101062e-01 4.803339567795e-01 9.818356251327e-02 5.579190757755e-04 8.356719721372e-07 +5.988795538985e-01 4.809020533406e-01 -5.880453449175e-02 6.748120502941e-04 -7.673683272414e-06 +4.853147411227e-01 4.816490087493e-01 -7.525739030302e-02 7.727992383781e-04 -1.131654972744e-05 +4.483647732924e-01 4.823600949665e-01 -1.114124473449e-02 8.618449545774e-04 -2.691011337185e-05 +4.630322516537e-01 4.832115784878e-01 -6.079034620211e-02 9.194423654619e-04 -3.844105255172e-05 +3.267840808882e-01 4.840934186409e-01 1.300953566098e-02 9.711323273382e-04 -5.382251242345e-05 +4.890513229757e-01 4.850756955527e-01 1.260448450622e-01 1.007900943893e-03 -6.615521457220e-05 +5.788737710127e-01 4.861047136017e-01 1.207773100246e-02 1.050344128897e-03 -7.906684010837e-05 +5.132067849806e-01 4.871914674634e-01 -1.613314001344e-02 1.083139591958e-03 -9.092655372846e-05 +5.466074909858e-01 4.882457029644e-01 -1.600838335766e-02 1.079643640428e-03 -1.081675629004e-04 +4.811900182653e-01 4.892912740453e-01 4.941947636336e-03 1.071989500494e-03 -1.276751609294e-04 +5.564913862584e-01 4.903728593588e-01 1.669932753139e-03 1.035548015092e-03 -1.445405658239e-04 +4.845298837715e-01 4.913994921712e-01 -5.857537326285e-02 9.659735216725e-04 -1.647162917299e-04 +4.393406397327e-01 4.923131262806e-01 6.228229688398e-02 9.274275608487e-04 -1.916873385853e-04 +6.090944775395e-01 4.931977765610e-01 1.129424228958e-02 8.487328148118e-04 -2.166405424577e-04 +4.619291243119e-01 4.940872687421e-01 -1.618587309358e-01 7.585317961319e-04 -2.342558075980e-04 +2.853770156680e-01 4.948033010708e-01 -1.917083250947e-02 6.485434217658e-04 -2.568900790462e-04 +4.235874592930e-01 4.953361281879e-01 1.148621130576e-01 4.980631670562e-04 -2.822697847596e-04 +5.151012417832e-01 4.957512130048e-01 1.181673642431e-02 3.028118513180e-04 -3.014029952294e-04 +4.472209321416e-01 4.959796449330e-01 3.642145550467e-02 1.233091850510e-04 -3.170748792225e-04 +5.879441527925e-01 4.959666610700e-01 1.251376363609e-02 -1.194882036656e-04 -3.308757665877e-04 +4.722484594138e-01 4.957154248889e-01 -3.140857420161e-02 -3.509704657138e-04 -3.398370926553e-04 +5.251270043893e-01 4.952273471540e-01 4.822010988108e-02 -5.850118292837e-04 -3.422586083941e-04 +5.686886791759e-01 4.945863025991e-01 6.494556320554e-02 -8.089109824400e-04 -3.303221568803e-04 +6.550181308004e-01 4.936713894667e-01 1.613293698125e-02 -9.923445047501e-04 -3.146936422312e-04 +6.009545531384e-01 4.925749673411e-01 -8.047753345168e-02 -1.185074313843e-03 -2.890901347712e-04 +4.940630638970e-01 4.913379101974e-01 -1.630703752413e-02 -1.355323916721e-03 -2.524476641095e-04 +5.683404780902e-01 4.900125969866e-01 3.065528681827e-02 -1.459734529033e-03 -2.045940345336e-04 +5.553736375336e-01 4.885141385321e-01 -2.405140807199e-02 -1.514924339160e-03 -1.580503965823e-04 +5.202376619462e-01 4.870371341364e-01 -3.317074659668e-02 -1.559545432469e-03 -1.022243884859e-04 +4.890321443402e-01 4.854546506270e-01 -3.351258302977e-02 -1.551049708053e-03 -5.389472158972e-05 +4.532124958866e-01 4.839194617056e-01 1.589261568590e-03 -1.450821951717e-03 -7.436568239734e-06 +4.922106674774e-01 4.825664818922e-01 -6.464864986406e-02 -1.288243137609e-03 4.130211449562e-05 +3.239151961585e-01 4.813622326003e-01 -7.854484565314e-02 -1.112610978720e-03 8.351224609704e-05 +3.351209761711e-01 4.803825540973e-01 5.771571819289e-03 -8.971654175746e-04 1.203659701254e-04 +3.354583397971e-01 4.796456731016e-01 3.494799293173e-02 -6.432917345606e-04 1.488820676228e-04 +4.050169620346e-01 4.792038880995e-01 7.900618409390e-02 -3.843136826066e-04 1.703393136007e-04 +4.934707079849e-01 4.789248417852e-01 6.339773331269e-02 -1.085263902491e-04 1.720475518939e-04 +5.318124286600e-01 4.790085571593e-01 -5.919905554842e-02 2.079438638162e-04 1.699917010298e-04 +3.750725968881e-01 4.793741567059e-01 -4.983211026782e-02 4.958623719699e-04 1.582907743953e-04 +4.321482081243e-01 4.799389222567e-01 4.384955898408e-02 7.504748609509e-04 1.326476926319e-04 +4.627717148562e-01 4.807458455106e-01 -1.776895006870e-02 9.632525456552e-04 1.002964626199e-04 +3.966103079869e-01 4.818260500450e-01 4.596991205050e-02 1.178799505560e-03 6.777055933679e-05 +5.547115389572e-01 4.831645037190e-01 6.797850233365e-02 1.364020596655e-03 3.794447596958e-05 +5.325673126542e-01 4.846705952648e-01 6.927731428719e-02 1.509378993425e-03 7.838106704748e-06 +6.932661675316e-01 4.862098981609e-01 3.279348393312e-02 1.629753814198e-03 -2.934517015925e-05 +5.981542805205e-01 4.879577449707e-01 -1.179770219029e-01 1.716778420758e-03 -5.489229977959e-05 +4.573121237258e-01 4.897634117211e-01 -8.234409011624e-02 1.739789086556e-03 -7.743869929222e-05 +4.334661002880e-01 4.916088186322e-01 6.073771424593e-02 1.777299355138e-03 -9.561912052466e-05 +5.787875522177e-01 4.934097010835e-01 -5.192450409843e-02 1.795366680202e-03 -1.146090991943e-04 +3.296170920911e-01 4.951555310888e-01 -7.572159256405e-02 1.764181682163e-03 -1.333442214992e-04 +4.273443670896e-01 4.968650588228e-01 5.349315538511e-02 1.745006191066e-03 -1.491183919043e-04 +4.366034028614e-01 4.985489575875e-01 6.712968709222e-02 1.689288724264e-03 -1.604801669630e-04 +5.616037412740e-01 5.001719255199e-01 7.436448520011e-02 1.633810431014e-03 -1.700752827515e-04 +5.853323732616e-01 5.017662568763e-01 -4.804980322549e-02 1.587727817364e-03 -1.756244172567e-04 +4.655041348231e-01 5.033242937386e-01 -5.131066847580e-02 1.557997401946e-03 -1.785234195914e-04 +4.827110363100e-01 5.048573968535e-01 9.229080594936e-02 1.517555750600e-03 -1.784948688625e-04 +6.500857467218e-01 5.063470076556e-01 2.635989017352e-02 1.455412838320e-03 -1.774099710946e-04 +5.354308166570e-01 5.077143232216e-01 -9.819216488431e-02 1.390643821970e-03 -1.821409660994e-04 +4.537014169532e-01 5.090785702267e-01 -9.688393763372e-02 1.337155212193e-03 -1.831576386774e-04 +3.416629413896e-01 5.104281663087e-01 3.469554949778e-02 1.287088543820e-03 -1.817437313876e-04 +5.230925159487e-01 5.117193996486e-01 1.556988772121e-01 1.229246366112e-03 -1.815291807913e-04 +6.530606958138e-01 5.128982223911e-01 -1.928571556483e-02 1.147631084848e-03 -1.865226246647e-04 +4.845210848191e-01 5.139570154460e-01 -6.518530027358e-02 1.057065140668e-03 -1.965644567602e-04 +5.226900952666e-01 5.150038311603e-01 3.619717899524e-02 9.469753608559e-04 -2.016389710863e-04 +5.569154428095e-01 5.158554565850e-01 -9.743388209806e-04 8.081896272213e-04 -2.156474591429e-04 +5.207414176247e-01 5.166840485554e-01 -7.661500431708e-02 6.908051028360e-04 -2.230409969010e-04 +4.036854341754e-01 5.174065606484e-01 7.352315253931e-02 5.841392549445e-04 -2.298776229833e-04 +6.677877227033e-01 5.179586886587e-01 7.147387209858e-02 4.707752128454e-04 -2.403645045292e-04 +5.466331783725e-01 5.183183412443e-01 -1.401400886316e-01 3.333026343851e-04 -2.548196614237e-04 +3.875075454402e-01 5.185917801404e-01 -1.018868839920e-01 1.683189194940e-04 -2.626943576114e-04 +3.428594103886e-01 5.187015011260e-01 9.298736631223e-02 8.860363341912e-06 -2.692351044151e-04 +5.734822780646e-01 5.186312914809e-01 1.556588812835e-01 -1.551972034160e-04 -2.749969242127e-04 +6.541771729556e-01 5.184100124848e-01 2.080776679033e-02 -3.323218314437e-04 -2.768095019560e-04 +6.150978116453e-01 5.179985700053e-01 -6.638034868002e-02 -4.823464078476e-04 -2.777500553343e-04 +5.214164755956e-01 5.173626864123e-01 1.861253759401e-02 -6.581167912615e-04 -2.806200130854e-04 +6.523228868333e-01 5.165543593734e-01 -1.881150950795e-02 -8.022310536871e-04 -2.812933000856e-04 +4.837934565797e-01 5.156091456904e-01 -2.224819303970e-03 -9.619798387019e-04 -2.773726832957e-04 +6.478732482254e-01 5.144857172793e-01 3.269193061353e-02 -1.150993317083e-03 -2.725257053434e-04 +5.491773178068e-01 5.133048982947e-01 -1.469783916998e-01 -1.301276291940e-03 -2.576282472400e-04 +3.539164648257e-01 5.119484383263e-01 -4.155808272027e-02 -1.416862354049e-03 -2.443182364881e-04 +4.660611523662e-01 5.105141179403e-01 1.423568568713e-02 -1.558497038387e-03 -2.256817778168e-04 +3.823878362000e-01 5.089982158601e-01 -2.221105677268e-02 -1.646918411971e-03 -2.035489567188e-04 +4.216390388209e-01 5.073405099434e-01 7.094568852817e-02 -1.729893992406e-03 -1.848237504653e-04 +5.242792132563e-01 5.055669964626e-01 9.689302398583e-02 -1.781485914644e-03 -1.689628080194e-04 +6.154250867925e-01 5.037145272519e-01 3.220122261394e-02 -1.822388188365e-03 -1.545126759181e-04 +5.886816584842e-01 5.019028145871e-01 -5.645315800007e-02 -1.850003553531e-03 -1.329414550556e-04 +5.025187707924e-01 5.001012983569e-01 -8.389231473884e-02 -1.844206481789e-03 -1.085878253705e-04 +4.208970290065e-01 4.981921885289e-01 2.677313735325e-02 -1.817661180515e-03 -9.320742509971e-05 +5.560650454989e-01 4.963330937613e-01 9.906493426622e-02 -1.793365364655e-03 -7.521735214237e-05 +6.190268975390e-01 4.945193659657e-01 9.954211373285e-03 -1.763928734587e-03 -5.647846170005e-05 +5.759734682455e-01 4.929125831164e-01 -9.608933496405e-02 -1.688364448161e-03 -2.560624823031e-05 +4.268482276109e-01 4.912722280907e-01 -1.002111185184e-01 -1.583114746516e-03 -5.168184090829e-06 +3.755512312087e-01 4.896820488650e-01 6.836688848916e-03 -1.451143424378e-03 9.522887464534e-06 +4.405216053087e-01 4.882986105245e-01 -5.585632091721e-02 -1.318048250269e-03 2.953541611263e-05 +2.638385893743e-01 4.870708102143e-01 5.058525557711e-02 -1.154407631661e-03 4.851850629556e-05 +5.416921164629e-01 4.860289107208e-01 1.815789054742e-01 -9.619011028865e-04 6.664855681415e-05 +6.269964003227e-01 4.851808934953e-01 7.156599013982e-03 -7.615234336351e-04 8.256156608184e-05 +5.560053144909e-01 4.845212738040e-01 -1.048696081831e-01 -5.758073490492e-04 9.437843941655e-05 +4.172571839565e-01 4.840553365128e-01 -6.159687316647e-02 -3.271450304407e-04 1.008602859311e-04 +4.328115681579e-01 4.838319668879e-01 3.449450020719e-02 -9.989783368443e-05 1.048118762360e-04 +4.862461843709e-01 4.838522850888e-01 1.823647013341e-02 1.020645570638e-04 1.062753092506e-04 +4.692845084248e-01 4.840889442801e-01 -1.547809557092e-02 2.980432089655e-04 1.031743084465e-04 +4.552899932291e-01 4.844435129896e-01 3.721228074960e-02 5.113206492165e-04 8.759471301796e-05 +5.437090699240e-01 4.849764347765e-01 -4.793959564328e-02 7.150751747344e-04 6.549217015035e-05 +3.594108019425e-01 4.857142560009e-01 -2.798501464340e-02 8.909693162395e-04 4.094103741403e-05 +4.877390406372e-01 4.866457674790e-01 3.687968253372e-02 1.031012840181e-03 1.551651935680e-05 +4.331701670099e-01 4.876611181367e-01 -1.026411816566e-01 1.157056621027e-03 -1.721624679688e-05 +2.824566773241e-01 4.888409490464e-01 6.132298546076e-02 1.232150070844e-03 -4.732379421819e-05 +5.558161379315e-01 4.900266371829e-01 1.530519655589e-01 1.292451490258e-03 -8.459304284016e-05 +5.885606084419e-01 4.912861680821e-01 -4.094634902063e-02 1.305074340489e-03 -1.197498989644e-04 +4.739234398902e-01 4.926045454470e-01 3.587500894522e-02 1.262358744074e-03 -1.499928882443e-04 +6.603106263323e-01 4.938281583735e-01 2.372963470607e-02 1.200200940628e-03 -1.843953365850e-04 +5.213827093023e-01 4.949998845065e-01 -7.103590762764e-02 1.095406660243e-03 -2.157887568107e-04 +5.182388110771e-01 4.960383827290e-01 -3.284006264524e-02 9.635825948743e-04 -2.473932357636e-04 +4.557025840119e-01 4.968959371884e-01 8.164736762583e-03 8.114707106764e-04 -2.799799334712e-04 +5.345682846022e-01 4.975557534089e-01 7.607287745704e-02 6.375764824487e-04 -3.119488625535e-04 +6.078483389259e-01 4.980351348267e-01 -4.327723737796e-02 4.310746519393e-04 -3.389574634430e-04 +4.480138098463e-01 4.983234342144e-01 -1.046426631079e-01 1.909680220185e-04 -3.591836280627e-04 +3.985630127102e-01 4.983889119982e-01 -4.119868560246e-02 -7.561436769295e-05 -3.729723879935e-04 +3.656164386414e-01 4.981373050847e-01 1.317702649205e-01 -3.402970748995e-04 -3.865599642805e-04 +6.621035425512e-01 4.975944726788e-01 7.491218543652e-02 -6.095674116247e-04 -3.966662341506e-04 +5.154408095144e-01 4.967923831057e-01 -9.889696285946e-02 -8.904016328049e-04 -3.997180681217e-04 +4.643096168323e-01 4.957576977524e-01 -1.174665290180e-02 -1.186611060539e-03 -3.929267079075e-04 +4.919475037108e-01 4.944477808560e-01 4.234347274537e-02 -1.478870623182e-03 -3.799331918944e-04 +5.489965623230e-01 4.928315791344e-01 5.582848765563e-02 -1.749285101234e-03 -3.642457964425e-04 +6.036044790221e-01 4.910114827838e-01 5.610601004413e-03 -2.019477164603e-03 -3.386695574289e-04 +5.602177643318e-01 4.888436048250e-01 -8.677902077242e-02 -2.234097424520e-03 -3.173661919824e-04 +4.300464374773e-01 4.864446895970e-01 3.549410074085e-02 -2.416196512038e-03 -2.934632424295e-04 +6.312059658135e-01 4.838997037326e-01 4.578635206015e-02 -2.579139771401e-03 -2.627993842353e-04 +5.216191415975e-01 4.812531298806e-01 -9.641496569592e-02 -2.723763322244e-03 -2.249108376355e-04 +4.383760344217e-01 4.784760592091e-01 -8.324310717584e-02 -2.828131635023e-03 -1.860399488934e-04 diff -Nru gsl-2.4+dfsg/doc/examples/gaussfilt.c gsl-2.5+dfsg/doc/examples/gaussfilt.c --- gsl-2.4+dfsg/doc/examples/gaussfilt.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/gaussfilt.c 2018-05-11 20:22:06.000000000 +0000 @@ -0,0 +1,80 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 500; /* length of time series */ + const size_t K = 51; /* window size */ + const double alpha[3] = { 0.5, 3.0, 10.0 }; /* alpha values */ + gsl_vector *x = gsl_vector_alloc(N); /* input vector */ + gsl_vector *y1 = gsl_vector_alloc(N); /* filtered output vector for alpha1 */ + gsl_vector *y2 = gsl_vector_alloc(N); /* filtered output vector for alpha2 */ + gsl_vector *y3 = gsl_vector_alloc(N); /* filtered output vector for alpha3 */ + gsl_vector *k1 = gsl_vector_alloc(K); /* Gaussian kernel for alpha1 */ + gsl_vector *k2 = gsl_vector_alloc(K); /* Gaussian kernel for alpha2 */ + gsl_vector *k3 = gsl_vector_alloc(K); /* Gaussian kernel for alpha3 */ + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + gsl_filter_gaussian_workspace *gauss_p = gsl_filter_gaussian_alloc(K); + size_t i; + double sum = 0.0; + + /* generate input signal */ + for (i = 0; i < N; ++i) + { + double ui = gsl_ran_gaussian(r, 1.0); + sum += ui; + gsl_vector_set(x, i, sum); + } + + /* compute kernels without normalization */ + gsl_filter_gaussian_kernel(alpha[0], 0, 0, k1); + gsl_filter_gaussian_kernel(alpha[1], 0, 0, k2); + gsl_filter_gaussian_kernel(alpha[2], 0, 0, k3); + + /* apply filters */ + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha[0], 0, x, y1, gauss_p); + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha[1], 0, x, y2, gauss_p); + gsl_filter_gaussian(GSL_FILTER_END_PADVALUE, alpha[2], 0, x, y3, gauss_p); + + /* print kernels */ + for (i = 0; i < K; ++i) + { + double k1i = gsl_vector_get(k1, i); + double k2i = gsl_vector_get(k2, i); + double k3i = gsl_vector_get(k3, i); + + printf("%e %e %e\n", k1i, k2i, k3i); + } + + printf("\n\n"); + + /* print filter results */ + for (i = 0; i < N; ++i) + { + double xi = gsl_vector_get(x, i); + double y1i = gsl_vector_get(y1, i); + double y2i = gsl_vector_get(y2, i); + double y3i = gsl_vector_get(y3, i); + + printf("%.12e %.12e %.12e %.12e\n", xi, y1i, y2i, y3i); + } + + gsl_vector_free(x); + gsl_vector_free(y1); + gsl_vector_free(y2); + gsl_vector_free(y3); + gsl_vector_free(k1); + gsl_vector_free(k2); + gsl_vector_free(k3); + gsl_rng_free(r); + gsl_filter_gaussian_free(gauss_p); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/gaussfilt.txt gsl-2.5+dfsg/doc/examples/gaussfilt.txt --- gsl-2.4+dfsg/doc/examples/gaussfilt.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/gaussfilt.txt 2018-05-11 20:28:10.000000000 +0000 @@ -0,0 +1,553 @@ +8.824969e-01 1.110900e-02 1.928750e-22 +8.911879e-01 1.580862e-02 9.720985e-21 +8.996046e-01 2.217477e-02 4.175010e-19 +9.077375e-01 3.065989e-02 1.527980e-17 +9.155777e-01 4.178575e-02 4.765305e-16 +9.231163e-01 5.613476e-02 1.266417e-14 +9.303448e-01 7.433302e-02 2.867975e-13 +9.372549e-01 9.702370e-02 5.534610e-12 +9.438387e-01 1.248303e-01 9.101471e-11 +9.500886e-01 1.583100e-01 1.275408e-09 +9.559975e-01 1.978987e-01 1.522998e-08 +9.615584e-01 2.438505e-01 1.549753e-07 +9.667648e-01 2.961764e-01 1.343812e-06 +9.716108e-01 3.545875e-01 9.929504e-06 +9.760905e-01 4.184491e-01 6.252150e-05 +9.801987e-01 4.867523e-01 3.354626e-04 +9.839305e-01 5.581096e-01 1.533811e-03 +9.872816e-01 6.307788e-01 5.976023e-03 +9.902479e-01 7.027177e-01 1.984109e-02 +9.928259e-01 7.716687e-01 5.613476e-02 +9.950125e-01 8.352702e-01 1.353353e-01 +9.968051e-01 8.911879e-01 2.780373e-01 +9.982016e-01 9.372549e-01 4.867523e-01 +9.992003e-01 9.716108e-01 7.261490e-01 +9.998000e-01 9.928259e-01 9.231163e-01 +1.000000e+00 1.000000e+00 1.000000e+00 +9.998000e-01 9.928259e-01 9.231163e-01 +9.992003e-01 9.716108e-01 7.261490e-01 +9.982016e-01 9.372549e-01 4.867523e-01 +9.968051e-01 8.911879e-01 2.780373e-01 +9.950125e-01 8.352702e-01 1.353353e-01 +9.928259e-01 7.716687e-01 5.613476e-02 +9.902479e-01 7.027177e-01 1.984109e-02 +9.872816e-01 6.307788e-01 5.976023e-03 +9.839305e-01 5.581096e-01 1.533811e-03 +9.801987e-01 4.867523e-01 3.354626e-04 +9.760905e-01 4.184491e-01 6.252150e-05 +9.716108e-01 3.545875e-01 9.929504e-06 +9.667648e-01 2.961764e-01 1.343812e-06 +9.615584e-01 2.438505e-01 1.549753e-07 +9.559975e-01 1.978987e-01 1.522998e-08 +9.500886e-01 1.583100e-01 1.275408e-09 +9.438387e-01 1.248303e-01 9.101471e-11 +9.372549e-01 9.702370e-02 5.534610e-12 +9.303448e-01 7.433302e-02 2.867975e-13 +9.231163e-01 5.613476e-02 1.266417e-14 +9.155777e-01 4.178575e-02 4.765305e-16 +9.077375e-01 3.065989e-02 1.527980e-17 +8.996046e-01 2.217477e-02 4.175010e-19 +8.911879e-01 1.580862e-02 9.720985e-21 +8.824969e-01 1.110900e-02 1.928750e-22 + + +1.339186081187e-01 -6.070493125425e-01 2.239349873726e-01 6.686289175208e-01 +4.581761628724e-02 -7.086638672628e-01 1.775996159801e-01 9.498404054028e-01 +1.720226022541e+00 -8.245219701383e-01 1.161862442933e-01 1.209594922857e+00 +2.453867129834e+00 -9.437690360386e-01 3.872998648548e-02 1.351442163044e+00 +3.451391761436e+00 -1.037140782454e+00 -5.478716622101e-02 1.299949983543e+00 +2.173889680433e+00 -1.134703560609e+00 -1.654348363323e-01 1.045266677505e+00 +-2.228256023004e-01 -1.237437128405e+00 -2.933055042800e-01 6.508268378924e-01 +-9.021057670296e-01 -1.343138636054e+00 -4.380236339223e-01 2.147792705380e-01 +-9.411970854632e-01 -1.495222756662e+00 -6.001690829276e-01 -1.854328314680e-01 +-4.764153994235e-02 -1.637749130671e+00 -7.775792833451e-01 -5.226678353009e-01 +-6.528933453213e-02 -1.781637748222e+00 -9.692755572326e-01 -8.079987482231e-01 +-1.361846243309e+00 -1.930273603246e+00 -1.173943753038e+00 -1.059689373754e+00 +-2.029826749318e+00 -2.066648068805e+00 -1.389558626196e+00 -1.286440780500e+00 +-1.848117971010e+00 -2.175008040515e+00 -1.613846909930e+00 -1.494016029216e+00 +-1.017067180669e+00 -2.290583582906e+00 -1.845754527356e+00 -1.697215318882e+00 +-1.565315652066e+00 -2.384959713176e+00 -2.082648212411e+00 -1.918348654150e+00 +-2.203347154760e+00 -2.446858416322e+00 -2.322078331445e+00 -2.173498714681e+00 +-2.196258623064e+00 -2.521503954927e+00 -2.563057400406e+00 -2.462192827137e+00 +-2.866112317442e+00 -2.607162938195e+00 -2.803638031757e+00 -2.770979816627e+00 +-3.693874648829e+00 -2.655151181545e+00 -3.040504881271e+00 -3.086634323094e+00 +-3.081374618468e+00 -2.718758966857e+00 -3.272803761337e+00 -3.406142807249e+00 +-3.448963028626e+00 -2.750478393504e+00 -3.497203587731e+00 -3.734530573136e+00 +-3.738456437745e+00 -2.756335953060e+00 -3.711414477380e+00 -4.073172482348e+00 +-4.655331108560e+00 -2.767818979076e+00 -3.913829249274e+00 -4.409769737866e+00 +-5.239136567358e+00 -2.783701288416e+00 -4.102120225411e+00 -4.718778051537e+00 +-5.174521277199e+00 -2.775896077214e+00 -4.273137079472e+00 -4.971344371386e+00 +-5.127777417426e+00 -2.771749499910e+00 -4.425034469660e+00 -5.148057294654e+00 +-5.878504396094e+00 -2.765624574186e+00 -4.555274734934e+00 -5.249919972829e+00 +-6.022737083459e+00 -2.773781917316e+00 -4.661710767281e+00 -5.304979107315e+00 +-4.547176286537e+00 -2.783625044889e+00 -4.741511349811e+00 -5.364959037747e+00 +-4.753655261457e+00 -2.807832165868e+00 -4.792752863391e+00 -5.485988392084e+00 +-5.014352540332e+00 -2.782612968365e+00 -4.811954079811e+00 -5.698069331607e+00 +-5.152570512223e+00 -2.712180256119e+00 -4.797773826966e+00 -5.981370354061e+00 +-7.695967729274e+00 -2.614374434295e+00 -4.749480982760e+00 -6.267361770366e+00 +-7.118549192565e+00 -2.542663408959e+00 -4.667584005347e+00 -6.466046922899e+00 +-7.154659055671e+00 -2.489888517259e+00 -4.551654769137e+00 -6.502368813716e+00 +-7.380831623831e+00 -2.429303895362e+00 -4.401280016514e+00 -6.341546197271e+00 +-6.665829406702e+00 -2.345532297905e+00 -4.217093869227e+00 -5.994516323951e+00 +-5.088562520160e+00 -2.258424361803e+00 -4.001301764787e+00 -5.507570520400e+00 +-5.480836381648e+00 -2.198584704729e+00 -3.756984997601e+00 -4.944506401559e+00 +-4.298065525855e+00 -2.121946613049e+00 -3.485733306718e+00 -4.366727459184e+00 +-2.504951838444e+00 -2.026870780451e+00 -3.190592860527e+00 -3.814681444014e+00 +-3.236297805750e+00 -1.891831514730e+00 -2.874612667443e+00 -3.296752260529e+00 +-3.866115487020e+00 -1.743391028298e+00 -2.542182557628e+00 -2.793544189031e+00 +-1.795420916217e+00 -1.592404763057e+00 -2.197620550529e+00 -2.278335052080e+00 +-2.698426923651e+00 -1.401937950089e+00 -1.844128055772e+00 -1.741330088670e+00 +-9.628813860394e-01 -1.236533730909e+00 -1.487212940488e+00 -1.200040761302e+00 +4.202074740873e-01 -1.049765129013e+00 -1.129517538614e+00 -6.884034367950e-01 +4.484083421036e-02 -8.715110105691e-01 -7.753376998318e-01 -2.342840450497e-01 +-2.594693653010e-01 -6.778633924510e-01 -4.274001878315e-01 1.572402469889e-01 +9.941018835254e-01 -4.464764349007e-01 -8.784792874812e-02 5.049173472051e-01 +7.202567042782e-01 -2.086944751338e-01 2.405341182491e-01 8.398393318263e-01 +6.739273228542e-01 8.889531232368e-02 5.578358038596e-01 1.190386144566e+00 +1.472909792962e+00 4.332963423032e-01 8.632897536179e-01 1.569585589700e+00 +2.012865682211e+00 8.129315704827e-01 1.156792027811e+00 1.967176988021e+00 +2.098716021157e+00 1.179350491252e+00 1.438151333358e+00 2.348741017839e+00 +3.454007241898e+00 1.531863328652e+00 1.708760894892e+00 2.664880480298e+00 +3.467858102729e+00 1.895990565284e+00 1.971080864819e+00 2.869868505346e+00 +4.219221797752e+00 2.271693031487e+00 2.227627972813e+00 2.941866135934e+00 +2.644312619546e+00 2.651284464904e+00 2.480818486744e+00 2.892948056943e+00 +2.406934366490e+00 3.009244966425e+00 2.732915144040e+00 2.763821064135e+00 +2.743424959118e+00 3.328452110180e+00 2.986690508853e+00 2.610648935920e+00 +2.663825286326e+00 3.632734628041e+00 3.245723685248e+00 2.494986096332e+00 +2.122953044027e+00 3.914664974200e+00 3.512763958692e+00 2.477296465679e+00 +7.425191012479e-01 4.152355431580e+00 3.789919013923e+00 2.605048966480e+00 +2.459070961522e+00 4.399146955367e+00 4.080485448186e+00 2.893429908871e+00 +2.877182765522e+00 4.616294943171e+00 4.384787931426e+00 3.312090816339e+00 +4.402139352969e+00 4.769934255557e+00 4.702383743835e+00 3.793169674932e+00 +5.088615684241e+00 4.918224077972e+00 5.033816062949e+00 4.259439176601e+00 +4.500059713384e+00 5.076111257795e+00 5.377430946295e+00 4.655714603310e+00 +5.816807622764e+00 5.215954455545e+00 5.729829882331e+00 4.968052556583e+00 +4.983823477935e+00 5.404469976316e+00 6.088995490134e+00 5.228023160031e+00 +5.757783775313e+00 5.562731818754e+00 6.448331936942e+00 5.506599662134e+00 +4.954268368849e+00 5.698564176239e+00 6.802582036849e+00 5.898732757387e+00 +4.868838093827e+00 5.863440496573e+00 7.146870811635e+00 6.495728856143e+00 +6.365035989067e+00 6.043424798965e+00 7.474363914164e+00 7.348029265534e+00 +6.762802782586e+00 6.191841916238e+00 7.777449489628e+00 8.432633291626e+00 +1.010123264945e+01 6.352950446917e+00 8.051046512343e+00 9.644808846243e+00 +1.190216767581e+01 6.550720041773e+00 8.290389862232e+00 1.082422101753e+01 +1.365844628642e+01 6.772724934204e+00 8.491163248720e+00 1.180508189712e+01 +1.432591994604e+01 6.978542246304e+00 8.649637500801e+00 1.246380993813e+01 +1.327575184119e+01 7.169509457143e+00 8.764414632385e+00 1.274100159350e+01 +1.360512237744e+01 7.313063717087e+00 8.834960207243e+00 1.263578554697e+01 +1.406020341590e+01 7.431193356530e+00 8.863725097946e+00 1.218966064086e+01 +1.171319609542e+01 7.528588371676e+00 8.854418593120e+00 1.147545821406e+01 +1.109929685799e+01 7.680510651323e+00 8.814129954974e+00 1.059036812584e+01 +8.937496269310e+00 7.812189184697e+00 8.747491065200e+00 9.641908582205e+00 +7.936153149078e+00 7.918148861272e+00 8.661707504052e+00 8.723567734754e+00 +7.473885520818e+00 8.021989464721e+00 8.565266160831e+00 7.891929519877e+00 +6.656324459441e+00 8.137738548785e+00 8.466507998232e+00 7.162278563485e+00 +6.840716497645e+00 8.319190904972e+00 8.374526204808e+00 6.529035371439e+00 +6.445799521618e+00 8.475297928153e+00 8.294382827562e+00 5.998520795679e+00 +4.776242212647e+00 8.629951358986e+00 8.232825223891e+00 5.609051317510e+00 +3.831094369022e+00 8.743735462308e+00 8.193544042265e+00 5.419864834606e+00 +3.834664362508e+00 8.875947585491e+00 8.181188197081e+00 5.474781859900e+00 +4.990403828916e+00 9.012034602574e+00 8.196888330889e+00 5.769024065149e+00 +6.867835182982e+00 9.158632954484e+00 8.240846824444e+00 6.245942871291e+00 +6.980034113270e+00 9.327721467922e+00 8.312087847142e+00 6.825242436059e+00 +7.161247351020e+00 9.465004518813e+00 8.406620368808e+00 7.440494569726e+00 +8.439551801312e+00 9.621837887281e+00 8.522143484639e+00 8.061453675627e+00 +9.010609576921e+00 9.774011067640e+00 8.653962510208e+00 8.690516332677e+00 +8.539701847907e+00 9.915578391980e+00 8.797853737798e+00 9.336752981588e+00 +9.003060222708e+00 1.007394255366e+01 8.950702393371e+00 9.981551335442e+00 +1.102038532000e+01 1.018739166256e+01 9.107792659510e+00 1.055890825740e+01 +1.317009018593e+01 1.026263804078e+01 9.266685753640e+00 1.097100830688e+01 +1.279900686717e+01 1.031819580454e+01 9.425887705730e+00 1.113620345097e+01 +1.205471585264e+01 1.035213133242e+01 9.584218492408e+00 1.103702868062e+01 +1.077399199324e+01 1.039692041362e+01 9.741976133090e+00 1.073145373239e+01 +9.385327486748e+00 1.045105829917e+01 9.899602371256e+00 1.032027662127e+01 +9.002858899680e+00 1.050215872714e+01 1.005818723768e+01 9.900026951721e+00 +1.048417968866e+01 1.058869245036e+01 1.022030108959e+01 9.538361936534e+00 +9.152510915816e+00 1.069617883927e+01 1.038750452598e+01 9.281356100446e+00 +8.104228842110e+00 1.083494326811e+01 1.056207756328e+01 9.169208929532e+00 +7.960456473003e+00 1.099288674134e+01 1.074554659947e+01 9.233701155077e+00 +8.141314292285e+00 1.116851092234e+01 1.093954571855e+01 9.478557541846e+00 +1.047623381423e+01 1.141002567755e+01 1.114667027358e+01 9.868438512825e+00 +1.082793268590e+01 1.163682025278e+01 1.136578765422e+01 1.034438425356e+01 +1.119934407313e+01 1.185937888799e+01 1.159709958410e+01 1.085378841896e+01 +1.047823790038e+01 1.214373943696e+01 1.184158099371e+01 1.136727851767e+01 +1.220501966529e+01 1.247232041337e+01 1.209782664789e+01 1.187049826699e+01 +1.184161321013e+01 1.280699663415e+01 1.236359053435e+01 1.234616573907e+01 +1.374378616248e+01 1.311953720451e+01 1.263660604756e+01 1.277029157667e+01 +1.415136610369e+01 1.339536066091e+01 1.291482902486e+01 1.312861602057e+01 +1.314992360103e+01 1.362579170728e+01 1.319599383158e+01 1.343554306742e+01 +1.343590914317e+01 1.383535342875e+01 1.347847282361e+01 1.373277262463e+01 +1.309991732600e+01 1.402122830417e+01 1.376039268740e+01 1.406319499200e+01 +1.400719628167e+01 1.419580903019e+01 1.404058899156e+01 1.443920303210e+01 +1.532290997156e+01 1.437607827926e+01 1.431817020454e+01 1.483089421701e+01 +1.611720414236e+01 1.454968842671e+01 1.459186565333e+01 1.518346909503e+01 +1.572151811127e+01 1.469933257730e+01 1.486082447167e+01 1.545009012088e+01 +1.629424832483e+01 1.479837568927e+01 1.512421942176e+01 1.561647176652e+01 +1.565980315992e+01 1.490321989411e+01 1.538310378232e+01 1.570266966838e+01 +1.512438205027e+01 1.501859860201e+01 1.563715614895e+01 1.574586104879e+01 +1.588853740476e+01 1.515697124363e+01 1.588618696660e+01 1.578048300377e+01 +1.608157237947e+01 1.534436146467e+01 1.613034245229e+01 1.583063134768e+01 +1.562645817174e+01 1.551352918474e+01 1.636730546914e+01 1.591664915363e+01 +1.611552770065e+01 1.567284139771e+01 1.659651193562e+01 1.606446088502e+01 +1.564807418295e+01 1.583623871292e+01 1.681716079877e+01 1.630419649438e+01 +1.568905379985e+01 1.602840471962e+01 1.702823028026e+01 1.665634290816e+01 +1.619386413076e+01 1.622780500917e+01 1.722759525231e+01 1.711801509291e+01 +1.902022760786e+01 1.642791200453e+01 1.741345997261e+01 1.766290358868e+01 +1.835854912980e+01 1.659801979736e+01 1.758363680261e+01 1.825275854222e+01 +1.771355323604e+01 1.675709302726e+01 1.773721247759e+01 1.884415060598e+01 +1.947923035058e+01 1.691218758865e+01 1.787304261979e+01 1.938186345631e+01 +2.099291012771e+01 1.709743165202e+01 1.799108653446e+01 1.979225497625e+01 +2.133482724331e+01 1.724318930124e+01 1.808937475683e+01 1.999710797352e+01 +2.125668874628e+01 1.738241649235e+01 1.816889802766e+01 1.994889535174e+01 +2.108051450581e+01 1.746306547564e+01 1.822907265718e+01 1.966350520684e+01 +1.866478566299e+01 1.755290398607e+01 1.827295248105e+01 1.922336862166e+01 +1.770359348012e+01 1.765406053001e+01 1.830237581892e+01 1.874523200648e+01 +1.768461484942e+01 1.773211101576e+01 1.831858956871e+01 1.833241213320e+01 +1.764308038484e+01 1.783804933522e+01 1.832540440359e+01 1.804008970119e+01 +1.750907463610e+01 1.789682228206e+01 1.832370064829e+01 1.786967808036e+01 +1.762602357199e+01 1.795219738307e+01 1.831732872413e+01 1.778806816579e+01 +1.832053388647e+01 1.799381992289e+01 1.830875932492e+01 1.775549948171e+01 +1.764681057440e+01 1.804939137105e+01 1.830092500657e+01 1.774602974889e+01 +1.758900851504e+01 1.813454290160e+01 1.829628739442e+01 1.775217655732e+01 +1.743088236673e+01 1.825698257234e+01 1.829683509977e+01 1.777575643081e+01 +1.744371498966e+01 1.838524700747e+01 1.830296302822e+01 1.781590834261e+01 +1.880692277278e+01 1.849056078824e+01 1.831467229775e+01 1.786602027181e+01 +1.744647283342e+01 1.856691492452e+01 1.833203031845e+01 1.792150727414e+01 +1.841554900158e+01 1.863708125744e+01 1.835528068892e+01 1.798889343597e+01 +1.735075787519e+01 1.869663671338e+01 1.838381836270e+01 1.808532095530e+01 +1.796122940451e+01 1.874898576096e+01 1.841700705849e+01 1.822742338094e+01 +1.828273126862e+01 1.882248459787e+01 1.845478296623e+01 1.841849137372e+01 +1.856618105033e+01 1.888272792816e+01 1.849568294601e+01 1.864312678778e+01 +1.928047537034e+01 1.888285447360e+01 1.853804684064e+01 1.887072178164e+01 +1.905435618113e+01 1.888082735616e+01 1.858267488512e+01 1.906293103508e+01 +1.924036982732e+01 1.889950987171e+01 1.862945998163e+01 1.918184020372e+01 +2.023238402267e+01 1.892344381909e+01 1.867797198062e+01 1.919988943863e+01 +1.979169013966e+01 1.893668064384e+01 1.872814355493e+01 1.911106576321e+01 +1.909692868167e+01 1.893892707764e+01 1.878012428874e+01 1.893651209631e+01 +1.777573088272e+01 1.894952157793e+01 1.883446859795e+01 1.871761350236e+01 +1.872395726372e+01 1.896080165017e+01 1.889109690566e+01 1.850004265805e+01 +1.838340759288e+01 1.900947512868e+01 1.895078926682e+01 1.832151814185e+01 +1.742638646358e+01 1.907684037048e+01 1.901291570218e+01 1.821189855955e+01 +1.868617402525e+01 1.915453028548e+01 1.907728075493e+01 1.820101782100e+01 +1.701271348021e+01 1.923452483009e+01 1.914364989227e+01 1.832162924342e+01 +1.817639047987e+01 1.931461279400e+01 1.921174673149e+01 1.859859350765e+01 +1.822642092792e+01 1.938455102793e+01 1.928096884837e+01 1.902668670572e+01 +1.862496719241e+01 1.941552663159e+01 1.935012906874e+01 1.955081111740e+01 +2.084880963303e+01 1.947019506951e+01 1.942024616111e+01 2.006688600440e+01 +2.227777381274e+01 1.953812747786e+01 1.949073311649e+01 2.045286822637e+01 +2.205638805464e+01 1.957821825204e+01 1.956022146872e+01 2.061865856218e+01 +2.153772918936e+01 1.960491807046e+01 1.962866433869e+01 2.054612283459e+01 +2.012036815271e+01 1.959340148398e+01 1.969528708883e+01 2.029348819903e+01 +1.933640888649e+01 1.961932901795e+01 1.976180873294e+01 1.996204088226e+01 +1.925598004000e+01 1.965083328062e+01 1.982752209550e+01 1.964811584718e+01 +1.841424896642e+01 1.971511373963e+01 1.989322826439e+01 1.941054254656e+01 +1.966045042678e+01 1.978691689746e+01 1.995839322369e+01 1.926966706424e+01 +1.944861798288e+01 1.984102730721e+01 2.002238835137e+01 1.922999031787e+01 +1.893765314201e+01 1.990166765685e+01 2.008556733917e+01 1.930126066570e+01 +1.816068090066e+01 1.996476048200e+01 2.014757329580e+01 1.949657248838e+01 +1.868105505429e+01 2.004623268994e+01 2.020837731798e+01 1.980987393666e+01 +2.073318443850e+01 2.011954714122e+01 2.026670189720e+01 2.019790907733e+01 +2.161434686465e+01 2.018089516218e+01 2.032183266351e+01 2.058903074954e+01 +2.129541164511e+01 2.026863937788e+01 2.037417813019e+01 2.091529637465e+01 +2.163161147573e+01 2.034256066615e+01 2.042213032895e+01 2.114241886059e+01 +2.144415089824e+01 2.047050879322e+01 2.046697801797e+01 2.127560441925e+01 +2.107687618821e+01 2.055539022457e+01 2.050647966236e+01 2.134078687786e+01 +2.114295042048e+01 2.062372706363e+01 2.054160062319e+01 2.135855116670e+01 +2.168874580766e+01 2.070506576305e+01 2.057368827101e+01 2.132992676063e+01 +2.176425067517e+01 2.072894677167e+01 2.060207638041e+01 2.124157558087e+01 +2.162700644810e+01 2.077996421369e+01 2.063009262325e+01 2.108228289281e+01 +2.117524323194e+01 2.076401529917e+01 2.065681496687e+01 2.085480179099e+01 +1.970432419772e+01 2.075196549187e+01 2.068549664546e+01 2.057448397501e+01 +2.035764921351e+01 2.072750263835e+01 2.071722782739e+01 2.026225386499e+01 +2.104446529649e+01 2.066810830918e+01 2.075280473795e+01 1.994575502162e+01 +1.935050962506e+01 2.058066730563e+01 2.079332637026e+01 1.966926262326e+01 +1.864578495982e+01 2.049958356565e+01 2.083974262347e+01 1.949567599218e+01 +1.791057267615e+01 2.041579172104e+01 2.089107531641e+01 1.948672905854e+01 +1.866315216877e+01 2.035450073472e+01 2.094634585575e+01 1.967082307467e+01 +1.996355674268e+01 2.031741910934e+01 2.100336721558e+01 2.002495453953e+01 +2.073472853959e+01 2.028356972342e+01 2.105886304374e+01 2.048723518029e+01 +2.176979777023e+01 2.027228939310e+01 2.110996260582e+01 2.098959010100e+01 +2.110701180994e+01 2.022595554502e+01 2.115154689781e+01 2.148444371144e+01 +2.175254622124e+01 2.018239404107e+01 2.118059913551e+01 2.194881234353e+01 +2.259046566192e+01 2.016925882692e+01 2.119391200050e+01 2.237124279460e+01 +2.336501509470e+01 2.012093818558e+01 2.118607574288e+01 2.273820794895e+01 +2.307381957164e+01 2.003982099878e+01 2.115370382056e+01 2.302937608778e+01 +2.337199214908e+01 1.989127927007e+01 2.109341096172e+01 2.321893496606e+01 +2.436469656783e+01 1.974513159525e+01 2.100532529669e+01 2.327745585854e+01 +2.287463000447e+01 1.959270775442e+01 2.088849616840e+01 2.317453482891e+01 +2.454573208515e+01 1.942696097325e+01 2.074286671403e+01 2.288578299954e+01 +2.308492781106e+01 1.925180462163e+01 2.056960449753e+01 2.240392947986e+01 +2.182413851721e+01 1.913066024241e+01 2.037239909271e+01 2.174848947118e+01 +2.160711524236e+01 1.897304543862e+01 2.015187870552e+01 2.096839941455e+01 +1.969581882490e+01 1.881196295345e+01 1.991208562039e+01 2.013628139162e+01 +1.957321573425e+01 1.864160350164e+01 1.965650623311e+01 1.933567410874e+01 +1.706674965570e+01 1.849072270301e+01 1.938954750459e+01 1.864269390269e+01 +1.739609122067e+01 1.837826952807e+01 1.911543780629e+01 1.810609787357e+01 +1.716311970107e+01 1.826977467960e+01 1.883662236942e+01 1.773491749636e+01 +1.748783777818e+01 1.813365934384e+01 1.855510638924e+01 1.750274229124e+01 +1.738024887458e+01 1.800588618906e+01 1.827437076278e+01 1.736771057852e+01 +1.752957320570e+01 1.790600653111e+01 1.799687238479e+01 1.729507857079e+01 +1.688201360475e+01 1.779666355791e+01 1.772294786972e+01 1.726713421643e+01 +1.675143077387e+01 1.771974828814e+01 1.745464516531e+01 1.727582992109e+01 +1.735711508271e+01 1.762188244534e+01 1.719157010770e+01 1.730698196984e+01 +1.749859252807e+01 1.749357396943e+01 1.693421401695e+01 1.732922310725e+01 +1.795610973936e+01 1.734557766187e+01 1.668342478621e+01 1.729433832808e+01 +1.729275187722e+01 1.717525366400e+01 1.643969026194e+01 1.714769515891e+01 +1.727414199069e+01 1.702276578916e+01 1.620456555884e+01 1.684577988205e+01 +1.849235548007e+01 1.686203634190e+01 1.597815514939e+01 1.637749422955e+01 +1.580598897382e+01 1.667682921073e+01 1.576099750052e+01 1.577973307710e+01 +1.457017707228e+01 1.646820909115e+01 1.555407550523e+01 1.513310200669e+01 +1.293843766936e+01 1.629033915032e+01 1.535976286305e+01 1.453384276735e+01 +1.400714269543e+01 1.608749462611e+01 1.517766273381e+01 1.405770376201e+01 +1.338514148246e+01 1.587494057873e+01 1.500899414371e+01 1.373822496916e+01 +1.302794170672e+01 1.568974704110e+01 1.485523214769e+01 1.356807737109e+01 +1.236609911348e+01 1.549750799621e+01 1.471596548417e+01 1.351561307687e+01 +1.504380128541e+01 1.532819434554e+01 1.459202373752e+01 1.354491147912e+01 +1.311342317969e+01 1.518053165611e+01 1.448282685762e+01 1.363046907114e+01 +1.350133374518e+01 1.502307489519e+01 1.438679089382e+01 1.375939298368e+01 +1.308923159943e+01 1.491092714259e+01 1.430413925176e+01 1.392024695159e+01 +1.405899666061e+01 1.478968250204e+01 1.423221450745e+01 1.409027072016e+01 +1.575522392099e+01 1.472356958756e+01 1.417105177906e+01 1.423633506289e+01 +1.451851061332e+01 1.466178089601e+01 1.411796838745e+01 1.433031812382e+01 +1.366059280934e+01 1.458795521689e+01 1.407119635444e+01 1.436309910075e+01 +1.482657202526e+01 1.454382456829e+01 1.403056997605e+01 1.434391376906e+01 +1.469705353717e+01 1.450826630423e+01 1.399470057810e+01 1.428840610579e+01 +1.349396644313e+01 1.448976947619e+01 1.396311875795e+01 1.420799637993e+01 +1.459744072020e+01 1.449386881370e+01 1.393559142327e+01 1.410794314709e+01 +1.421164696705e+01 1.450261554851e+01 1.391157211450e+01 1.399212460484e+01 +1.383626912130e+01 1.452255166178e+01 1.389159548208e+01 1.386810432736e+01 +1.352029251996e+01 1.457098614135e+01 1.387694098264e+01 1.374726964709e+01 +1.331142868951e+01 1.461967988735e+01 1.386803935572e+01 1.364006235609e+01 +1.363421422871e+01 1.467976135063e+01 1.386636580417e+01 1.355166793188e+01 +1.380793232016e+01 1.474353657385e+01 1.387310882860e+01 1.348306442028e+01 +1.326112215349e+01 1.477622302981e+01 1.388905543507e+01 1.343604360114e+01 +1.270373851281e+01 1.487334528986e+01 1.391812434961e+01 1.341652487495e+01 +1.408461644805e+01 1.498546986062e+01 1.396064602185e+01 1.343280818252e+01 +1.294805441130e+01 1.514309317780e+01 1.401905590527e+01 1.348980938786e+01 +1.334883037045e+01 1.527093032448e+01 1.409333879522e+01 1.358220222882e+01 +1.332670111475e+01 1.539218275490e+01 1.418564178356e+01 1.369057083460e+01 +1.453989840093e+01 1.550327918578e+01 1.429706332040e+01 1.378573813410e+01 +1.427979024613e+01 1.562722788157e+01 1.442911578849e+01 1.384256220621e+01 +1.416125985733e+01 1.571837984620e+01 1.458161937125e+01 1.385568310790e+01 +1.334555840017e+01 1.584223026193e+01 1.475653122706e+01 1.384572276732e+01 +1.391191897733e+01 1.593207238357e+01 1.495171849858e+01 1.385176044056e+01 +1.324719509513e+01 1.604140506436e+01 1.516757010037e+01 1.391695196075e+01 +1.378549233337e+01 1.613317613179e+01 1.540179637933e+01 1.407690797079e+01 +1.433560508435e+01 1.619914268947e+01 1.565227345428e+01 1.435395060915e+01 +1.341275686372e+01 1.630825125377e+01 1.591804538286e+01 1.475446281080e+01 +1.536331888714e+01 1.645818731128e+01 1.619582872847e+01 1.526795844043e+01 +1.569207831694e+01 1.657768540474e+01 1.648031692860e+01 1.587046815017e+01 +1.674220600908e+01 1.667429803550e+01 1.676758489680e+01 1.653279162727e+01 +1.729737809658e+01 1.678196145077e+01 1.705391138009e+01 1.722731689051e+01 +1.737110853251e+01 1.688862081102e+01 1.733469223709e+01 1.792630205698e+01 +1.853654499554e+01 1.700433073634e+01 1.760612187197e+01 1.859434479202e+01 +2.018336876154e+01 1.713064361187e+01 1.786434258083e+01 1.918713844113e+01 +2.056176993111e+01 1.724763967654e+01 1.810540368156e+01 1.966388547109e+01 +2.043937566744e+01 1.738889829385e+01 1.832737732151e+01 2.000511018355e+01 +2.053820794918e+01 1.757541189515e+01 1.852916279344e+01 2.021911470510e+01 +1.993548748297e+01 1.776236236568e+01 1.870892471195e+01 2.032968496506e+01 +2.075265546264e+01 1.797187044498e+01 1.886715579926e+01 2.035541345215e+01 +2.028892117103e+01 1.818609848943e+01 1.900419187235e+01 2.029910154475e+01 +2.114171610480e+01 1.832776549380e+01 1.911959169602e+01 2.015647573186e+01 +2.050915836771e+01 1.850761616848e+01 1.921817773541e+01 1.993542769348e+01 +1.948614983111e+01 1.866357715580e+01 1.930116312839e+01 1.966663862706e+01 +1.854669506479e+01 1.880124728817e+01 1.937170944370e+01 1.939444147655e+01 +1.859544481125e+01 1.889272620739e+01 1.943232292505e+01 1.915671927751e+01 +1.943057832717e+01 1.899786507886e+01 1.948770096974e+01 1.897394469761e+01 +1.929800641447e+01 1.908733599101e+01 1.954011299147e+01 1.885659745877e+01 +1.778947498968e+01 1.920048805121e+01 1.959314422065e+01 1.881868280000e+01 +1.846531675998e+01 1.930311808525e+01 1.964827150477e+01 1.887774441569e+01 +1.845673468277e+01 1.939033803683e+01 1.970695982305e+01 1.903698078210e+01 +1.870309766874e+01 1.945524533049e+01 1.976986945796e+01 1.926599706087e+01 +1.984659453812e+01 1.950423105277e+01 1.983740837668e+01 1.950207819328e+01 +2.124023176141e+01 1.957455427983e+01 1.990995170211e+01 1.967837575399e+01 +2.068814879408e+01 1.961541445579e+01 1.998518807781e+01 1.976174546499e+01 +1.926838009447e+01 1.963396915577e+01 2.006154509593e+01 1.977218592543e+01 +1.868335096169e+01 1.964063118794e+01 2.013686396583e+01 1.977035898431e+01 +1.973445989330e+01 1.963422000694e+01 2.020831761917e+01 1.982683816733e+01 +1.984881096734e+01 1.962751913154e+01 2.027301539592e+01 1.999735418385e+01 +2.006477707002e+01 1.960137017382e+01 2.032721811755e+01 2.031192741263e+01 +1.924073269269e+01 1.957164748606e+01 2.036830301321e+01 2.076663124873e+01 +2.039652841282e+01 1.950706848323e+01 2.039251730972e+01 2.131154149820e+01 +2.323452196250e+01 1.944500989281e+01 2.039791013711e+01 2.184856953447e+01 +2.341452821843e+01 1.937992210446e+01 2.038213040723e+01 2.225641060493e+01 +2.410653167120e+01 1.928455539947e+01 2.034274599629e+01 2.243679640048e+01 +2.380284547822e+01 1.915568662498e+01 2.027857954069e+01 2.235288362524e+01 +2.115079054922e+01 1.903820998569e+01 2.019055070213e+01 2.203495416559e+01 +2.215589852540e+01 1.888539648989e+01 2.007808189408e+01 2.155580318436e+01 +2.125000939446e+01 1.874451889700e+01 1.994354166038e+01 2.099855138293e+01 +2.024390610728e+01 1.862461510985e+01 1.978893792236e+01 2.043493663592e+01 +1.892875466886e+01 1.851015637149e+01 1.961611803113e+01 1.991466003975e+01 +1.947298404512e+01 1.843502069736e+01 1.942873649629e+01 1.945928550170e+01 +1.853253344160e+01 1.835656161487e+01 1.922902343295e+01 1.906156746722e+01 +1.909389819896e+01 1.826528282431e+01 1.901977366088e+01 1.869659308291e+01 +1.913398677598e+01 1.818005883395e+01 1.880398628753e+01 1.834331562070e+01 +1.768071427364e+01 1.805907231390e+01 1.858289590382e+01 1.800256174034e+01 +1.705925696754e+01 1.795635465924e+01 1.835992941247e+01 1.769714811703e+01 +1.680563089964e+01 1.788908505282e+01 1.813743746402e+01 1.745478901574e+01 +1.715544563779e+01 1.779880056297e+01 1.791554087584e+01 1.728981274137e+01 +1.754323957708e+01 1.770323572894e+01 1.769583134445e+01 1.719864731703e+01 +1.669910489502e+01 1.762802875589e+01 1.747972513924e+01 1.716838505562e+01 +1.715124961901e+01 1.760352696741e+01 1.726845287208e+01 1.718529613709e+01 +1.703291893382e+01 1.761539713835e+01 1.706229156450e+01 1.723313508448e+01 +1.714138630002e+01 1.760497474217e+01 1.686066537246e+01 1.728383119407e+01 +1.726739780890e+01 1.760567050250e+01 1.666545614825e+01 1.729186458115e+01 +1.873536450952e+01 1.760384617380e+01 1.647767317210e+01 1.720128038219e+01 +1.718305651861e+01 1.761284582096e+01 1.629923784856e+01 1.696456760750e+01 +1.721567340688e+01 1.762616449499e+01 1.613219582351e+01 1.656402597301e+01 +1.715963313690e+01 1.758983529250e+01 1.597812812583e+01 1.602434927019e+01 +1.489833993767e+01 1.755764496166e+01 1.584139025013e+01 1.540965850023e+01 +1.389130054279e+01 1.750466052822e+01 1.572445113362e+01 1.480598751287e+01 +1.410219802706e+01 1.748184581144e+01 1.563181675388e+01 1.429748241552e+01 +1.302871308152e+01 1.750587403939e+01 1.556698820591e+01 1.394620358373e+01 +1.310236719537e+01 1.751795246439e+01 1.553154705869e+01 1.377952201512e+01 +1.329305881816e+01 1.755968680125e+01 1.552939517520e+01 1.378320343194e+01 +1.271253505374e+01 1.759494538395e+01 1.556175887986e+01 1.390159625696e+01 +1.499948211095e+01 1.767452047668e+01 1.563135796621e+01 1.405399099137e+01 +1.567759998093e+01 1.773176998762e+01 1.573747653246e+01 1.417163961031e+01 +1.485475627338e+01 1.780564051186e+01 1.588105084233e+01 1.423915843550e+01 +1.372286448708e+01 1.788610133901e+01 1.606105636872e+01 1.430888522001e+01 +1.246211786569e+01 1.795173745554e+01 1.627531660311e+01 1.447140841882e+01 +1.351953835432e+01 1.803673563686e+01 1.652189122605e+01 1.480172600508e+01 +1.576772922147e+01 1.811727550429e+01 1.679659280458e+01 1.532099525292e+01 +1.563911270904e+01 1.820398499039e+01 1.709551641628e+01 1.599622885962e+01 +1.672778275093e+01 1.828915292216e+01 1.741390421332e+01 1.676555355267e+01 +1.728290554980e+01 1.837160759908e+01 1.774679880058e+01 1.756249200857e+01 +1.865788523078e+01 1.849925020191e+01 1.809023460217e+01 1.832761947360e+01 +2.006475644249e+01 1.862410316896e+01 1.843791232065e+01 1.901453331627e+01 +1.983350211942e+01 1.875136414413e+01 1.878489341849e+01 1.959748399521e+01 +2.051624412243e+01 1.889056636446e+01 1.912663610262e+01 2.007667013952e+01 +2.053565524390e+01 1.903847501646e+01 1.945879639829e+01 2.047328726110e+01 +2.026170919659e+01 1.919242697661e+01 1.977780764349e+01 2.081517315823e+01 +2.159810662235e+01 1.933414682661e+01 2.008004230260e+01 2.112332241581e+01 +2.158542480112e+01 1.949623045213e+01 2.036369068820e+01 2.140788344718e+01 +2.189090673097e+01 1.965487978267e+01 2.062662961582e+01 2.167187401781e+01 +2.131669277293e+01 1.989435723476e+01 2.087012605695e+01 2.191434676694e+01 +2.257711782687e+01 2.014277368195e+01 2.109244320705e+01 2.212918100861e+01 +2.242626062928e+01 2.040231048119e+01 2.129454703582e+01 2.230405709059e+01 +2.266833836773e+01 2.064175969846e+01 2.147713544424e+01 2.242510595984e+01 +2.331064939037e+01 2.083703518874e+01 2.164134429009e+01 2.248537403151e+01 +2.185633181249e+01 2.103390513996e+01 2.179067190638e+01 2.248929843779e+01 +2.293486629244e+01 2.122480862798e+01 2.192764746460e+01 2.244817836830e+01 +2.216726754887e+01 2.138783296548e+01 2.205477076752e+01 2.237032478222e+01 +2.209057566490e+01 2.154084313906e+01 2.217563694153e+01 2.225561852686e+01 +2.295694814522e+01 2.170689338480e+01 2.229348963643e+01 2.210169476314e+01 +2.210870055539e+01 2.186205191172e+01 2.240984481255e+01 2.191906256221e+01 +2.168539618104e+01 2.200703878690e+01 2.252616993510e+01 2.174294901354e+01 +2.078732307358e+01 2.212737549142e+01 2.264318304393e+01 2.162959768252e+01 +2.085931669479e+01 2.220077733896e+01 2.276099393158e+01 2.163586570983e+01 +2.110549876267e+01 2.228132949196e+01 2.288067039311e+01 2.179429468687e+01 +2.132040831859e+01 2.234317044624e+01 2.300046367953e+01 2.209977175855e+01 +2.296463612848e+01 2.238770082900e+01 2.311852520544e+01 2.251515453541e+01 +2.322963472932e+01 2.240838792506e+01 2.323213761573e+01 2.298934094877e+01 +2.321331136587e+01 2.242331940414e+01 2.333880845136e+01 2.347425956164e+01 +2.395366809681e+01 2.245694689125e+01 2.343579695886e+01 2.393317493188e+01 +2.452670920809e+01 2.250356374581e+01 2.351951481874e+01 2.434375406484e+01 +2.627675892227e+01 2.253668598655e+01 2.358590209894e+01 2.470078440538e+01 +2.399581102519e+01 2.260184937814e+01 2.363293881628e+01 2.501367438737e+01 +2.513102828038e+01 2.264118652197e+01 2.365680893466e+01 2.529009231638e+01 +2.485226521886e+01 2.267902333790e+01 2.365632886370e+01 2.551132812795e+01 +2.706411848030e+01 2.269345916797e+01 2.362990735493e+01 2.562245011573e+01 +2.654160872188e+01 2.271703557706e+01 2.357821524915e+01 2.555569032940e+01 +2.736605952100e+01 2.273255384622e+01 2.350196410793e+01 2.527689375203e+01 +2.518556960078e+01 2.274778774777e+01 2.340353329378e+01 2.481954521528e+01 +2.284458571031e+01 2.275325119216e+01 2.328567990990e+01 2.427567886490e+01 +2.318128829368e+01 2.275424780150e+01 2.315246407933e+01 2.374597690353e+01 +2.233463721884e+01 2.277291027862e+01 2.300889173876e+01 2.328401932299e+01 +2.313126093342e+01 2.277978149268e+01 2.285922908358e+01 2.287429459710e+01 +2.329692867833e+01 2.280027553459e+01 2.270940054664e+01 2.245782106821e+01 +2.324832666637e+01 2.283429351293e+01 2.256463826802e+01 2.198479071506e+01 +2.158071938869e+01 2.286251064082e+01 2.242963797827e+01 2.145621300158e+01 +1.985704467738e+01 2.292587084480e+01 2.231008323696e+01 2.092755893477e+01 +1.965940424379e+01 2.300536120672e+01 2.220948590741e+01 2.047747150415e+01 +1.940001788066e+01 2.310389069518e+01 2.213106913816e+01 2.016942949691e+01 +1.976463684168e+01 2.319863012372e+01 2.207655079336e+01 2.003367339331e+01 +1.990118291379e+01 2.331012381582e+01 2.204794885562e+01 2.007380117723e+01 +1.957597458187e+01 2.342291474803e+01 2.204555097674e+01 2.028086700968e+01 +1.969907298641e+01 2.348847754110e+01 2.206792179719e+01 2.063728619856e+01 +2.084068748212e+01 2.354685922630e+01 2.211496702942e+01 2.110967258054e+01 +2.168939013693e+01 2.360105776009e+01 2.218500294804e+01 2.164349630011e+01 +2.312107794726e+01 2.363128311134e+01 2.227535659503e+01 2.216982959415e+01 +2.240875915748e+01 2.363510796857e+01 2.238347054428e+01 2.262220632328e+01 +2.393542775663e+01 2.360341307669e+01 2.250655404214e+01 2.295454629461e+01 +2.383966104185e+01 2.361480642651e+01 2.264380335866e+01 2.315283243365e+01 +2.374370925794e+01 2.362093759543e+01 2.279151547443e+01 2.323651962103e+01 +2.275148870834e+01 2.365149450018e+01 2.294834671617e+01 2.324774310162e+01 +2.269783771445e+01 2.361021879124e+01 2.310996316462e+01 2.323186482016e+01 +2.351442150625e+01 2.356927197243e+01 2.327612276458e+01 2.322045156585e+01 +2.334367378550e+01 2.350417936271e+01 2.344432495440e+01 2.322760189987e+01 +2.303997330569e+01 2.348321742624e+01 2.361436465479e+01 2.325966294898e+01 +2.342681549738e+01 2.352033214270e+01 2.378469312716e+01 2.332765208522e+01 +2.295355034830e+01 2.353897636472e+01 2.395173230569e+01 2.345163242468e+01 +2.337587823641e+01 2.360717682131e+01 2.411557464198e+01 2.365447847884e+01 +2.336308873154e+01 2.368285269979e+01 2.427377104656e+01 2.394991757557e+01 +2.403691781429e+01 2.378727546982e+01 2.442548239663e+01 2.433230536951e+01 +2.456845905429e+01 2.387644381267e+01 2.456808989915e+01 2.477428047164e+01 +2.565652754014e+01 2.400279818786e+01 2.470119387273e+01 2.523404214369e+01 +2.611084942588e+01 2.415770301061e+01 2.482308148761e+01 2.566755502495e+01 +2.625729899630e+01 2.430006733072e+01 2.493159558865e+01 2.603727807051e+01 +2.610891254666e+01 2.447501676796e+01 2.502731920007e+01 2.631311965740e+01 +2.727305080805e+01 2.462860359707e+01 2.510895559819e+01 2.647017019657e+01 +2.753774865286e+01 2.482427268520e+01 2.517873673885e+01 2.649102092843e+01 +2.652690304671e+01 2.500423484875e+01 2.523648635708e+01 2.637393801736e+01 +2.636338476968e+01 2.519443978159e+01 2.528454683830e+01 2.614037401661e+01 +2.608745132773e+01 2.534593330882e+01 2.532410256662e+01 2.583515551112e+01 +2.546850158205e+01 2.544893150969e+01 2.535754529882e+01 2.551738312747e+01 +2.454891366316e+01 2.551290078578e+01 2.538800269394e+01 2.524307614169e+01 +2.429310097266e+01 2.557940222916e+01 2.541945675666e+01 2.504367886704e+01 +2.438509370374e+01 2.559691410919e+01 2.545352727849e+01 2.491132203661e+01 +2.520350455103e+01 2.565961716304e+01 2.549542564121e+01 2.480500419339e+01 +2.624694109170e+01 2.570967411573e+01 2.554620187519e+01 2.468070973487e+01 +2.441784536454e+01 2.579621047421e+01 2.560883288324e+01 2.452784606275e+01 +2.387425389054e+01 2.588983748764e+01 2.568384629581e+01 2.438545632487e+01 +2.331900682277e+01 2.598920603185e+01 2.577187706291e+01 2.432656081672e+01 +2.356709927541e+01 2.610488619637e+01 2.587310539580e+01 2.442310464617e+01 +2.444832423572e+01 2.621615227343e+01 2.598599148377e+01 2.471337657111e+01 +2.375662478034e+01 2.629091477159e+01 2.610786035233e+01 2.518483393213e+01 +2.566527253731e+01 2.635512747571e+01 2.623674049223e+01 2.577474562081e+01 +2.686078054219e+01 2.642523913438e+01 2.637012225923e+01 2.638866197712e+01 +2.859120498668e+01 2.647330189974e+01 2.650413233987e+01 2.693398260278e+01 +2.765560474350e+01 2.651980337313e+01 2.663595613588e+01 2.735593991280e+01 +2.803354895494e+01 2.655106262233e+01 2.676212416516e+01 2.765599664499e+01 +2.789339016955e+01 2.656439048851e+01 2.687966760178e+01 2.788031795063e+01 +2.701006229312e+01 2.658660934542e+01 2.698683418357e+01 2.808456426938e+01 +2.857849542012e+01 2.660539166620e+01 2.708139299547e+01 2.829544859629e+01 +2.776696961526e+01 2.661660881662e+01 2.716178376359e+01 2.849020130554e+01 +3.025082942190e+01 2.659838780224e+01 2.722668744973e+01 2.860454398775e+01 +2.905426101876e+01 2.657855075706e+01 2.727667440183e+01 2.856509288695e+01 +2.975740700864e+01 2.656827417427e+01 2.731229683364e+01 2.833013895259e+01 +2.875277193763e+01 2.654668811521e+01 2.733369127294e+01 2.791858545705e+01 +2.691787754629e+01 2.651610936884e+01 2.734191075935e+01 2.741235666337e+01 +2.619642516308e+01 2.647839783154e+01 2.733810348113e+01 2.693046208293e+01 +2.564866240934e+01 2.647738457701e+01 2.732458778215e+01 2.658706280211e+01 +2.447810363098e+01 2.645973457028e+01 2.730127801917e+01 2.645363216497e+01 +2.691443096918e+01 2.644956382298e+01 2.726982587561e+01 2.654127337492e+01 +2.612511322796e+01 2.642973414122e+01 2.723081279301e+01 2.680561640482e+01 +2.717938482538e+01 2.641372953046e+01 2.718541659826e+01 2.716430948218e+01 +2.753623803554e+01 2.643249471097e+01 2.713478614911e+01 2.751678415661e+01 +2.867854962748e+01 2.647720619378e+01 2.707880247304e+01 2.776535892597e+01 +2.941098855070e+01 2.653812231887e+01 2.701735083705e+01 2.784085448341e+01 +2.886052095881e+01 2.659405884843e+01 2.694997395544e+01 2.772674551584e+01 +2.722724451145e+01 2.663373179007e+01 2.687652763678e+01 2.746598789327e+01 +2.619411242253e+01 2.668540829428e+01 2.679782655328e+01 2.714127707666e+01 +2.697505313528e+01 2.670247312423e+01 2.671309047067e+01 2.683911995895e+01 +2.576670765688e+01 2.669802163507e+01 2.662332504661e+01 2.661919153949e+01 +2.638604788895e+01 2.666271776761e+01 2.652919807806e+01 2.650191675889e+01 +2.609472519095e+01 2.664454442211e+01 2.643289657894e+01 2.647169079614e+01 +2.620361344496e+01 2.661986181332e+01 2.633509217922e+01 2.648753325830e+01 +2.715887735869e+01 2.659801048208e+01 2.623763465188e+01 2.649708386376e+01 +2.711290687779e+01 2.659225764061e+01 2.614263776691e+01 2.645218631783e+01 +2.654589788889e+01 2.655862477978e+01 2.605114247192e+01 2.632145305731e+01 +2.607435231016e+01 2.653995037398e+01 2.596639183220e+01 2.609490582000e+01 +2.624614355650e+01 2.647719378113e+01 2.588919317572e+01 2.578190116327e+01 +2.576970719107e+01 2.643661298253e+01 2.582324548716e+01 2.540833576667e+01 +2.499128412930e+01 2.638404775853e+01 2.576945445495e+01 2.501548479649e+01 +2.423924259790e+01 2.635016756015e+01 2.573002615043e+01 2.465637410204e+01 +2.326072291241e+01 2.634963845945e+01 2.570621613562e+01 2.438623728074e+01 +2.442770880915e+01 2.636222345366e+01 2.569803247322e+01 2.425011626721e+01 +2.329551401255e+01 2.638468220910e+01 2.570549993933e+01 2.427330519539e+01 +2.385697221889e+01 2.642803923489e+01 2.572842666722e+01 2.445655909185e+01 +2.418151605729e+01 2.642759960761e+01 2.576446391127e+01 2.477499865226e+01 +2.546356563906e+01 2.644146351847e+01 2.581375543162e+01 2.518132181277e+01 +2.559202826489e+01 2.643653078314e+01 2.587368864419e+01 2.561531328219e+01 +2.652174880719e+01 2.642546115534e+01 2.594253765556e+01 2.601854287576e+01 +2.689710500557e+01 2.639428397085e+01 2.601772128932e+01 2.634877900964e+01 diff -Nru gsl-2.4+dfsg/doc/examples/impulse.c gsl-2.5+dfsg/doc/examples/impulse.c --- gsl-2.4+dfsg/doc/examples/impulse.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/impulse.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,68 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 1000; /* length of time series */ + const size_t K = 25; /* window size */ + const double t = 4.0; /* number of scale factors for outlier detection */ + gsl_vector *x = gsl_vector_alloc(N); /* input vector */ + gsl_vector *y = gsl_vector_alloc(N); /* output (filtered) vector */ + gsl_vector *xmedian = gsl_vector_alloc(N); /* window medians */ + gsl_vector *xsigma = gsl_vector_alloc(N); /* window scale estimates */ + gsl_vector_int *ioutlier = gsl_vector_int_alloc(N); /* outlier detected? */ + gsl_filter_impulse_workspace * w = gsl_filter_impulse_alloc(K); + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + size_t noutlier; + size_t i; + + /* generate input signal */ + for (i = 0; i < N; ++i) + { + double xi = 10.0 * sin(2.0 * M_PI * i / (double) N); + double ei = gsl_ran_gaussian(r, 2.0); + double u = gsl_rng_uniform(r); + double outlier = (u < 0.01) ? 15.0*GSL_SIGN(ei) : 0.0; + + gsl_vector_set(x, i, xi + ei + outlier); + } + + /* apply impulse detection filter */ + gsl_filter_impulse(GSL_FILTER_END_TRUNCATE, GSL_FILTER_SCALE_QN, t, x, y, + xmedian, xsigma, &noutlier, ioutlier, w); + + /* print results */ + for (i = 0; i < N; ++i) + { + double xi = gsl_vector_get(x, i); + double yi = gsl_vector_get(y, i); + double xmedi = gsl_vector_get(xmedian, i); + double xsigmai = gsl_vector_get(xsigma, i); + int outlier = gsl_vector_int_get(ioutlier, i); + + printf("%zu %f %f %f %f %d\n", + i, + xi, + yi, + xmedi + t * xsigmai, + xmedi - t * xsigmai, + outlier); + } + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(xmedian); + gsl_vector_free(xsigma); + gsl_vector_int_free(ioutlier); + gsl_filter_impulse_free(w); + gsl_rng_free(r); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/impulse.txt gsl-2.5+dfsg/doc/examples/impulse.txt --- gsl-2.4+dfsg/doc/examples/impulse.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/impulse.txt 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,1000 @@ +0 0.267837 0.267837 7.086028 -6.488589 0 +1 1.251089 1.251089 7.185481 -6.618925 0 +2 3.474477 3.474477 7.982536 -7.446861 0 +3 -2.385455 -2.385455 7.333649 -6.767092 0 +4 -2.303703 -2.303703 6.860939 -6.263500 0 +5 -2.365765 -2.365765 6.384663 -5.661314 0 +6 0.298719 0.298719 6.383899 -5.534638 0 +7 0.667774 0.667774 6.993067 -6.120060 0 +8 0.467148 0.467148 6.445286 -5.548534 0 +9 -0.579585 -0.579585 6.878966 -5.963442 0 +10 0.991323 0.991323 6.238783 -5.304488 0 +11 3.461237 3.461237 6.799291 -5.883767 0 +12 -0.522795 -0.522795 7.309829 -6.375534 0 +13 -2.115389 -2.115389 8.549063 -7.313561 0 +14 -0.777013 -0.777013 8.904994 -7.669491 0 +15 0.448376 0.448376 8.597245 -7.662949 0 +16 0.424630 0.424630 8.670336 -7.434833 0 +17 0.617751 0.617751 7.592533 -6.357030 0 +18 1.257794 1.257794 6.394977 -5.159474 0 +19 4.604154 4.604154 6.394977 -5.159474 0 +20 0.964867 0.964867 6.753645 -5.819350 0 +21 3.681283 3.681283 7.152683 -5.917180 0 +22 0.856508 0.856508 7.555626 -5.842609 0 +23 -0.651680 -0.651680 7.881223 -6.168206 0 +24 2.657093 2.657093 8.045661 -6.332644 0 +25 3.741497 3.741497 8.765068 -7.052052 0 +26 3.056376 3.056376 8.052739 -6.123005 0 +27 -1.341791 -1.341791 8.312972 -5.797383 0 +28 4.115772 4.115772 9.095099 -6.356424 0 +29 0.399023 0.399023 9.748974 -6.358940 0 +30 0.411121 0.411121 10.187616 -5.920299 0 +31 -0.133195 -0.133195 10.346130 -5.697171 0 +32 0.191088 0.191088 9.860073 -5.592756 0 +33 3.836998 3.836998 9.858131 -5.590814 0 +34 1.369338 1.369338 9.817099 -5.549782 0 +35 2.997870 2.997870 9.559169 -4.910210 0 +36 1.695017 1.695017 9.451341 -4.755629 0 +37 -2.352311 -2.352311 9.581057 -4.932098 0 +38 3.444902 3.444902 10.346130 -5.697171 0 +39 2.347856 2.347856 10.516084 -5.867125 0 +40 2.514601 2.514601 9.783262 -5.134303 0 +41 4.604232 4.604232 10.129567 -5.862250 0 +42 2.133659 2.133659 10.586098 -5.937139 0 +43 2.324479 2.324479 10.272998 -5.577286 0 +44 1.647775 1.647775 10.439743 -5.410542 0 +45 1.808555 1.808555 10.052014 -4.461141 0 +46 3.686416 3.686416 10.478877 -4.888004 0 +47 2.795436 2.795436 10.478877 -4.888004 0 +48 4.343368 4.343368 11.057055 -5.466182 0 +49 0.861866 0.861866 11.479494 -5.888621 0 +50 5.723666 5.723666 10.478877 -4.888004 0 +51 3.591039 3.591039 9.990002 -4.850017 0 +52 1.602405 1.602405 10.254219 -4.663346 0 +53 -15.384532 2.795436 10.254219 -4.663346 1 +54 6.320591 6.320591 10.146072 -5.006087 0 +55 3.380744 3.380744 11.169962 -5.579090 0 +56 7.048299 7.048299 11.830315 -5.851912 0 +57 4.049829 4.049829 12.360317 -5.598829 0 +58 4.899066 4.899066 12.784621 -5.602543 0 +59 1.287136 1.287136 12.811733 -5.629656 0 +60 4.591408 4.591408 13.017568 -4.917911 0 +61 1.031623 1.031623 13.017568 -4.917911 0 +62 2.569992 2.569992 13.029816 -4.065434 0 +63 1.917971 1.917971 13.029127 -4.064746 0 +64 2.989201 2.989201 13.516125 -4.419354 0 +65 2.359780 2.359780 14.245773 -5.062958 0 +66 0.689950 0.689950 13.559147 -4.376332 0 +67 5.997274 5.997274 13.223050 -4.040235 0 +68 6.455235 6.455235 12.363100 -3.180285 0 +69 5.255499 5.255499 11.610613 -2.513841 0 +70 4.482191 4.482191 11.765932 -2.669160 0 +71 4.813373 4.813373 13.150880 -4.054109 0 +72 5.513273 5.513273 12.257609 -3.074794 0 +73 5.167341 5.167341 13.002466 -3.905695 0 +74 5.410549 5.410549 12.400990 -2.880875 0 +75 4.548386 4.548386 13.267454 -3.640707 0 +76 8.895208 8.895208 12.227249 -2.600502 0 +77 9.438126 9.438126 12.104269 -1.769588 0 +78 2.145592 2.145592 11.624270 -1.113271 0 +79 4.760058 4.760058 11.659073 -0.951921 0 +80 4.052600 4.052600 11.281908 -0.770910 0 +81 4.139740 4.139740 11.193750 -0.859068 0 +82 2.830709 2.830709 11.907940 -1.573258 0 +83 6.420421 6.420421 11.907940 -1.573258 0 +84 5.397948 5.397948 12.947706 -2.240554 0 +85 3.199579 3.199579 12.581216 -2.246535 0 +86 5.887218 5.887218 13.146814 -2.439662 0 +87 7.870819 7.870819 12.893940 -2.692536 0 +88 4.524933 4.524933 13.506636 -2.799484 0 +89 5.353576 5.353576 12.668741 -2.467337 0 +90 6.173428 6.173428 12.022822 -1.821418 0 +91 7.260273 7.260273 12.275696 -1.568544 0 +92 4.791960 4.791960 12.275696 -1.568544 0 +93 3.384643 3.384643 12.334876 -1.538981 0 +94 8.200184 8.200184 13.455257 -1.680821 0 +95 4.173493 4.173493 12.917990 -1.143554 0 +96 6.818150 6.818150 13.191185 -2.395290 0 +97 5.100702 5.100702 14.382786 -2.608350 0 +98 6.161797 6.161797 14.234090 -2.021633 0 +99 4.535586 4.535586 14.657365 -2.333771 0 +100 6.855992 6.855992 14.336318 -2.123861 0 +101 4.103610 4.103610 14.336318 -2.123861 0 +102 6.988670 6.988670 14.508887 -2.185293 0 +103 9.017243 9.017243 14.581556 -2.257962 0 +104 4.789311 4.789311 14.696500 -2.372907 0 +105 6.289369 6.289369 15.172261 -2.593523 0 +106 9.205956 9.205956 15.011282 -1.828236 0 +107 4.115150 4.115150 14.938613 -1.755567 0 +108 1.445456 1.445456 14.938613 -1.755567 0 +109 10.151837 10.151837 14.810936 -2.024470 0 +110 6.106228 6.106228 14.623322 -1.836857 0 +111 9.542699 9.542699 15.126226 -1.943181 0 +112 5.123113 5.123113 15.390695 -1.678712 0 +113 5.002891 5.002891 15.408626 -1.660781 0 +114 6.591523 6.591523 14.927868 -1.180024 0 +115 7.721164 7.721164 15.104012 -1.356167 0 +116 8.598271 8.598271 15.153033 -1.969987 0 +117 7.456962 7.456962 15.271304 -1.523460 0 +118 7.396332 7.396332 15.571961 -0.888218 0 +119 7.624535 7.624535 15.521721 -1.773876 0 +120 6.393233 6.393233 14.986306 -1.121586 0 +121 5.904074 5.904074 15.395817 -0.712075 0 +122 6.055145 6.055145 14.371231 -0.506512 0 +123 9.256512 9.256512 14.780743 -0.097000 0 +124 8.922952 8.922952 14.886066 -0.202323 0 +125 6.873922 6.873922 14.994365 -0.201702 0 +126 6.434257 6.434257 14.488965 0.303699 0 +127 7.341871 7.341871 14.488965 0.303699 0 +128 3.856169 3.856169 14.994365 -0.201702 0 +129 8.686101 8.686101 13.882945 0.800798 0 +130 8.086779 8.086779 13.882945 0.800798 0 +131 3.214626 3.214626 14.487172 -0.416884 0 +132 6.932360 6.932360 14.645270 -0.574982 0 +133 11.535909 11.535909 15.259491 -1.189203 0 +134 5.891493 5.891493 15.884419 -1.814130 0 +135 7.480259 7.480259 16.057033 -1.986744 0 +136 10.034917 10.034917 15.954248 -2.089529 0 +137 10.000651 10.000651 15.336973 -1.472254 0 +138 6.070481 6.070481 15.645911 -1.781192 0 +139 7.035144 7.035144 15.336973 -1.472254 0 +140 9.467457 9.467457 16.026665 -2.161945 0 +141 6.794247 6.794247 15.748696 -1.678407 0 +142 7.409702 7.409702 15.748696 -1.678407 0 +143 3.994103 3.994103 15.748696 -1.678407 0 +144 8.013894 8.013894 15.786670 -0.967267 0 +145 3.920389 3.920389 16.457912 -1.497394 0 +146 4.998066 4.998066 15.555881 -0.595363 0 +147 4.173885 4.173885 14.741335 0.219184 0 +148 4.627759 4.627759 15.978082 -0.775855 0 +149 7.794908 7.794908 16.578767 -1.376540 0 +150 6.619745 6.619745 16.387355 -1.567951 0 +151 6.927545 6.927545 16.475275 -1.273048 0 +152 10.764202 10.764202 17.406799 -2.204572 0 +153 7.601114 7.601114 16.765408 -1.563181 0 +154 10.305464 10.305464 16.959203 -1.369387 0 +155 10.221445 10.221445 18.335622 -2.353424 0 +156 9.855058 9.855058 17.178189 -1.150401 0 +157 9.390841 9.390841 17.395402 -0.933187 0 +158 10.360689 10.360689 18.575631 -2.113415 0 +159 6.953842 6.953842 17.395402 -0.933187 0 +160 11.785483 11.785483 16.979465 -0.387203 0 +161 8.296131 8.296131 16.971849 -0.379587 0 +162 5.988366 5.988366 17.036257 -0.062937 0 +163 7.991099 7.991099 16.786314 0.423359 0 +164 4.752674 4.752674 16.991229 0.218444 0 +165 8.231108 8.231108 16.384063 0.825610 0 +166 9.297917 9.297917 16.336095 0.873578 0 +167 10.891405 10.891405 16.139820 1.069853 0 +168 8.486660 8.486660 17.067633 0.142040 0 +169 9.383381 9.383381 16.687256 0.522417 0 +170 -7.532052 8.604837 16.991229 0.218444 1 +171 7.366873 7.366873 16.064121 1.094682 0 +172 9.105867 9.105867 16.139820 1.069853 0 +173 5.417777 5.417777 15.522268 1.636536 0 +174 8.844145 8.844145 16.981751 0.227922 0 +175 8.604837 8.604837 17.304231 0.384059 0 +176 6.466790 6.466790 17.950170 0.261564 0 +177 9.635887 9.635887 17.565953 0.645781 0 +178 7.750050 7.750050 17.226795 0.984939 0 +179 9.670796 9.670796 17.826946 0.384788 0 +180 14.403675 14.403675 17.685871 0.525864 0 +181 9.137232 9.137232 17.482781 0.728953 0 +182 9.876881 9.876881 17.826946 0.384788 0 +183 8.579402 8.579402 17.737244 0.474490 0 +184 12.544866 12.544866 17.466014 0.808451 0 +185 8.105213 8.105213 18.031133 0.740161 0 +186 11.534277 11.534277 17.255353 1.515941 0 +187 13.771462 13.771462 18.025133 0.746161 0 +188 11.457721 11.457721 18.280417 0.490876 0 +189 7.802379 7.802379 18.049049 1.222726 0 +190 8.665812 8.665812 17.965650 0.805643 0 +191 11.230922 11.230922 17.965650 0.805643 0 +192 9.690726 9.690726 18.025133 0.746161 0 +193 8.695821 8.695821 17.714428 1.056866 0 +194 12.149094 12.149094 18.036785 1.344666 0 +195 6.443993 6.443993 18.135953 1.245498 0 +196 9.385647 9.385647 18.618854 0.890506 0 +197 10.753240 10.753240 18.334684 1.174677 0 +198 9.233922 9.233922 18.126380 1.382981 0 +199 5.990353 5.990353 18.270729 1.110722 0 +200 8.181117 8.181117 18.002493 1.378959 0 +201 9.754680 9.754680 17.830875 0.940419 0 +202 7.702949 7.702949 17.830875 0.940419 0 +203 7.721974 7.721974 18.585496 0.795955 0 +204 10.242737 10.242737 18.402308 0.612767 0 +205 10.233953 10.233953 18.387530 0.383764 0 +206 10.730621 10.730621 19.056600 -0.041525 0 +207 11.983465 11.983465 18.509420 0.505654 0 +208 12.947464 12.947464 18.126380 1.382981 0 +209 10.908156 10.908156 18.403979 2.063928 0 +210 8.480391 8.480391 18.257990 1.251371 0 +211 7.584665 7.584665 18.257990 1.251371 0 +212 11.421907 11.421907 17.976201 2.214923 0 +213 6.013883 6.013883 18.121571 2.069553 0 +214 7.866359 7.866359 18.138853 2.329054 0 +215 12.380644 12.380644 18.549067 1.936406 0 +216 9.507537 9.507537 18.290636 2.238618 0 +217 9.298467 9.298467 18.298128 2.231126 0 +218 11.150234 11.150234 19.266510 1.262744 0 +219 11.535475 11.535475 19.093752 1.435502 0 +220 12.109866 12.109866 19.991457 0.284595 0 +221 11.474620 11.474620 19.294543 0.981508 0 +222 7.006106 7.006106 19.111347 1.164704 0 +223 9.301365 9.301365 19.093752 1.435502 0 +224 10.095562 10.095562 18.570957 1.958296 0 +225 6.726845 6.726845 18.570957 1.958296 0 +226 12.198109 12.198109 17.970736 2.558518 0 +227 13.752106 13.752106 18.004448 3.791782 0 +228 10.264627 10.264627 17.455432 4.056278 0 +229 10.138026 10.138026 17.428687 4.083024 0 +230 4.617037 4.617037 17.230802 4.552516 0 +231 11.016086 11.016086 17.254699 4.528619 0 +232 8.124335 8.124335 17.229841 4.281869 0 +233 10.898115 10.898115 16.913198 3.616056 0 +234 11.037969 11.037969 17.595542 2.894294 0 +235 12.177649 12.177649 17.740643 2.788610 0 +236 10.041513 10.041513 18.009017 2.520237 0 +237 11.648894 11.648894 18.423198 2.106056 0 +238 9.464337 9.464337 17.617773 3.225817 0 +239 11.999112 11.999112 17.381569 3.147684 0 +240 10.755855 10.755855 16.624520 3.865316 0 +241 9.993788 9.993788 16.681103 3.611934 0 +242 10.891659 10.891659 17.147767 3.342068 0 +243 11.823212 11.823212 16.663326 3.826509 0 +244 10.244918 10.244918 17.049368 3.243669 0 +245 8.537142 8.537142 16.485662 3.807376 0 +246 6.892226 6.892226 15.831689 4.251338 0 +247 13.948369 13.948369 16.279409 3.803617 0 +248 5.476624 5.476624 16.421115 3.661911 0 +249 9.586733 9.586733 17.050137 3.242900 0 +250 10.421795 10.421795 16.385567 3.602008 0 +251 9.382996 9.382996 17.586808 2.400767 0 +252 10.146519 10.146519 17.634521 2.353054 0 +253 9.597132 9.597132 17.966881 1.693841 0 +254 11.353078 11.353078 18.479345 1.181376 0 +255 9.227084 9.227084 18.603772 0.856501 0 +256 7.471401 7.471401 17.786014 1.482783 0 +257 9.830361 9.830361 18.533646 0.735152 0 +258 9.730137 9.730137 19.120312 0.148485 0 +259 12.416126 12.416126 17.718503 1.589380 0 +260 12.730227 12.730227 16.289174 3.018710 0 +261 11.924813 11.924813 16.121916 3.338357 0 +262 9.509080 9.509080 16.681255 2.779018 0 +263 5.530217 5.530217 16.472607 2.987666 0 +264 12.634131 12.634131 17.794698 1.665575 0 +265 8.123016 8.123016 18.588804 0.871470 0 +266 10.560474 10.560474 18.609898 0.892563 0 +267 7.067415 7.067415 18.150279 1.352182 0 +268 9.634399 9.634399 17.419340 2.241382 0 +269 13.057941 13.057941 17.248913 2.591152 0 +270 7.012512 7.012512 18.224980 2.449054 0 +271 9.653942 9.653942 19.195684 1.478350 0 +272 9.751230 9.751230 19.435485 0.404580 0 +273 11.921285 11.921285 19.237144 0.265317 0 +274 8.190022 8.190022 19.827486 -0.325025 0 +275 9.920032 9.920032 20.015243 -0.512782 0 +276 8.070713 8.070713 20.015243 -0.512782 0 +277 11.540664 11.540664 19.721905 -0.414021 0 +278 10.338007 10.338007 19.721905 -0.414021 0 +279 10.337017 10.337017 19.721905 -0.414021 0 +280 10.352870 10.352870 19.700492 -0.392609 0 +281 12.100791 12.100791 19.511397 -0.203514 0 +282 11.279264 11.279264 18.415279 0.697945 0 +283 8.427866 8.427866 18.865828 0.247397 0 +284 5.210785 5.210785 18.865828 0.247397 0 +285 8.073820 8.073820 18.706753 0.406472 0 +286 14.168975 14.168975 18.706753 0.406472 0 +287 8.020899 8.020899 18.190048 0.923177 0 +288 5.355337 5.355337 18.011363 0.438629 0 +289 7.135108 7.135108 17.968488 1.144737 0 +290 7.992529 7.992529 17.636871 0.813121 0 +291 10.951329 10.951329 18.422825 -0.475627 0 +292 9.556612 9.556612 18.147694 -0.200496 0 +293 8.720282 8.720282 18.500534 -0.553336 0 +294 9.224996 9.224996 18.123740 -0.176542 0 +295 6.156037 6.156037 17.323914 0.539477 0 +296 9.858310 9.858310 17.759966 0.187232 0 +297 10.907875 10.907875 17.910204 0.036995 0 +298 11.831874 11.831874 18.238551 -0.061731 0 +299 8.973599 8.973599 17.149681 1.027139 0 +300 8.085928 8.085928 16.982089 1.467903 0 +301 10.827044 10.827044 16.596427 1.853565 0 +302 7.486542 7.486542 16.544963 2.542380 0 +303 5.711353 5.711353 15.988842 3.098500 0 +304 9.088410 9.088410 15.346503 3.103489 0 +305 12.082218 12.082218 15.477221 2.972771 0 +306 10.161023 10.161023 15.477221 2.972771 0 +307 8.931696 8.931696 16.949973 2.137369 0 +308 10.187945 10.187945 16.441484 2.759606 0 +309 4.731625 4.731625 17.278876 1.808466 0 +310 10.360847 10.360847 17.092265 1.233440 0 +311 9.600545 9.600545 17.047213 1.278491 0 +312 9.543671 9.543671 17.364590 0.961114 0 +313 8.399960 8.399960 17.532006 1.555336 0 +314 11.530595 11.530595 17.899796 1.187546 0 +315 9.162852 9.162852 17.756504 1.444586 0 +316 8.825375 8.825375 16.788096 2.412994 0 +317 9.827699 9.827699 17.378258 2.277139 0 +318 8.589434 8.589434 17.588880 1.612210 0 +319 12.694501 12.694501 17.726550 1.431051 0 +320 11.135144 11.135144 18.715490 0.485600 0 +321 5.705885 5.705885 18.238375 0.919226 0 +322 7.883558 7.883558 17.588880 1.612210 0 +323 10.916514 10.916514 17.463161 1.694440 0 +324 7.555015 7.555015 18.049063 1.038279 0 +325 10.014571 10.014571 18.267074 0.400793 0 +326 12.342213 12.342213 18.959607 0.197994 0 +327 11.223638 11.223638 18.455599 0.212269 0 +328 9.578801 9.578801 18.455599 0.212269 0 +329 11.721221 11.721221 18.714740 -0.046873 0 +330 6.996411 6.996411 18.537792 -0.223821 0 +331 8.317932 8.317932 19.278614 -0.964643 0 +332 13.669557 13.669557 19.081916 -0.767945 0 +333 9.333934 9.333934 18.342516 -0.385658 0 +334 10.045526 10.045526 17.866513 0.447458 0 +335 8.978429 8.978429 17.893311 0.420661 0 +336 7.132362 7.132362 18.521073 -0.207101 0 +337 7.488959 7.488959 18.521073 -0.207101 0 +338 13.382599 13.382599 17.714754 0.242103 0 +339 8.413182 8.413182 16.463526 1.220228 0 +340 9.156986 9.156986 15.217216 1.609149 0 +341 7.094379 7.094379 15.797614 0.920891 0 +342 7.274345 7.274345 15.257634 1.378230 0 +343 5.886317 5.886317 14.996107 1.639757 0 +344 9.867840 9.867840 15.644862 1.073643 0 +345 7.600415 7.600415 15.037427 1.681077 0 +346 9.474006 9.474006 15.003232 1.715273 0 +347 8.841877 8.841877 14.616349 1.894245 0 +348 23.381169 8.184780 14.537342 1.832218 1 +349 7.611702 7.611702 14.988813 1.380747 0 +350 7.998229 7.998229 14.894325 1.475235 0 +351 8.184780 8.184780 14.640320 1.729240 0 +352 8.359252 8.359252 14.708652 1.660908 0 +353 5.777821 5.777821 15.363583 0.632875 0 +354 6.383058 6.383058 15.060778 0.935680 0 +355 8.255297 8.255297 14.649390 1.347068 0 +356 10.196856 10.196856 14.537342 1.832218 0 +357 9.702046 9.702046 14.459191 1.537267 0 +358 8.907539 8.907539 14.503793 1.492665 0 +359 6.840563 6.840563 14.103408 1.893050 0 +360 7.962058 7.962058 13.598345 2.386741 0 +361 4.203045 4.203045 13.429538 2.509128 0 +362 7.587466 7.587466 14.074512 1.864153 0 +363 10.178787 10.178787 14.430294 1.508371 0 +364 9.088539 9.088539 15.234237 0.689878 0 +365 1.673164 1.673164 15.708002 0.097138 0 +366 7.880992 7.880992 15.733646 0.071495 0 +367 7.969333 7.969333 15.728807 0.195308 0 +368 8.924932 8.924932 15.728807 0.195308 0 +369 4.439469 4.439469 15.608783 0.315332 0 +370 7.992543 7.992543 15.793133 0.130982 0 +371 8.300413 8.300413 15.963209 -0.158068 0 +372 7.902570 7.902570 16.460880 -0.655739 0 +373 6.030105 6.030105 16.439625 -0.677641 0 +374 6.289806 6.289806 16.439302 -0.677318 0 +375 8.838022 8.838022 16.599369 -0.837385 0 +376 5.525302 5.525302 15.892711 -0.130727 0 +377 7.217574 7.217574 16.029222 -0.304276 0 +378 5.151193 5.151193 15.801274 -0.076329 0 +379 9.654268 9.654268 15.384323 -0.949175 0 +380 8.332562 8.332562 15.121795 -1.995471 0 +381 9.838362 9.838362 15.074049 -1.948780 0 +382 10.652431 10.652431 15.251547 -2.125222 0 +383 6.562635 6.562635 15.120945 -1.995675 0 +384 4.128871 4.128871 14.936918 -1.811648 0 +385 7.862473 7.862473 14.637325 -1.968897 0 +386 4.572872 4.572872 14.869491 -2.201064 0 +387 5.521192 5.521192 15.075644 -2.040975 0 +388 8.541596 8.541596 14.822030 -2.153602 0 +389 6.334214 6.334214 15.057004 -2.388577 0 +390 4.300907 4.300907 14.266381 -3.179200 0 +391 4.400149 4.400149 14.263999 -3.173179 0 +392 6.563162 6.563162 14.055005 -2.967824 0 +393 5.145591 5.145591 14.055005 -2.967824 0 +394 9.979609 9.979609 14.031407 -2.944225 0 +395 5.292745 5.292745 12.993509 -1.951126 0 +396 6.868192 6.868192 12.567765 -1.525382 0 +397 5.543591 5.543591 12.600447 -1.513265 0 +398 3.905196 3.905196 12.574038 -1.531654 0 +399 6.517334 6.517334 12.803186 -1.716005 0 +400 5.503432 5.503432 13.695224 -2.608042 0 +401 3.130641 3.130641 13.828988 -2.822123 0 +402 3.836963 3.836963 13.618301 -3.032811 0 +403 5.545410 5.545410 14.026047 -3.019182 0 +404 4.493050 4.493050 14.023483 -3.016618 0 +405 8.123038 8.123038 14.102507 -3.517016 0 +406 8.654125 8.654125 14.297967 -3.291102 0 +407 4.678703 4.678703 13.639838 -2.632973 0 +408 5.830823 5.830823 13.203921 -2.197056 0 +409 6.388378 6.388378 13.406502 -2.399637 0 +410 3.474992 3.474992 13.406502 -2.399637 0 +411 7.557681 7.557681 12.911699 -1.904834 0 +412 3.083304 3.083304 12.260782 -2.250389 0 +413 0.279635 0.279635 12.260782 -2.250389 0 +414 4.262027 4.262027 13.604743 -2.550001 0 +415 6.891936 6.891936 13.448479 -2.357659 0 +416 5.005197 5.005197 14.706181 -3.651439 0 +417 0.499105 0.499105 13.855964 -2.801223 0 +418 5.527371 5.527371 13.082569 -3.072175 0 +419 5.597482 5.597482 12.026603 -2.031869 0 +420 4.991155 4.991155 11.951146 -1.940753 0 +421 7.835988 7.835988 11.733583 -1.738850 0 +422 5.624893 5.624893 12.894224 -2.911915 0 +423 4.997367 4.997367 11.593225 -1.598492 0 +424 3.200629 3.200629 11.153218 -1.158485 0 +425 5.665661 5.665661 11.146653 -1.151920 0 +426 9.618998 9.618998 11.101214 -1.106481 0 +427 6.332037 6.332037 11.532358 -1.537625 0 +428 2.580145 2.580145 11.561083 -1.578774 0 +429 4.835941 4.835941 12.030025 -2.130870 0 +430 3.817875 3.817875 11.400850 -1.501696 0 +431 4.816852 4.816852 11.975480 -2.185415 0 +432 6.104036 6.104036 13.027082 -3.355199 0 +433 4.949577 4.949577 13.244553 -3.610849 0 +434 1.879642 1.879642 12.054193 -3.763456 0 +435 5.319233 5.319233 12.009015 -4.373266 0 +436 5.823573 5.823573 12.009015 -4.373266 0 +437 4.145368 4.145368 12.009015 -4.373266 0 +438 2.691672 2.691672 11.878367 -4.487684 0 +439 3.695342 3.695342 11.701783 -4.311100 0 +440 -0.695224 -0.695224 10.486591 -4.146611 0 +441 1.543020 1.543020 11.184007 -3.793324 0 +442 4.895032 4.895032 11.234223 -4.894243 0 +443 1.713209 1.713209 11.212757 -4.872777 0 +444 3.078912 3.078912 11.566334 -5.226354 0 +445 2.613552 2.613552 11.326330 -5.004306 0 +446 1.728368 1.728368 11.121679 -4.963855 0 +447 2.545995 2.545995 11.369256 -5.047232 0 +448 4.589891 4.589891 11.352152 -5.030128 0 +449 2.840381 2.840381 11.401490 -5.079466 0 +450 2.669609 2.669609 11.591050 -5.433226 0 +451 6.299739 6.299739 12.122904 -5.800880 0 +452 3.169990 3.169990 11.794997 -5.637173 0 +453 5.709799 5.709799 11.750190 -5.428166 0 +454 -0.824434 -0.824434 11.049524 -4.709544 0 +455 5.862470 5.862470 11.723355 -5.401331 0 +456 18.652669 3.169990 10.580246 -4.240266 1 +457 3.161012 3.161012 11.671545 -5.331564 0 +458 2.736013 2.736013 11.671545 -5.331564 0 +459 4.239602 4.239602 11.370021 -4.405610 0 +460 5.460174 5.460174 11.983760 -5.019349 0 +461 5.911840 5.911840 12.399270 -6.059290 0 +462 -1.187414 -1.187414 12.165547 -5.742824 0 +463 5.605434 5.605434 13.429308 -7.006585 0 +464 2.754378 2.754378 14.378958 -8.038978 0 +465 4.272463 4.272463 14.867402 -8.545378 0 +466 3.541624 3.541624 14.279138 -8.770381 0 +467 0.185253 0.185253 14.460769 -8.952012 0 +468 3.482205 3.482205 15.323209 -9.851183 0 +469 -0.736499 -0.736499 13.973959 -8.894007 0 +470 2.539976 2.539976 14.246366 -9.166414 0 +471 5.020245 5.020245 14.824536 -10.538033 0 +472 2.143252 2.143252 14.721528 -10.806542 0 +473 -14.628129 1.696534 14.348131 -10.955063 1 +474 3.211361 3.211361 12.976464 -10.275347 0 +475 -0.663691 -0.663691 13.185284 -10.066528 0 +476 0.552242 0.552242 12.853966 -10.152849 0 +477 -0.080934 -0.080934 11.836815 -10.581122 0 +478 -1.003482 -1.003482 11.340857 -10.236374 0 +479 1.957493 1.957493 10.478555 -9.374072 0 +480 -3.361698 -3.361698 10.539870 -9.374398 0 +481 1.696534 1.696534 10.539870 -9.374398 0 +482 4.860231 4.860231 10.554160 -9.298467 0 +483 -2.318603 -2.318603 11.124527 -9.868834 0 +484 -0.733239 -0.733239 10.550038 -9.294345 0 +485 -0.038200 -0.038200 10.806957 -9.551264 0 +486 1.350559 1.350559 9.951934 -8.696241 0 +487 1.559378 1.559378 9.222653 -8.057181 0 +488 -1.755975 -1.755975 9.144510 -7.979038 0 +489 0.627846 0.627846 9.144510 -7.979038 0 +490 0.182254 0.182254 9.906824 -8.741352 0 +491 0.582736 0.582736 10.036788 -8.871316 0 +492 1.430943 1.430943 10.158094 -9.297982 0 +493 6.045474 6.045474 9.906824 -8.741352 0 +494 2.115916 2.115916 9.640037 -8.779925 0 +495 5.013403 5.013403 8.474157 -7.905116 0 +496 2.450726 2.450726 8.228316 -7.368204 0 +497 2.721429 2.721429 8.605954 -7.745842 0 +498 -1.037838 -1.037838 8.605954 -7.745842 0 +499 0.430056 0.430056 8.605954 -7.745842 0 +500 0.284520 0.284520 8.561873 -7.701761 0 +501 -0.233270 -0.233270 8.808920 -7.948808 0 +502 -2.625151 -2.625151 8.924437 -8.355397 0 +503 -2.413166 -2.413166 9.549345 -8.980304 0 +504 -1.094948 -1.094948 9.181555 -9.367505 0 +505 2.537661 2.537661 9.033974 -9.219923 0 +506 -0.238393 -0.238393 8.516936 -8.702885 0 +507 -0.092975 -0.092975 8.563166 -9.029706 0 +508 1.373833 1.373833 7.671468 -8.148254 0 +509 -2.066324 -2.066324 6.934499 -7.411285 0 +510 -0.493397 -0.493397 6.488480 -6.965267 0 +511 2.014530 2.014530 7.011178 -7.487965 0 +512 1.025668 1.025668 7.487417 -8.340964 0 +513 -2.145715 -2.145715 7.487417 -8.340964 0 +514 -1.821600 -1.821600 8.206499 -9.060046 0 +515 -3.266027 -3.266027 9.126253 -9.603039 0 +516 -0.426773 -0.426773 9.126253 -9.603039 0 +517 0.121232 0.121232 9.846584 -10.323370 0 +518 2.465783 2.465783 9.670341 -10.147127 0 +519 -3.011704 -3.011704 8.951845 -9.805391 0 +520 -1.593874 -1.593874 8.854164 -9.840957 0 +521 -0.238189 -0.238189 8.231858 -9.218651 0 +522 0.106509 0.106509 7.757179 -8.743972 0 +523 -7.543083 -7.543083 8.975374 -10.038212 0 +524 -2.866531 -2.866531 8.975374 -10.038212 0 +525 0.303255 0.303255 8.190985 -10.249213 0 +526 1.633585 1.633585 8.560060 -10.618287 0 +527 3.273476 3.273476 8.560060 -10.618287 0 +528 -1.442878 -1.442878 8.560060 -10.618287 0 +529 -3.908796 -3.908796 8.835319 -11.155625 0 +530 -0.157968 -0.157968 8.286159 -11.171915 0 +531 -0.531419 -0.531419 7.649997 -10.837744 0 +532 -1.029114 -1.029114 7.800993 -10.686749 0 +533 -0.341502 -0.341502 7.800993 -10.686749 0 +534 -1.160153 -1.160153 7.672243 -10.960878 0 +535 -4.418606 -4.418606 7.613339 -11.223731 0 +536 1.315229 1.315229 7.251516 -10.861908 0 +537 -2.191284 -2.191284 7.575781 -10.864416 0 +538 -3.273143 -3.273143 7.944856 -11.233491 0 +539 -3.539737 -3.539737 7.414903 -11.025294 0 +540 -3.017166 -3.017166 6.122166 -10.418292 0 +541 -1.644318 -1.644318 6.122166 -10.418292 0 +542 -3.314391 -3.314391 6.122166 -10.418292 0 +543 -2.148063 -2.148063 5.498660 -9.881229 0 +544 -0.252086 -0.252086 4.275164 -10.309496 0 +545 -1.805196 -1.805196 4.827314 -11.115179 0 +546 -3.509218 -3.509218 3.831438 -10.377724 0 +547 -4.967225 -4.967225 3.759604 -10.305890 0 +548 -4.357887 -4.357887 3.971547 -10.259412 0 +549 0.535519 0.535519 2.760661 -9.306946 0 +550 13.547418 -3.314391 2.374110 -9.002891 1 +551 -3.660851 -3.660851 3.172002 -10.014772 0 +552 -3.143933 -3.143933 4.036477 -10.665258 0 +553 -0.383074 -0.383074 4.726713 -11.569482 0 +554 -4.015029 -4.015029 5.226349 -12.244786 0 +555 -3.993904 -3.993904 6.207155 -13.528856 0 +556 -3.984021 -3.984021 5.424119 -12.745820 0 +557 -6.592861 -6.592861 5.116996 -12.438697 0 +558 -3.705357 -3.705357 3.984588 -11.395301 0 +559 -1.513520 -1.513520 3.855850 -11.823892 0 +560 -1.973254 -1.973254 3.953448 -11.364161 0 +561 -4.192480 -4.192480 3.972216 -11.382929 0 +562 -3.421385 -3.421385 3.410123 -10.820836 0 +563 -6.806633 -6.806633 2.692188 -10.660230 0 +564 -1.300189 -1.300189 3.121576 -11.109383 0 +565 -6.456484 -6.456484 3.436372 -11.466430 0 +566 -5.272760 -5.272760 2.925413 -10.955471 0 +567 -5.371250 -5.371250 2.842293 -10.830100 0 +568 -2.924654 -2.924654 2.790071 -11.175030 0 +569 -2.863352 -2.863352 3.115339 -11.674911 0 +570 -4.487874 -4.487874 3.658482 -12.218054 0 +571 -4.412896 -4.412896 3.916005 -12.605790 0 +572 -3.185967 -3.185967 3.619695 -12.309479 0 +573 -4.810513 -4.810513 2.915812 -11.741604 0 +574 -2.511660 -2.511660 3.620352 -12.596101 0 +575 -4.279786 -4.279786 3.791655 -13.412681 0 +576 -5.758769 -5.758769 3.970091 -12.945840 0 +577 -6.560281 -6.560281 2.518195 -12.139221 0 +578 -2.960049 -2.960049 1.981907 -11.437697 0 +579 -3.733358 -3.733358 2.667231 -12.123020 0 +580 -4.344892 -4.344892 2.600813 -12.056603 0 +581 -6.356539 -6.356539 2.162541 -11.618330 0 +582 -8.066854 -8.066854 2.030501 -11.651527 0 +583 -5.838075 -5.838075 1.916214 -12.039979 0 +584 -2.310525 -2.310525 2.962012 -13.572131 0 +585 -5.061883 -5.061883 3.062592 -14.129493 0 +586 -7.902661 -7.902661 3.760352 -14.827253 0 +587 -7.654868 -7.654868 3.649729 -14.937876 0 +588 -2.992487 -2.992487 2.929761 -14.447300 0 +589 -5.305060 -5.305060 2.951969 -14.240116 0 +590 -4.727895 -4.727895 2.622998 -13.911144 0 +591 -7.806376 -7.806376 2.622998 -13.911144 0 +592 -5.533451 -5.533451 1.922773 -13.533945 0 +593 -4.720891 -4.720891 1.986777 -13.597948 0 +594 -5.644073 -5.644073 2.507102 -14.118274 0 +595 -6.054865 -6.054865 2.825490 -14.436662 0 +596 -9.702415 -9.702415 2.887155 -14.498327 0 +597 -9.498429 -9.498429 2.887155 -14.498327 0 +598 -2.493494 -2.493494 3.048636 -14.995011 0 +599 -8.335606 -8.335606 3.551274 -15.497649 0 +600 -5.805586 -5.805586 3.171096 -15.117471 0 +601 -5.601854 -5.601854 2.966959 -15.076688 0 +602 -5.973188 -5.973188 3.495245 -16.380830 0 +603 -4.030868 -4.030868 2.554052 -16.584334 0 +604 -8.311293 -8.311293 3.682921 -16.568506 0 +605 -3.100040 -3.100040 3.682921 -16.568506 0 +606 -7.535112 -7.535112 3.506708 -16.392293 0 +607 -7.015141 -7.015141 2.922896 -16.953178 0 +608 -7.465775 -7.465775 2.893797 -16.924078 0 +609 -2.258369 -2.258369 3.291708 -16.177293 0 +610 -6.442793 -6.442793 2.922864 -15.808449 0 +611 -9.013013 -9.013013 2.125692 -15.011277 0 +612 -7.466331 -7.466331 1.764878 -14.650464 0 +613 -8.716577 -8.716577 1.981141 -14.866727 0 +614 -9.905082 -9.905082 1.981141 -14.866727 0 +615 -7.192530 -7.192530 1.839250 -14.724835 0 +616 -3.709826 -3.709826 1.192530 -15.222812 0 +617 -4.835126 -4.835126 1.981141 -14.866727 0 +618 -5.347735 -5.347735 0.386000 -13.271585 0 +619 -7.256794 -7.256794 0.802973 -12.854612 0 +620 -6.008870 -6.008870 1.242898 -13.294536 0 +621 -5.710140 -5.710140 0.802973 -12.854612 0 +622 -7.138076 -7.138076 -0.166413 -12.719173 0 +623 -5.486622 -5.486622 0.691131 -13.669095 0 +624 -7.423230 -7.423230 -0.061292 -12.916673 0 +625 -5.992552 -5.992552 0.031051 -13.009016 0 +626 -6.025819 -6.025819 0.031051 -13.009016 0 +627 -5.763488 -5.763488 -0.061292 -12.916673 0 +628 -9.152842 -9.152842 0.643131 -13.621095 0 +629 -4.947763 -4.947763 -0.267572 -13.337683 0 +630 -5.312095 -5.312095 -0.603021 -13.673132 0 +631 -5.140594 -5.140594 -0.493181 -13.782972 0 +632 -8.114486 -8.114486 -0.281520 -13.323736 0 +633 -6.488982 -6.488982 -0.309284 -13.966869 0 +634 -7.678385 -7.678385 -0.291117 -14.555343 0 +635 -10.031836 -10.031836 -0.896886 -14.459884 0 +636 -7.918713 -7.918713 -0.896886 -14.459884 0 +637 -6.802628 -6.802628 -0.587367 -15.250060 0 +638 -8.837612 -8.837612 -0.727296 -15.389990 0 +639 -8.622168 -8.622168 -0.421981 -15.806991 0 +640 -11.997592 -11.997592 -0.721350 -16.522985 0 +641 -8.803812 -8.803812 -0.201202 -17.043133 0 +642 -8.840204 -8.840204 -0.312285 -16.996481 0 +643 -6.756679 -6.756679 -0.753566 -16.555200 0 +644 -6.489111 -6.489111 -1.234777 -16.073989 0 +645 -9.432196 -9.432196 -0.560687 -17.046938 0 +646 -8.058643 -8.058643 -1.064698 -16.610527 0 +647 -8.654383 -8.654383 -1.371945 -16.308463 0 +648 -7.610917 -7.610917 -1.418007 -16.257218 0 +649 -9.723912 -9.723912 -1.418007 -16.257218 0 +650 -9.025920 -9.025920 -0.740110 -16.935114 0 +651 -13.479297 -13.479297 -0.461714 -17.145910 0 +652 -11.460973 -11.460973 -0.217291 -17.390333 0 +653 -9.836700 -9.836700 -0.706310 -16.901314 0 +654 -10.134987 -10.134987 -0.742702 -16.937706 0 +655 -6.124257 -6.124257 -1.000439 -16.308327 0 +656 -7.669710 -7.669710 -1.442329 -16.609511 0 +657 -25.717885 -9.025920 -1.994991 -16.056849 1 +658 -9.732316 -9.732316 -1.327212 -15.981554 0 +659 -9.400018 -9.400018 -1.994991 -16.056849 0 +660 -7.349048 -7.349048 -2.138168 -15.913672 0 +661 -6.918614 -6.918614 -2.039774 -16.012066 0 +662 -4.644621 -4.644621 -1.100392 -15.754733 0 +663 -7.814512 -7.814512 -1.374915 -15.347208 0 +664 -6.999516 -6.999516 -1.719792 -15.002332 0 +665 -10.638205 -10.638205 -1.719792 -15.002332 0 +666 -9.907166 -9.907166 -1.752506 -14.370272 0 +667 -7.567737 -7.567737 -1.717077 -14.405701 0 +668 -9.391755 -9.391755 -2.450894 -13.671884 0 +669 -7.753135 -7.753135 -2.389669 -14.150705 0 +670 -8.054450 -8.054450 -2.929273 -13.193505 0 +671 -9.472058 -9.472058 -2.272019 -13.850759 0 +672 -8.361062 -8.361062 -2.118481 -13.990420 0 +673 -7.271663 -7.271663 -1.604673 -14.504228 0 +674 -8.427563 -8.427563 -1.941543 -14.181235 0 +675 -7.340866 -7.340866 -2.611289 -13.511489 0 +676 -8.523586 -8.523586 -2.245041 -14.192503 0 +677 -11.649602 -11.649602 -2.429402 -14.008142 0 +678 -8.061389 -8.061389 -3.226213 -13.211331 0 +679 -9.327534 -9.327534 -3.129554 -13.307991 0 +680 -7.578625 -7.578625 -2.695602 -13.844772 0 +681 -8.270187 -8.270187 -3.179044 -13.258501 0 +682 -6.799103 -6.799103 -2.296456 -14.243919 0 +683 -11.897201 -11.897201 -1.749922 -14.972202 0 +684 -6.105954 -6.105954 -2.000122 -14.540252 0 +685 -6.308229 -6.308229 -1.829805 -14.710570 0 +686 -8.218772 -8.218772 -1.731857 -15.123268 0 +687 -7.465009 -7.465009 -1.328047 -15.719125 0 +688 -9.929549 -9.929549 -0.897629 -16.149543 0 +689 -8.053036 -8.053036 -0.644230 -15.896144 0 +690 -8.812181 -8.812181 -0.721288 -15.819086 0 +691 -11.775775 -11.775775 -1.031546 -15.508829 0 +692 -9.292914 -9.292914 -0.721288 -15.819086 0 +693 -8.089849 -8.089849 -0.644230 -15.896144 0 +694 -10.969398 -10.969398 -0.407474 -17.216887 0 +695 -12.694388 -12.694388 -1.181684 -17.077759 0 +696 -7.910436 -7.910436 -0.068489 -18.190954 0 +697 -9.129722 -9.129722 -0.409930 -18.175898 0 +698 -10.660551 -10.660551 -2.005819 -17.740754 0 +699 -11.503712 -11.503712 -1.524843 -18.334255 0 +700 -6.970637 -6.970637 -1.524843 -18.334255 0 +701 -7.484025 -7.484025 -1.782309 -18.460539 0 +702 -11.203502 -11.203502 -2.332060 -18.066995 0 +703 -7.645138 -7.645138 -2.518332 -17.880723 0 +704 -10.199528 -10.199528 -2.895493 -17.503562 0 +705 -7.888185 -7.888185 -2.967228 -17.447497 0 +706 -12.432061 -12.432061 -2.435747 -17.978979 0 +707 -11.482637 -11.482637 -1.251547 -19.163179 0 +708 -14.004683 -14.004683 -2.337757 -18.061298 0 +709 -9.873287 -9.873287 -2.427912 -17.971144 0 +710 -10.207363 -10.207363 -2.251490 -18.147565 0 +711 -12.076098 -12.076098 -2.251490 -18.147565 0 +712 -9.351541 -9.351541 -2.173387 -18.069461 0 +713 -10.121424 -10.121424 -2.792862 -17.449986 0 +714 -10.631217 -10.631217 -3.035069 -17.363986 0 +715 -9.994583 -9.994583 -2.259653 -17.983195 0 +716 -10.812405 -10.812405 -2.949891 -17.449164 0 +717 -11.948369 -11.948369 -2.889291 -17.388564 0 +718 8.443520 -10.207363 -3.615804 -16.798922 1 +719 -13.624900 -13.624900 -3.566211 -16.711645 0 +720 -9.983922 -9.983922 -3.697051 -16.545797 0 +721 -7.574850 -7.574850 -3.649616 -16.339550 0 +722 -8.641288 -8.641288 -3.622406 -16.620442 0 +723 -10.607213 -10.607213 -3.495565 -16.493601 0 +724 -9.434477 -9.434477 -3.898877 -16.090289 0 +725 -9.205209 -9.205209 -3.652368 -16.336798 0 +726 -11.799755 -11.799755 -3.453147 -16.514698 0 +727 -7.297338 -7.297338 -2.834490 -17.133355 0 +728 -11.497214 -11.497214 -2.267255 -17.412340 0 +729 -10.138928 -10.138928 -2.187089 -16.681864 0 +730 -10.712078 -10.712078 -2.187089 -16.681864 0 +731 -8.922397 -8.922397 -2.915529 -15.953424 0 +732 -9.839797 -9.839797 -3.303184 -15.494596 0 +733 -8.428877 -8.428877 -3.056675 -15.741104 0 +734 -11.203789 -11.203789 -3.358568 -15.510385 0 +735 -9.398890 -9.398890 -3.415425 -16.264170 0 +736 -10.705525 -10.705525 -3.340779 -16.338816 0 +737 -8.654351 -8.654351 -2.458968 -17.818888 0 +738 -8.913498 -8.913498 -2.458968 -17.818888 0 +739 -14.056843 -14.056843 -2.458968 -17.818888 0 +740 -8.479419 -8.479419 -3.616584 -16.762018 0 +741 -9.064292 -9.064292 -2.458968 -17.818888 0 +742 -11.963697 -11.963697 -2.509506 -17.170089 0 +743 -7.918956 -7.918956 -3.172250 -16.406007 0 +744 -8.893071 -8.893071 -2.453181 -17.125076 0 +745 -11.978043 -11.978043 -1.695487 -17.882771 0 +746 -10.506286 -10.506286 -1.942463 -18.436139 0 +747 -11.985041 -11.985041 -1.597522 -18.781080 0 +748 -12.585050 -12.585050 -1.193377 -19.221824 0 +749 -13.011362 -13.011362 -1.193377 -19.221824 0 +750 -8.661657 -8.661657 -1.521559 -19.491012 0 +751 -10.207601 -10.207601 -1.521559 -19.491012 0 +752 -10.189301 -10.189301 -1.615822 -18.799380 0 +753 -6.594348 -6.594348 -2.004469 -18.410732 0 +754 -9.789129 -9.789129 -2.052858 -18.362344 0 +755 -9.222485 -9.222485 -2.051107 -18.364095 0 +756 -7.785350 -7.785350 -2.423251 -18.589320 0 +757 -12.943592 -12.943592 -2.259448 -18.753123 0 +758 -11.676527 -11.676527 -1.615822 -18.799380 0 +759 -13.376047 -13.376047 -1.207002 -19.171600 0 +760 -10.901260 -10.901260 -1.105132 -19.069730 0 +761 -10.603267 -10.603267 -1.708391 -18.466471 0 +762 -10.935113 -10.935113 -2.438315 -17.736547 0 +763 -8.887820 -8.887820 -2.095659 -18.282943 0 +764 -10.087431 -10.087431 -1.641725 -18.533137 0 +765 -9.862144 -9.862144 -1.006042 -18.745178 0 +766 -9.875610 -9.875610 -2.505344 -17.595850 0 +767 -13.787036 -13.787036 -2.401481 -17.699713 0 +768 -12.572964 -12.572964 -2.661687 -17.471029 0 +769 -7.673684 -7.673684 -3.026587 -17.148275 0 +770 -6.286761 -6.286761 -3.403508 -16.771354 0 +771 -8.308769 -8.308769 -3.671243 -16.461473 0 +772 -8.221577 -8.221577 -3.671243 -16.461473 0 +773 -10.528450 -10.528450 -3.905278 -16.195917 0 +774 -10.667655 -10.667655 -4.068707 -15.682512 0 +775 -13.192959 -13.192959 -4.284206 -15.440081 0 +776 -8.484980 -8.484980 -3.467029 -16.257258 0 +777 -8.194163 -8.194163 -3.070691 -16.086382 0 +778 -10.050597 -10.050597 -3.064374 -16.080065 0 +779 -9.063724 -9.063724 -2.350779 -16.793659 0 +780 -10.066358 -10.066358 -1.818750 -16.377697 0 +781 -10.441165 -10.441165 -1.759431 -16.437015 0 +782 -10.201032 -10.201032 -1.818750 -16.377697 0 +783 -9.098223 -9.098223 -2.297895 -16.846544 0 +784 -12.829292 -12.829292 -2.010255 -17.146819 0 +785 -9.572219 -9.572219 -2.692047 -17.409148 0 +786 -9.578537 -9.578537 -1.400063 -17.757011 0 +787 -8.875957 -8.875957 -1.104937 -18.039502 0 +788 -6.473736 -6.473736 -1.599477 -17.544962 0 +789 -8.898824 -8.898824 -1.599477 -17.544962 0 +790 -8.342426 -8.342426 -2.266312 -16.878127 0 +791 -13.415238 -13.415238 -0.993542 -17.202904 0 +792 -4.318092 -4.318092 -0.340125 -18.804313 0 +793 -11.400119 -11.400119 -0.759957 -18.384482 0 +794 -8.086774 -8.086774 0.939858 -19.136304 0 +795 -12.536231 -12.536231 0.412671 -18.609117 0 +796 -11.160834 -11.160834 1.608785 -19.406434 0 +797 -10.442468 -10.442468 1.790913 -19.588562 0 +798 -6.271823 -6.271823 1.631653 -19.383567 0 +799 -7.609191 -7.609191 2.319737 -20.071650 0 +800 -9.725720 -9.725720 2.727157 -20.433160 0 +801 -8.258947 -8.258947 2.681334 -20.478983 0 +802 -8.853002 -8.853002 2.447473 -21.349660 0 +803 -6.288309 -6.288309 2.447473 -21.349660 0 +804 -11.002650 -11.002650 1.654608 -19.360611 0 +805 -9.905660 -9.905660 0.528883 -19.431069 0 +806 -6.452553 -6.452553 0.906350 -18.612353 0 +807 -9.451093 -9.451093 0.231632 -19.133818 0 +808 -6.623700 -6.623700 0.288792 -17.994795 0 +809 -15.518919 -15.518919 0.060491 -17.766494 0 +810 -8.660969 -8.660969 -0.048101 -17.657902 0 +811 -12.053808 -12.053808 -0.542785 -18.152586 0 +812 -6.397409 -6.397409 -0.580373 -18.114998 0 +813 -11.636788 -11.636788 -0.580373 -18.114998 0 +814 -9.680276 -9.680276 -0.638831 -18.263356 0 +815 -8.466938 -8.466938 -0.463420 -18.438767 0 +816 -7.471020 -7.471020 -1.018390 -18.342163 0 +817 -11.608259 -11.608259 -1.018390 -18.342163 0 +818 -8.563042 -8.563042 -1.018390 -18.342163 0 +819 -10.589499 -10.589499 -1.417694 -17.973635 0 +820 -8.002144 -8.002144 -0.807272 -18.584058 0 +821 -9.347686 -9.347686 -1.358403 -18.032927 0 +822 -9.695665 -9.695665 -1.579434 -17.781119 0 +823 -11.666017 -11.666017 -1.641128 -17.719424 0 +824 -8.521872 -8.521872 -1.846304 -17.368883 0 +825 -10.158995 -10.158995 -1.918986 -17.441566 0 +826 -12.508431 -12.508431 -1.568445 -17.646742 0 +827 -8.633912 -8.633912 -0.654764 -18.143556 0 +828 -10.647953 -10.647953 -0.257367 -18.540954 0 +829 -11.338906 -11.338906 -0.183199 -18.615121 0 +830 -10.274801 -10.274801 -0.439601 -18.255771 0 +831 -10.233446 -10.233446 -0.439601 -18.255771 0 +832 -5.802513 -5.802513 0.025827 -18.290956 0 +833 -9.399160 -9.399160 -0.224479 -18.040649 0 +834 -7.458099 -7.458099 0.432187 -18.692143 0 +835 -9.132564 -9.132564 1.156693 -18.424518 0 +836 -9.607594 -9.607594 0.956806 -18.210830 0 +837 -13.156607 -13.156607 1.027440 -18.281463 0 +838 -6.104133 -6.104133 1.027440 -18.281463 0 +839 7.701354 -8.627012 0.490559 -17.744583 1 +840 -5.666991 -5.666991 0.714457 -17.717465 0 +841 -5.010128 -5.010128 0.703727 -17.531416 0 +842 -9.129978 -9.129978 1.620508 -16.696275 0 +843 -8.627012 -8.627012 1.196916 -16.272683 0 +844 -6.093441 -6.093441 0.790409 -15.706607 0 +845 -8.501504 -8.501504 0.790409 -15.706607 0 +846 -6.955774 -6.955774 1.739069 -16.398702 0 +847 -7.537883 -7.537883 1.739069 -16.398702 0 +848 -6.353031 -6.353031 1.622828 -16.282462 0 +849 -8.413845 -8.413845 0.849326 -15.508959 0 +850 -9.921840 -9.921840 -0.200358 -14.459276 0 +851 -9.254802 -9.254802 0.215441 -14.904275 0 +852 -7.187916 -7.187916 -1.077569 -13.998198 0 +853 -6.804699 -6.804699 -1.077569 -13.998198 0 +854 -3.821995 -3.821995 -1.484674 -13.591093 0 +855 -8.941027 -8.941027 -1.433411 -13.255424 0 +856 -7.329817 -7.329817 -1.756458 -12.932376 0 +857 -5.660773 -5.660773 -1.707594 -13.305267 0 +858 -5.748305 -5.748305 -1.390320 -13.298514 0 +859 -7.344417 -7.344417 -1.433411 -13.255424 0 +860 -7.963998 -7.963998 -0.294135 -14.374185 0 +861 -7.707752 -7.707752 0.353113 -15.021433 0 +862 -9.081348 -9.081348 0.849326 -15.508959 0 +863 -9.853057 -9.853057 0.847627 -15.507261 0 +864 -7.859553 -7.859553 0.447082 -14.822913 0 +865 -6.093459 -6.093459 1.131720 -15.223168 0 +866 -6.882726 -6.882726 1.962823 -16.622456 0 +867 -7.045724 -7.045724 0.486540 -15.146173 0 +868 -7.506431 -7.506431 0.797015 -14.888462 0 +869 -10.560757 -10.560757 1.131720 -15.223168 0 +870 -4.134631 -4.134631 2.006073 -16.097520 0 +871 -7.334160 -7.334160 1.717637 -16.385957 0 +872 -2.543407 -2.543407 2.696338 -16.787786 0 +873 -5.551132 -5.551132 3.359296 -17.413601 0 +874 -5.557472 -5.557472 3.359296 -17.413601 0 +875 -9.597129 -9.597129 2.679465 -16.444917 0 +876 -6.234376 -6.234376 2.265183 -16.030635 0 +877 -5.719000 -5.719000 3.327815 -15.796567 0 +878 -10.253305 -10.253305 3.500156 -15.968909 0 +879 -7.027153 -7.027153 4.107391 -16.576143 0 +880 -3.277825 -3.277825 4.002682 -16.471434 0 +881 -8.024966 -8.024966 3.074034 -15.542787 0 +882 -4.088218 -4.088218 2.181800 -14.524466 0 +883 -9.886444 -9.886444 1.833792 -14.176458 0 +884 -5.465992 -5.465992 1.679668 -14.022334 0 +885 -4.626248 -4.626248 0.993107 -13.335774 0 +886 -8.139784 -8.139784 0.966924 -13.309590 0 +887 -6.171333 -6.171333 1.446066 -13.788732 0 +888 -7.487844 -7.487844 1.144210 -13.486877 0 +889 -4.201900 -4.201900 2.112739 -14.455406 0 +890 -4.935970 -4.935970 2.181800 -14.524466 0 +891 -8.051641 -8.051641 2.776652 -14.008275 0 +892 -6.283575 -6.283575 2.717340 -13.948963 0 +893 -6.577917 -6.577917 2.001588 -13.233210 0 +894 -5.582490 -5.582490 2.034909 -13.199889 0 +895 -4.613300 -4.613300 2.531026 -13.696006 0 +896 -6.489681 -6.489681 2.132861 -13.297842 0 +897 -5.615811 -5.615811 2.315248 -13.546871 0 +898 -5.383020 -5.383020 2.099540 -13.331163 0 +899 -3.559161 -3.559161 2.488447 -13.653427 0 +900 -7.797923 -7.797923 2.687918 -13.453957 0 +901 -9.805537 -9.805537 1.992106 -12.758146 0 +902 -4.040180 -4.040180 2.132861 -13.297842 0 +903 -0.019255 -0.019255 2.837078 -14.002058 0 +904 -5.857598 -5.857598 2.744540 -13.510579 0 +905 -4.796007 -4.796007 3.025108 -13.512337 0 +906 -3.665905 -3.665905 3.873442 -13.465457 0 +907 -2.701801 -2.701801 4.681279 -13.907879 0 +908 -6.459681 -6.459681 4.913691 -14.007474 0 +909 -6.111748 -6.111748 4.560972 -13.465441 0 +910 -4.546891 -4.546891 4.369087 -13.273556 0 +911 -0.992039 -0.992039 4.369087 -13.273556 0 +912 -5.243615 -5.243615 4.913691 -14.007474 0 +913 -5.849748 -5.849748 3.872676 -12.966459 0 +914 -8.657230 -8.657230 3.340663 -12.245132 0 +915 0.013710 0.013710 3.767670 -12.672139 0 +916 -4.272747 -4.272747 4.193908 -13.098377 0 +917 -3.859143 -3.859143 4.739573 -13.285066 0 +918 -0.285185 -0.285185 5.746194 -13.631048 0 +919 -0.368422 -0.368422 5.311762 -13.857256 0 +920 -4.452234 -4.452234 4.739573 -13.285066 0 +921 -3.942427 -3.942427 4.414149 -12.505867 0 +922 -5.078934 -5.078934 4.477141 -12.361995 0 +923 -5.528790 -5.528790 4.789178 -12.507464 0 +924 -6.955623 -6.955623 4.449488 -12.278772 0 +925 -5.044986 -5.044986 4.415567 -12.133853 0 +926 -3.839739 -3.839739 4.045286 -11.724764 0 +927 -2.714237 -2.714237 3.700820 -11.380299 0 +928 -2.209695 -2.209695 2.625013 -10.304491 0 +929 -2.679171 -2.679171 3.348472 -11.027951 0 +930 -1.227082 -1.227082 3.700820 -11.380299 0 +931 -4.513613 -4.513613 2.819757 -10.499235 0 +932 -3.503033 -3.503033 1.724761 -9.404239 0 +933 -4.045859 -4.045859 1.880733 -9.560211 0 +934 -1.208698 -1.208698 2.373978 -9.422515 0 +935 -3.343872 -3.343872 2.473880 -9.522417 0 +936 -3.914642 -3.914642 2.388507 -9.407986 0 +937 -2.926197 -2.926197 1.949169 -8.968648 0 +938 -2.127830 -2.127830 1.767915 -8.773980 0 +939 -5.020633 -5.020633 2.025069 -8.712812 0 +940 -3.509739 -3.509739 2.257104 -8.944848 0 +941 -5.458266 -5.458266 2.448082 -9.135825 0 +942 -4.941477 -4.941477 2.432743 -9.120486 0 +943 -3.524269 -3.524269 2.115037 -8.802781 0 +944 -2.819701 -2.819701 2.483792 -8.367135 0 +945 -4.930667 -4.930667 2.191604 -8.043997 0 +946 -1.568355 -1.568355 2.298100 -7.937501 0 +947 -4.789208 -4.789208 2.115106 -7.967499 0 +948 -2.455575 -2.455575 2.208019 -8.060412 0 +949 -4.368546 -4.368546 2.039036 -7.891430 0 +950 -2.732531 -2.732531 2.605763 -8.245165 0 +951 -2.084439 -2.084439 2.648658 -8.532001 0 +952 -1.534714 -1.534714 3.334589 -8.973990 0 +953 -1.219135 -1.219135 3.078546 -8.717948 0 +954 -2.941671 -2.941671 2.692933 -8.157995 0 +955 -2.328370 -2.328370 2.857798 -8.322861 0 +956 -2.686642 -2.686642 2.697365 -8.070648 0 +957 -2.602175 -2.602175 2.682271 -8.055554 0 +958 -1.349286 -1.349286 2.928461 -8.132812 0 +959 -3.443697 -3.443697 2.917203 -8.121554 0 +960 -3.791500 -3.791500 2.585727 -7.496878 0 +961 -2.989025 -2.989025 3.161788 -7.818528 0 +962 -1.357979 -1.357979 2.699634 -7.356374 0 +963 -4.459286 -4.459286 3.161788 -7.818528 0 +964 1.278043 1.278043 3.631898 -8.288637 0 +965 -3.261486 -3.261486 4.073094 -8.729833 0 +966 -2.255023 -2.255023 4.073094 -8.729833 0 +967 -5.573807 -5.573807 4.740080 -9.250126 0 +968 -2.125162 -2.125162 5.648860 -9.899183 0 +969 -2.725776 -2.725776 6.488144 -10.515743 0 +970 -0.181174 -0.181174 6.602848 -10.630446 0 +971 -1.630094 -1.630094 7.157691 -11.185290 0 +972 -2.013799 -2.013799 7.542343 -10.802530 0 +973 -1.289570 -1.289570 7.648779 -10.908966 0 +974 -2.762209 -2.762209 7.648779 -10.908966 0 +975 -4.026165 -4.026165 7.265073 -11.292672 0 +976 2.373612 2.373612 6.795451 -10.055638 0 +977 2.287711 2.287711 6.463232 -9.723419 0 +978 -0.742487 -0.742487 6.649116 -9.402798 0 +979 -0.735738 -0.735738 7.361328 -9.940469 0 +980 1.444976 1.444976 6.954431 -8.886205 0 +981 0.499573 0.499573 6.948494 -8.880268 0 +982 -3.549683 -3.549683 7.115226 -8.600199 0 +983 0.231040 0.231040 7.173007 -8.657980 0 +984 -0.434319 -0.434319 7.290218 -8.761695 0 +985 -3.857747 -3.857747 7.481174 -8.349812 0 +986 -2.283152 -2.283152 7.591638 -8.460276 0 +987 -2.322953 -2.322953 7.814671 -8.683308 0 +988 -1.376841 -1.376841 7.469332 -7.910807 0 +989 -0.007156 -0.007156 7.443955 -8.312592 0 +990 -0.965887 -0.965887 6.579616 -7.749673 0 +991 0.978217 0.978217 7.305529 -8.174167 0 +992 0.303988 0.303988 6.837712 -7.279187 0 +993 -1.384319 -1.384319 7.030861 -7.899499 0 +994 0.511217 0.511217 6.524228 -7.924435 0 +995 0.995050 0.995050 6.974820 -7.843458 0 +996 1.217818 1.217818 6.174443 -7.574649 0 +997 0.453970 0.453970 6.698121 -8.629895 0 +998 -2.531342 -2.531342 6.110080 -7.083124 0 +999 -4.902825 -4.902825 6.110777 -6.125089 0 diff -Nru gsl-2.4+dfsg/doc/examples/Makefile.am gsl-2.5+dfsg/doc/examples/Makefile.am --- gsl-2.4+dfsg/doc/examples/Makefile.am 2017-05-22 13:04:25.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/Makefile.am 2018-05-22 19:29:36.000000000 +0000 @@ -1,10 +1,10 @@ ## Process this file with automake to produce Makefile.in -check_PROGRAMS = blas block cblas cdf cheb combination multiset const diff eigen fft fftmr fftreal fitting fitting2 fitting3 fitreg fitreg2 histogram histogram2d ieee ieeeround integration integration2 interp interp2d intro linalglu largefit matrix matrixw min monte ntupler ntuplew ode-initval permseq permshuffle polyroots qrng randpoisson randwalk rng rngunif robfit rootnewt roots siman siman_tsp sortsmall specfun specfun_e rstat rquantile stat statsort sum vector vectorr vectorview vectorw dwt nlfit nlfit2 nlfit2b nlfit3 nlfit4 interpp eigen_nonsymm bspline poisson interp_compare spmatrix +check_PROGRAMS = blas block cblas cdf cheb combination multiset const diff eigen fft fftmr fftreal filt_edge fitting fitting2 fitting3 fitreg fitreg2 gaussfilt gaussfilt2 histogram histogram2d ieee ieeeround impulse integration integration2 interp interp2d intro linalglu largefit matrix matrixw min monte movstat1 movstat2 movstat3 ntupler ntuplew ode-initval permseq permshuffle polyroots qrng randpoisson randwalk rng rngunif robfit rootnewt roots siman siman_tsp sortsmall specfun specfun_e rstat rquantile stat statsort sum vector vectorr vectorview vectorw dwt nlfit nlfit2 nlfit2b nlfit3 nlfit4 interpp eigen_nonsymm bspline poisson interp_compare spmatrix -examples_src = blas.c block.c cblas.c cdf.c cheb.c combination.c multiset.c const.c demo_fn.c diff.c eigen.c fft.c fftmr.c fftreal.c fitting.c fitting2.c fitting3.c fitreg.c fitreg2.c histogram.c histogram2d.c ieee.c ieeeround.c integration.c integration2.c interp.c interp2d.c intro.c linalglu.c largefit.c matrix.c matrixw.c min.c monte.c ntupler.c ntuplew.c ode-initval.c odefixed.c permseq.c permshuffle.c polyroots.c qrng.c randpoisson.c randwalk.c rng.c rngunif.c robfit.c rootnewt.c roots.c siman.c siman_tsp.c sortsmall.c specfun.c specfun_e.c rstat.c rquantile.c stat.c statsort.c sum.c vector.c vectorr.c vectorview.c vectorw.c demo_fn.h dwt.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c interpp.c eigen_nonsymm.c bspline.c multimin.c multiminfn.c nmsimplex.c ode-initval-low-level.c poisson.c interp_compare.c spmatrix.c +examples_src = blas.c block.c cblas.c cdf.c cheb.c combination.c multiset.c const.c demo_fn.c diff.c eigen.c fft.c fftmr.c fftreal.c filt_edge.c fitting.c fitting2.c fitting3.c fitreg.c fitreg2.c gaussfilt.c gaussfilt2.c histogram.c histogram2d.c ieee.c ieeeround.c impulse.c integration.c integration2.c interp.c interp2d.c intro.c linalglu.c largefit.c matrix.c matrixw.c min.c monte.c movstat1.c movstat2.c movstat3.c ntupler.c ntuplew.c ode-initval.c odefixed.c permseq.c permshuffle.c polyroots.c qrng.c randpoisson.c randwalk.c rng.c rngunif.c robfit.c rootnewt.c roots.c siman.c siman_tsp.c sortsmall.c specfun.c specfun_e.c rstat.c rquantile.c stat.c statsort.c sum.c vector.c vectorr.c vectorview.c vectorw.c demo_fn.h dwt.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c interpp.c eigen_nonsymm.c bspline.c multimin.c multiminfn.c nmsimplex.c ode-initval-low-level.c poisson.c interp_compare.c spmatrix.c -examples_txt = blas.txt block.txt bspline.txt cblas.txt cdf.txt cheb.txt combination.txt const.txt diff.txt dwt.txt eigen_nonsymm.txt eigen.txt fftmr.txt fftreal.txt fft.txt fitreg.txt fitreg2.txt fitting2.txt fitting.txt histogram2d.txt ieeeround.txt ieee.txt integration.txt integration2a.txt integration2b.txt interp2d.txt interp_compare.txt interpp.txt interp.txt intro.txt largefit.txt largefit2.txt linalglu.txt matrix.txt matrixw.txt min.txt monte.txt multimin.txt multiset.txt nlfit.txt nlfit2.txt nlfit3.txt nmsimplex.txt ntuple.txt ode-initval.txt permseq.txt permshuffle.txt poisson.txt polyroots.txt qrng.txt randpoisson2.txt randpoisson.txt randwalk.txt rng.txt rngunif.txt rngunif2.txt robfit.txt rootnewt.txt roots.txt rquantile.txt rstat.txt siman.txt siman_tsp.txt sortsmall.txt specfun.txt specfun_e.txt spmatrix.txt statsort.txt stat.txt sum.txt vectorr.txt vectorview.txt +examples_txt = blas.txt block.txt bspline.txt cblas.txt cdf.txt cheb.txt combination.txt const.txt diff.txt dwt.txt eigen_nonsymm.txt eigen.txt fftmr.txt fftreal.txt fft.txt fitreg.txt fitreg2.txt filt_edge.txt fitting2.txt fitting.txt gaussfilt.txt gaussfilt2.txt histogram2d.txt ieeeround.txt ieee.txt impulse.txt integration.txt integration2a.txt integration2b.txt interp2d.txt interp_compare.txt interpp.txt interp.txt intro.txt largefit.txt largefit2.txt linalglu.txt matrix.txt matrixw.txt min.txt monte.txt movstat1.txt movstat2.txt movstat3.txt multimin.txt multiset.txt nlfit.txt nlfit2.txt nlfit3.txt nmsimplex.txt ntuple.txt ode-initval.txt permseq.txt permshuffle.txt poisson.txt polyroots.txt qrng.txt randpoisson2.txt randpoisson.txt randwalk.txt rng.txt rngunif.txt rngunif2.txt robfit.txt rootnewt.txt roots.txt rquantile.txt rstat.txt siman.txt siman_tsp.txt sortsmall.txt specfun.txt specfun_e.txt spmatrix.txt statsort.txt stat.txt sum.txt vectorr.txt vectorview.txt dist_noinst_DATA = $(examples_src) $(examples_txt) diff -Nru gsl-2.4+dfsg/doc/examples/Makefile.in gsl-2.5+dfsg/doc/examples/Makefile.in --- gsl-2.4+dfsg/doc/examples/Makefile.in 2017-06-19 12:55:38.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/Makefile.in 2018-06-13 20:31:02.000000000 +0000 @@ -81,21 +81,24 @@ check_PROGRAMS = blas$(EXEEXT) block$(EXEEXT) cblas$(EXEEXT) \ cdf$(EXEEXT) cheb$(EXEEXT) combination$(EXEEXT) \ multiset$(EXEEXT) const$(EXEEXT) diff$(EXEEXT) eigen$(EXEEXT) \ - fft$(EXEEXT) fftmr$(EXEEXT) fftreal$(EXEEXT) fitting$(EXEEXT) \ - fitting2$(EXEEXT) fitting3$(EXEEXT) fitreg$(EXEEXT) \ - fitreg2$(EXEEXT) histogram$(EXEEXT) histogram2d$(EXEEXT) \ - ieee$(EXEEXT) ieeeround$(EXEEXT) integration$(EXEEXT) \ - integration2$(EXEEXT) interp$(EXEEXT) interp2d$(EXEEXT) \ - intro$(EXEEXT) linalglu$(EXEEXT) largefit$(EXEEXT) \ - matrix$(EXEEXT) matrixw$(EXEEXT) min$(EXEEXT) monte$(EXEEXT) \ - ntupler$(EXEEXT) ntuplew$(EXEEXT) ode-initval$(EXEEXT) \ - permseq$(EXEEXT) permshuffle$(EXEEXT) polyroots$(EXEEXT) \ - qrng$(EXEEXT) randpoisson$(EXEEXT) randwalk$(EXEEXT) \ - rng$(EXEEXT) rngunif$(EXEEXT) robfit$(EXEEXT) \ - rootnewt$(EXEEXT) roots$(EXEEXT) siman$(EXEEXT) \ - siman_tsp$(EXEEXT) sortsmall$(EXEEXT) specfun$(EXEEXT) \ - specfun_e$(EXEEXT) rstat$(EXEEXT) rquantile$(EXEEXT) \ - stat$(EXEEXT) statsort$(EXEEXT) sum$(EXEEXT) vector$(EXEEXT) \ + fft$(EXEEXT) fftmr$(EXEEXT) fftreal$(EXEEXT) \ + filt_edge$(EXEEXT) fitting$(EXEEXT) fitting2$(EXEEXT) \ + fitting3$(EXEEXT) fitreg$(EXEEXT) fitreg2$(EXEEXT) \ + gaussfilt$(EXEEXT) gaussfilt2$(EXEEXT) histogram$(EXEEXT) \ + histogram2d$(EXEEXT) ieee$(EXEEXT) ieeeround$(EXEEXT) \ + impulse$(EXEEXT) integration$(EXEEXT) integration2$(EXEEXT) \ + interp$(EXEEXT) interp2d$(EXEEXT) intro$(EXEEXT) \ + linalglu$(EXEEXT) largefit$(EXEEXT) matrix$(EXEEXT) \ + matrixw$(EXEEXT) min$(EXEEXT) monte$(EXEEXT) movstat1$(EXEEXT) \ + movstat2$(EXEEXT) movstat3$(EXEEXT) ntupler$(EXEEXT) \ + ntuplew$(EXEEXT) ode-initval$(EXEEXT) permseq$(EXEEXT) \ + permshuffle$(EXEEXT) polyroots$(EXEEXT) qrng$(EXEEXT) \ + randpoisson$(EXEEXT) randwalk$(EXEEXT) rng$(EXEEXT) \ + rngunif$(EXEEXT) robfit$(EXEEXT) rootnewt$(EXEEXT) \ + roots$(EXEEXT) siman$(EXEEXT) siman_tsp$(EXEEXT) \ + sortsmall$(EXEEXT) specfun$(EXEEXT) specfun_e$(EXEEXT) \ + rstat$(EXEEXT) rquantile$(EXEEXT) stat$(EXEEXT) \ + statsort$(EXEEXT) sum$(EXEEXT) vector$(EXEEXT) \ vectorr$(EXEEXT) vectorview$(EXEEXT) vectorw$(EXEEXT) \ dwt$(EXEEXT) nlfit$(EXEEXT) nlfit2$(EXEEXT) nlfit2b$(EXEEXT) \ nlfit3$(EXEEXT) nlfit4$(EXEEXT) interpp$(EXEEXT) \ @@ -178,6 +181,10 @@ fftreal_OBJECTS = fftreal.$(OBJEXT) fftreal_LDADD = $(LDADD) fftreal_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +filt_edge_SOURCES = filt_edge.c +filt_edge_OBJECTS = filt_edge.$(OBJEXT) +filt_edge_LDADD = $(LDADD) +filt_edge_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la fitreg_SOURCES = fitreg.c fitreg_OBJECTS = fitreg.$(OBJEXT) fitreg_LDADD = $(LDADD) @@ -198,6 +205,14 @@ fitting3_OBJECTS = fitting3.$(OBJEXT) fitting3_LDADD = $(LDADD) fitting3_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +gaussfilt_SOURCES = gaussfilt.c +gaussfilt_OBJECTS = gaussfilt.$(OBJEXT) +gaussfilt_LDADD = $(LDADD) +gaussfilt_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +gaussfilt2_SOURCES = gaussfilt2.c +gaussfilt2_OBJECTS = gaussfilt2.$(OBJEXT) +gaussfilt2_LDADD = $(LDADD) +gaussfilt2_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la histogram_SOURCES = histogram.c histogram_OBJECTS = histogram.$(OBJEXT) histogram_LDADD = $(LDADD) @@ -214,6 +229,10 @@ ieeeround_OBJECTS = ieeeround.$(OBJEXT) ieeeround_LDADD = $(LDADD) ieeeround_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +impulse_SOURCES = impulse.c +impulse_OBJECTS = impulse.$(OBJEXT) +impulse_LDADD = $(LDADD) +impulse_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la integration_SOURCES = integration.c integration_OBJECTS = integration.$(OBJEXT) integration_LDADD = $(LDADD) @@ -267,6 +286,18 @@ monte_OBJECTS = monte.$(OBJEXT) monte_LDADD = $(LDADD) monte_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +movstat1_SOURCES = movstat1.c +movstat1_OBJECTS = movstat1.$(OBJEXT) +movstat1_LDADD = $(LDADD) +movstat1_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +movstat2_SOURCES = movstat2.c +movstat2_OBJECTS = movstat2.$(OBJEXT) +movstat2_LDADD = $(LDADD) +movstat2_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la +movstat3_SOURCES = movstat3.c +movstat3_OBJECTS = movstat3.$(OBJEXT) +movstat3_LDADD = $(LDADD) +movstat3_DEPENDENCIES = ../../libgsl.la ../../cblas/libgslcblas.la multiset_SOURCES = multiset.c multiset_OBJECTS = multiset.$(OBJEXT) multiset_LDADD = $(LDADD) @@ -447,30 +478,33 @@ am__v_CCLD_1 = SOURCES = blas.c block.c bspline.c cblas.c cdf.c cheb.c combination.c \ const.c diff.c dwt.c eigen.c eigen_nonsymm.c fft.c fftmr.c \ - fftreal.c fitreg.c fitreg2.c fitting.c fitting2.c fitting3.c \ - histogram.c histogram2d.c ieee.c ieeeround.c integration.c \ - integration2.c interp.c interp2d.c interp_compare.c interpp.c \ - intro.c largefit.c linalglu.c matrix.c matrixw.c min.c monte.c \ - multiset.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c nlfit4.c \ - ntupler.c ntuplew.c ode-initval.c permseq.c permshuffle.c \ - poisson.c polyroots.c qrng.c randpoisson.c randwalk.c rng.c \ - rngunif.c robfit.c rootnewt.c roots.c rquantile.c rstat.c \ - siman.c siman_tsp.c sortsmall.c specfun.c specfun_e.c \ - spmatrix.c stat.c statsort.c sum.c vector.c vectorr.c \ - vectorview.c vectorw.c -DIST_SOURCES = blas.c block.c bspline.c cblas.c cdf.c cheb.c \ - combination.c const.c diff.c dwt.c eigen.c eigen_nonsymm.c \ - fft.c fftmr.c fftreal.c fitreg.c fitreg2.c fitting.c \ - fitting2.c fitting3.c histogram.c histogram2d.c ieee.c \ - ieeeround.c integration.c integration2.c interp.c interp2d.c \ - interp_compare.c interpp.c intro.c largefit.c linalglu.c \ - matrix.c matrixw.c min.c monte.c multiset.c nlfit.c nlfit2.c \ + fftreal.c filt_edge.c fitreg.c fitreg2.c fitting.c fitting2.c \ + fitting3.c gaussfilt.c gaussfilt2.c histogram.c histogram2d.c \ + ieee.c ieeeround.c impulse.c integration.c integration2.c \ + interp.c interp2d.c interp_compare.c interpp.c intro.c \ + largefit.c linalglu.c matrix.c matrixw.c min.c monte.c \ + movstat1.c movstat2.c movstat3.c multiset.c nlfit.c nlfit2.c \ nlfit2b.c nlfit3.c nlfit4.c ntupler.c ntuplew.c ode-initval.c \ permseq.c permshuffle.c poisson.c polyroots.c qrng.c \ randpoisson.c randwalk.c rng.c rngunif.c robfit.c rootnewt.c \ roots.c rquantile.c rstat.c siman.c siman_tsp.c sortsmall.c \ specfun.c specfun_e.c spmatrix.c stat.c statsort.c sum.c \ vector.c vectorr.c vectorview.c vectorw.c +DIST_SOURCES = blas.c block.c bspline.c cblas.c cdf.c cheb.c \ + combination.c const.c diff.c dwt.c eigen.c eigen_nonsymm.c \ + fft.c fftmr.c fftreal.c filt_edge.c fitreg.c fitreg2.c \ + fitting.c fitting2.c fitting3.c gaussfilt.c gaussfilt2.c \ + histogram.c histogram2d.c ieee.c ieeeround.c impulse.c \ + integration.c integration2.c interp.c interp2d.c \ + interp_compare.c interpp.c intro.c largefit.c linalglu.c \ + matrix.c matrixw.c min.c monte.c movstat1.c movstat2.c \ + movstat3.c multiset.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c \ + nlfit4.c ntupler.c ntuplew.c ode-initval.c permseq.c \ + permshuffle.c poisson.c polyroots.c qrng.c randpoisson.c \ + randwalk.c rng.c rngunif.c robfit.c rootnewt.c roots.c \ + rquantile.c rstat.c siman.c siman_tsp.c sortsmall.c specfun.c \ + specfun_e.c spmatrix.c stat.c statsort.c sum.c vector.c \ + vectorr.c vectorview.c vectorw.c am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -641,8 +675,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -examples_src = blas.c block.c cblas.c cdf.c cheb.c combination.c multiset.c const.c demo_fn.c diff.c eigen.c fft.c fftmr.c fftreal.c fitting.c fitting2.c fitting3.c fitreg.c fitreg2.c histogram.c histogram2d.c ieee.c ieeeround.c integration.c integration2.c interp.c interp2d.c intro.c linalglu.c largefit.c matrix.c matrixw.c min.c monte.c ntupler.c ntuplew.c ode-initval.c odefixed.c permseq.c permshuffle.c polyroots.c qrng.c randpoisson.c randwalk.c rng.c rngunif.c robfit.c rootnewt.c roots.c siman.c siman_tsp.c sortsmall.c specfun.c specfun_e.c rstat.c rquantile.c stat.c statsort.c sum.c vector.c vectorr.c vectorview.c vectorw.c demo_fn.h dwt.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c interpp.c eigen_nonsymm.c bspline.c multimin.c multiminfn.c nmsimplex.c ode-initval-low-level.c poisson.c interp_compare.c spmatrix.c -examples_txt = blas.txt block.txt bspline.txt cblas.txt cdf.txt cheb.txt combination.txt const.txt diff.txt dwt.txt eigen_nonsymm.txt eigen.txt fftmr.txt fftreal.txt fft.txt fitreg.txt fitreg2.txt fitting2.txt fitting.txt histogram2d.txt ieeeround.txt ieee.txt integration.txt integration2a.txt integration2b.txt interp2d.txt interp_compare.txt interpp.txt interp.txt intro.txt largefit.txt largefit2.txt linalglu.txt matrix.txt matrixw.txt min.txt monte.txt multimin.txt multiset.txt nlfit.txt nlfit2.txt nlfit3.txt nmsimplex.txt ntuple.txt ode-initval.txt permseq.txt permshuffle.txt poisson.txt polyroots.txt qrng.txt randpoisson2.txt randpoisson.txt randwalk.txt rng.txt rngunif.txt rngunif2.txt robfit.txt rootnewt.txt roots.txt rquantile.txt rstat.txt siman.txt siman_tsp.txt sortsmall.txt specfun.txt specfun_e.txt spmatrix.txt statsort.txt stat.txt sum.txt vectorr.txt vectorview.txt +examples_src = blas.c block.c cblas.c cdf.c cheb.c combination.c multiset.c const.c demo_fn.c diff.c eigen.c fft.c fftmr.c fftreal.c filt_edge.c fitting.c fitting2.c fitting3.c fitreg.c fitreg2.c gaussfilt.c gaussfilt2.c histogram.c histogram2d.c ieee.c ieeeround.c impulse.c integration.c integration2.c interp.c interp2d.c intro.c linalglu.c largefit.c matrix.c matrixw.c min.c monte.c movstat1.c movstat2.c movstat3.c ntupler.c ntuplew.c ode-initval.c odefixed.c permseq.c permshuffle.c polyroots.c qrng.c randpoisson.c randwalk.c rng.c rngunif.c robfit.c rootnewt.c roots.c siman.c siman_tsp.c sortsmall.c specfun.c specfun_e.c rstat.c rquantile.c stat.c statsort.c sum.c vector.c vectorr.c vectorview.c vectorw.c demo_fn.h dwt.c nlfit.c nlfit2.c nlfit2b.c nlfit3.c interpp.c eigen_nonsymm.c bspline.c multimin.c multiminfn.c nmsimplex.c ode-initval-low-level.c poisson.c interp_compare.c spmatrix.c +examples_txt = blas.txt block.txt bspline.txt cblas.txt cdf.txt cheb.txt combination.txt const.txt diff.txt dwt.txt eigen_nonsymm.txt eigen.txt fftmr.txt fftreal.txt fft.txt fitreg.txt fitreg2.txt filt_edge.txt fitting2.txt fitting.txt gaussfilt.txt gaussfilt2.txt histogram2d.txt ieeeround.txt ieee.txt impulse.txt integration.txt integration2a.txt integration2b.txt interp2d.txt interp_compare.txt interpp.txt interp.txt intro.txt largefit.txt largefit2.txt linalglu.txt matrix.txt matrixw.txt min.txt monte.txt movstat1.txt movstat2.txt movstat3.txt multimin.txt multiset.txt nlfit.txt nlfit2.txt nlfit3.txt nmsimplex.txt ntuple.txt ode-initval.txt permseq.txt permshuffle.txt poisson.txt polyroots.txt qrng.txt randpoisson2.txt randpoisson.txt randwalk.txt rng.txt rngunif.txt rngunif2.txt robfit.txt rootnewt.txt roots.txt rquantile.txt rstat.txt siman.txt siman_tsp.txt sortsmall.txt specfun.txt specfun_e.txt spmatrix.txt statsort.txt stat.txt sum.txt vectorr.txt vectorview.txt dist_noinst_DATA = $(examples_src) $(examples_txt) LDADD = ../../libgsl.la ../../cblas/libgslcblas.la AM_DEFAULT_SOURCE_EXT = .c @@ -750,6 +784,10 @@ @rm -f fftreal$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fftreal_OBJECTS) $(fftreal_LDADD) $(LIBS) +filt_edge$(EXEEXT): $(filt_edge_OBJECTS) $(filt_edge_DEPENDENCIES) $(EXTRA_filt_edge_DEPENDENCIES) + @rm -f filt_edge$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(filt_edge_OBJECTS) $(filt_edge_LDADD) $(LIBS) + fitreg$(EXEEXT): $(fitreg_OBJECTS) $(fitreg_DEPENDENCIES) $(EXTRA_fitreg_DEPENDENCIES) @rm -f fitreg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fitreg_OBJECTS) $(fitreg_LDADD) $(LIBS) @@ -770,6 +808,14 @@ @rm -f fitting3$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fitting3_OBJECTS) $(fitting3_LDADD) $(LIBS) +gaussfilt$(EXEEXT): $(gaussfilt_OBJECTS) $(gaussfilt_DEPENDENCIES) $(EXTRA_gaussfilt_DEPENDENCIES) + @rm -f gaussfilt$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gaussfilt_OBJECTS) $(gaussfilt_LDADD) $(LIBS) + +gaussfilt2$(EXEEXT): $(gaussfilt2_OBJECTS) $(gaussfilt2_DEPENDENCIES) $(EXTRA_gaussfilt2_DEPENDENCIES) + @rm -f gaussfilt2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(gaussfilt2_OBJECTS) $(gaussfilt2_LDADD) $(LIBS) + histogram$(EXEEXT): $(histogram_OBJECTS) $(histogram_DEPENDENCIES) $(EXTRA_histogram_DEPENDENCIES) @rm -f histogram$(EXEEXT) $(AM_V_CCLD)$(LINK) $(histogram_OBJECTS) $(histogram_LDADD) $(LIBS) @@ -786,6 +832,10 @@ @rm -f ieeeround$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ieeeround_OBJECTS) $(ieeeround_LDADD) $(LIBS) +impulse$(EXEEXT): $(impulse_OBJECTS) $(impulse_DEPENDENCIES) $(EXTRA_impulse_DEPENDENCIES) + @rm -f impulse$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(impulse_OBJECTS) $(impulse_LDADD) $(LIBS) + integration$(EXEEXT): $(integration_OBJECTS) $(integration_DEPENDENCIES) $(EXTRA_integration_DEPENDENCIES) @rm -f integration$(EXEEXT) $(AM_V_CCLD)$(LINK) $(integration_OBJECTS) $(integration_LDADD) $(LIBS) @@ -838,6 +888,18 @@ @rm -f monte$(EXEEXT) $(AM_V_CCLD)$(LINK) $(monte_OBJECTS) $(monte_LDADD) $(LIBS) +movstat1$(EXEEXT): $(movstat1_OBJECTS) $(movstat1_DEPENDENCIES) $(EXTRA_movstat1_DEPENDENCIES) + @rm -f movstat1$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(movstat1_OBJECTS) $(movstat1_LDADD) $(LIBS) + +movstat2$(EXEEXT): $(movstat2_OBJECTS) $(movstat2_DEPENDENCIES) $(EXTRA_movstat2_DEPENDENCIES) + @rm -f movstat2$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(movstat2_OBJECTS) $(movstat2_LDADD) $(LIBS) + +movstat3$(EXEEXT): $(movstat3_OBJECTS) $(movstat3_DEPENDENCIES) $(EXTRA_movstat3_DEPENDENCIES) + @rm -f movstat3$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(movstat3_OBJECTS) $(movstat3_LDADD) $(LIBS) + multiset$(EXEEXT): $(multiset_OBJECTS) $(multiset_DEPENDENCIES) $(EXTRA_multiset_DEPENDENCIES) @rm -f multiset$(EXEEXT) $(AM_V_CCLD)$(LINK) $(multiset_OBJECTS) $(multiset_LDADD) $(LIBS) @@ -1003,15 +1065,19 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftmr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftreal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filt_edge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitreg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitreg2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitting.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitting2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fitting3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussfilt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussfilt2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram2d.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieeeround.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impulse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integration.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integration2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interp.Po@am__quote@ @@ -1025,6 +1091,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrixw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/min.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monte.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movstat1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movstat2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movstat3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multiset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlfit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlfit2.Po@am__quote@ diff -Nru gsl-2.4+dfsg/doc/examples/movstat1.c gsl-2.5+dfsg/doc/examples/movstat1.c --- gsl-2.4+dfsg/doc/examples/movstat1.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat1.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,52 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 500; /* length of time series */ + const size_t K = 11; /* window size */ + gsl_movstat_workspace * w = gsl_movstat_alloc(K); + gsl_vector *x = gsl_vector_alloc(N); + gsl_vector *xmean = gsl_vector_alloc(N); + gsl_vector *xmin = gsl_vector_alloc(N); + gsl_vector *xmax = gsl_vector_alloc(N); + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + size_t i; + + for (i = 0; i < N; ++i) + { + double xi = cos(2.0 * M_PI * i / (double) N); + double ei = gsl_ran_gaussian(r, 0.1); + + gsl_vector_set(x, i, xi + ei); + } + + /* compute moving statistics */ + gsl_movstat_mean(GSL_MOVSTAT_END_PADVALUE, x, xmean, w); + gsl_movstat_minmax(GSL_MOVSTAT_END_PADVALUE, x, xmin, xmax, w); + + /* print results */ + for (i = 0; i < N; ++i) + { + printf("%zu %f %f %f %f\n", + i, + gsl_vector_get(x, i), + gsl_vector_get(xmean, i), + gsl_vector_get(xmin, i), + gsl_vector_get(xmax, i)); + } + + gsl_vector_free(x); + gsl_vector_free(xmean); + gsl_rng_free(r); + gsl_movstat_free(w); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/movstat1.txt gsl-2.5+dfsg/doc/examples/movstat1.txt --- gsl-2.4+dfsg/doc/examples/movstat1.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat1.txt 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,500 @@ +0 1.013392 1.025455 0.870277 1.167125 +1 0.991111 1.002191 0.757487 1.167125 +2 1.167125 0.994447 0.757487 1.167125 +3 1.072654 0.992415 0.757487 1.167125 +4 1.098489 0.998740 0.757487 1.167125 +5 0.870277 0.996645 0.757487 1.167125 +6 0.757487 0.982774 0.757487 1.167125 +7 0.928206 0.976478 0.757487 1.167125 +8 0.991042 0.961726 0.757487 1.098489 +9 1.082967 0.961273 0.757487 1.098489 +10 0.990350 0.945725 0.757487 1.082967 +11 0.860806 0.949887 0.757487 1.082967 +12 0.921854 0.969931 0.860806 1.082967 +13 1.004857 0.968052 0.860806 1.082967 +14 1.067669 0.958763 0.860806 1.082967 +15 0.927462 0.953932 0.860806 1.067669 +16 0.916052 0.948321 0.860806 1.067669 +17 0.977977 0.954891 0.888855 1.067669 +18 0.907542 0.949889 0.866834 1.067669 +19 0.888855 0.940037 0.866834 1.067669 +20 1.029833 0.930024 0.866834 1.029833 +21 0.928623 0.932234 0.866834 1.029833 +22 0.933078 0.927858 0.866834 1.029833 +23 0.866834 0.922979 0.866834 1.029833 +24 0.896484 0.938828 0.866834 1.081885 +25 0.957518 0.940671 0.866834 1.081885 +26 0.951773 0.928778 0.866834 1.081885 +27 0.867918 0.926759 0.866834 1.081885 +28 0.924311 0.902015 0.660901 1.081885 +29 1.081885 0.911199 0.660901 1.081885 +30 0.909129 0.911629 0.660901 1.081885 +31 0.899007 0.904290 0.660901 1.081885 +32 0.906410 0.905523 0.660901 1.081885 +33 0.660901 0.921700 0.660901 1.081885 +34 0.967848 0.914314 0.660901 1.081885 +35 0.901216 0.906377 0.660901 1.045863 +36 0.876788 0.919138 0.660901 1.049495 +37 0.965342 0.909300 0.660901 1.049495 +38 1.045863 0.899130 0.660901 1.049495 +39 0.843064 0.935236 0.790789 1.058064 +40 0.994584 0.915798 0.754027 1.058064 +41 1.049495 0.925786 0.754027 1.058064 +42 0.790789 0.934160 0.754027 1.058064 +43 0.794545 0.917856 0.754027 1.058064 +44 1.058064 0.894224 0.754027 1.058064 +45 0.754027 0.902525 0.754027 1.058064 +46 1.011083 0.882488 0.754027 1.058064 +47 0.968905 0.858839 0.754027 1.058064 +48 0.785996 0.865693 0.754027 1.058064 +49 0.785908 0.869140 0.754027 1.058064 +50 0.934374 0.843780 0.754027 1.011083 +51 0.774182 0.856865 0.774182 1.011083 +52 0.789357 0.833643 0.755636 0.968905 +53 0.866187 0.820204 0.755636 0.934374 +54 0.832458 0.801479 0.580022 0.934374 +55 0.779098 0.794145 0.580022 0.934374 +56 0.897972 0.777744 0.580022 0.897972 +57 0.755636 0.771325 0.580022 0.897972 +58 0.821078 0.758525 0.580022 0.897972 +59 0.580022 0.730291 0.555610 0.897972 +60 0.705231 0.732450 0.555610 0.897972 +61 0.753958 0.726817 0.555610 0.897972 +62 0.703576 0.719593 0.555610 0.856202 +63 0.648563 0.716829 0.555610 0.856202 +64 0.555610 0.695659 0.555610 0.856202 +65 0.856202 0.712848 0.555610 0.856202 +66 0.717144 0.698226 0.544393 0.856202 +67 0.818508 0.692889 0.544393 0.856202 +68 0.725233 0.676890 0.527579 0.856202 +69 0.588200 0.671508 0.527579 0.856202 +70 0.769099 0.688035 0.527579 0.856202 +71 0.544393 0.666321 0.527579 0.818508 +72 0.695256 0.683045 0.527579 0.901112 +73 0.527579 0.675632 0.527579 0.901112 +74 0.589362 0.675341 0.527579 0.901112 +75 0.737405 0.676647 0.527579 0.901112 +76 0.617349 0.644925 0.420158 0.901112 +77 0.901112 0.645197 0.420158 0.901112 +78 0.736969 0.631913 0.420158 0.901112 +79 0.722022 0.607408 0.258027 0.901112 +80 0.602574 0.592044 0.258027 0.901112 +81 0.420158 0.548146 0.254524 0.901112 +82 0.547377 0.524700 0.254524 0.901112 +83 0.549131 0.479341 0.254524 0.736969 +84 0.258027 0.444649 0.254524 0.722022 +85 0.420364 0.419394 0.254524 0.602574 +86 0.254524 0.398695 0.254524 0.549131 +87 0.359446 0.381949 0.235951 0.549131 +88 0.402156 0.359174 0.235951 0.549131 +89 0.355360 0.343811 0.235951 0.444218 +90 0.444218 0.364327 0.235951 0.483698 +91 0.374884 0.375581 0.235951 0.544155 +92 0.235951 0.384793 0.235951 0.544155 +93 0.296859 0.384020 0.235951 0.544155 +94 0.380136 0.388258 0.235951 0.544155 +95 0.483698 0.389237 0.235951 0.544155 +96 0.544155 0.371576 0.235951 0.544155 +97 0.355863 0.367619 0.235951 0.544155 +98 0.350941 0.389322 0.249951 0.544155 +99 0.448774 0.405590 0.249951 0.544155 +100 0.366123 0.390267 0.211582 0.544155 +101 0.249951 0.361028 0.162070 0.544155 +102 0.331355 0.320305 0.096198 0.475812 +103 0.474684 0.294603 0.073141 0.475812 +104 0.475812 0.277378 0.073141 0.475812 +105 0.211582 0.267081 0.073141 0.475812 +106 0.162070 0.237602 0.041856 0.475812 +107 0.096198 0.220135 0.041856 0.475812 +108 0.073141 0.202362 0.041856 0.475812 +109 0.161463 0.173379 0.041856 0.475812 +110 0.335513 0.162744 0.041856 0.358825 +111 0.041856 0.156966 0.041856 0.358825 +112 0.057809 0.154733 0.041856 0.358825 +113 0.135848 0.147418 0.015741 0.358825 +114 0.155876 0.163315 0.015741 0.358825 +115 0.358825 0.151041 0.015741 0.358825 +116 0.148026 0.142400 0.015741 0.358825 +117 0.137503 0.145727 0.015741 0.358825 +118 0.015741 0.133652 -0.075014 0.358825 +119 0.248005 0.125044 -0.075014 0.358825 +120 0.026450 0.107819 -0.075014 0.358825 +121 0.240462 0.082304 -0.075014 0.248005 +122 0.078448 0.078524 -0.075014 0.248005 +123 -0.075014 0.069818 -0.075014 0.248005 +124 0.041165 0.060222 -0.089813 0.248005 +125 -0.033599 0.037175 -0.089813 0.240462 +126 0.078162 0.022155 -0.138771 0.240462 +127 0.106441 -0.012559 -0.141393 0.106441 +128 0.041739 -0.021868 -0.141393 0.106441 +129 -0.089813 -0.023553 -0.141393 0.106441 +130 -0.005517 -0.042827 -0.170845 0.106441 +131 -0.138771 -0.047853 -0.170845 0.106441 +132 -0.141393 -0.072865 -0.196971 0.106441 +133 -0.023946 -0.096954 -0.196971 0.041739 +134 -0.093553 -0.112070 -0.196971 -0.005517 +135 -0.170845 -0.095246 -0.196971 0.095255 +136 -0.088883 -0.118915 -0.265878 0.095255 +137 -0.196971 -0.131437 -0.276507 0.095255 +138 -0.158539 -0.122919 -0.276507 0.095255 +139 -0.124542 -0.128482 -0.276507 0.095255 +140 0.095255 -0.139477 -0.276507 0.095255 +141 -0.265878 -0.148368 -0.276507 0.095255 +142 -0.276507 -0.166704 -0.290569 0.095255 +143 -0.047703 -0.196669 -0.526592 0.095255 +144 -0.085131 -0.217998 -0.526592 0.095255 +145 -0.214498 -0.234941 -0.526592 0.095255 +146 -0.268655 -0.273155 -0.526592 -0.047703 +147 -0.290569 -0.280459 -0.526592 -0.047703 +148 -0.526592 -0.285590 -0.526592 -0.047703 +149 -0.393161 -0.307341 -0.526592 -0.085131 +150 -0.310915 -0.339192 -0.526592 -0.214498 +151 -0.325097 -0.354743 -0.526592 -0.268655 +152 -0.346220 -0.367337 -0.526592 -0.286961 +153 -0.332948 -0.377433 -0.526592 -0.286961 +154 -0.286961 -0.354838 -0.435497 -0.278055 +155 -0.435497 -0.370171 -0.561824 -0.278055 +156 -0.385559 -0.372834 -0.561824 -0.278055 +157 -0.407186 -0.393722 -0.561824 -0.278055 +158 -0.401623 -0.398478 -0.561824 -0.278055 +159 -0.278055 -0.408078 -0.561824 -0.278055 +160 -0.561824 -0.423210 -0.561824 -0.278055 +161 -0.340208 -0.421919 -0.561824 -0.278055 +162 -0.554862 -0.434708 -0.561824 -0.278055 +163 -0.398533 -0.442767 -0.561824 -0.278055 +164 -0.438554 -0.444981 -0.561824 -0.278055 +165 -0.453409 -0.472421 -0.579896 -0.340208 +166 -0.421298 -0.477334 -0.615870 -0.340208 +167 -0.526235 -0.509042 -0.688995 -0.398533 +168 -0.495838 -0.501550 -0.688995 -0.398533 +169 -0.425973 -0.520922 -0.688995 -0.421298 +170 -0.579896 -0.543189 -0.688995 -0.421298 +171 -0.615870 -0.544872 -0.688995 -0.421298 +172 -0.688995 -0.577052 -0.775276 -0.425973 +173 -0.472446 -0.574803 -0.775276 -0.425973 +174 -0.611628 -0.586334 -0.775276 -0.425973 +175 -0.683487 -0.601934 -0.775276 -0.471926 +176 -0.471926 -0.587823 -0.775276 -0.424672 +177 -0.775276 -0.578534 -0.775276 -0.424672 +178 -0.501492 -0.578457 -0.775276 -0.424672 +179 -0.622688 -0.601616 -0.775276 -0.424672 +180 -0.597569 -0.621130 -0.826283 -0.424672 +181 -0.424672 -0.629181 -0.826283 -0.424672 +182 -0.513689 -0.650887 -0.826283 -0.424672 +183 -0.688150 -0.652745 -0.826283 -0.424672 +184 -0.727199 -0.661308 -0.826283 -0.424672 +185 -0.826283 -0.672896 -0.826283 -0.424672 +186 -0.772049 -0.690263 -0.826283 -0.424672 +187 -0.710693 -0.726533 -0.826283 -0.513689 +188 -0.795709 -0.743671 -0.826283 -0.595689 +189 -0.595689 -0.731770 -0.826283 -0.557230 +190 -0.750152 -0.727697 -0.826283 -0.557230 +191 -0.788610 -0.726249 -0.823638 -0.557230 +192 -0.823638 -0.724487 -0.823638 -0.557230 +193 -0.702214 -0.733764 -0.823638 -0.557230 +194 -0.557230 -0.737635 -0.838294 -0.557230 +195 -0.682397 -0.756428 -0.838294 -0.557230 +196 -0.810356 -0.757483 -0.838294 -0.557230 +197 -0.752668 -0.759971 -0.838294 -0.557230 +198 -0.812736 -0.761852 -0.844320 -0.557230 +199 -0.838294 -0.778260 -0.882704 -0.557230 +200 -0.802410 -0.817732 -0.991420 -0.682397 +201 -0.761760 -0.827119 -0.991420 -0.752668 +202 -0.815982 -0.825164 -0.991420 -0.752668 +203 -0.844320 -0.850678 -1.033319 -0.761760 +204 -0.882704 -0.862307 -1.033319 -0.761760 +205 -0.991420 -0.872446 -1.033319 -0.761760 +206 -0.785662 -0.872866 -1.033319 -0.761760 +207 -0.788845 -0.872533 -1.033319 -0.758096 +208 -1.033319 -0.872601 -1.033319 -0.758096 +209 -0.940656 -0.868199 -1.033319 -0.758096 +210 -0.949828 -0.876235 -1.033319 -0.758096 +211 -0.807033 -0.862975 -1.033319 -0.758096 +212 -0.758096 -0.867137 -1.033319 -0.758096 +213 -0.816724 -0.872040 -1.033319 -0.758096 +214 -0.795898 -0.864847 -0.971106 -0.758096 +215 -0.971106 -0.861147 -0.971106 -0.758096 +216 -0.845553 -0.850714 -0.971106 -0.758096 +217 -0.831449 -0.876233 -1.087741 -0.758096 +218 -0.842777 -0.877849 -1.087741 -0.775880 +219 -0.954197 -0.902982 -1.093179 -0.775880 +220 -0.899959 -0.928549 -1.093179 -0.775880 +221 -0.835059 -0.929045 -1.093179 -0.775880 +222 -1.087741 -0.956690 -1.149651 -0.775880 +223 -0.775880 -0.969676 -1.149651 -0.775880 +224 -1.093179 -1.003608 -1.216028 -0.775880 +225 -1.077135 -1.001921 -1.216028 -0.775880 +226 -0.976567 -1.010555 -1.216028 -0.775880 +227 -1.149651 -1.020282 -1.216028 -0.775880 +228 -0.974288 -1.011217 -1.216028 -0.775880 +229 -1.216028 -1.028403 -1.216028 -0.935649 +230 -0.935649 -1.024209 -1.216028 -0.935649 +231 -0.994929 -1.016980 -1.216028 -0.935649 +232 -0.942055 -1.012394 -1.216028 -0.926118 +233 -0.988027 -0.996471 -1.216028 -0.926118 +234 -0.964923 -0.993783 -1.216028 -0.926118 +235 -1.047043 -0.979457 -1.058450 -0.926118 +236 -0.997623 -0.984896 -1.058450 -0.926118 +237 -0.926118 -0.973823 -1.058450 -0.873130 +238 -0.974504 -1.003161 -1.264770 -0.873130 +239 -0.944710 -1.015226 -1.264770 -0.873130 +240 -1.058450 -1.033069 -1.264770 -0.873130 +241 -0.995472 -1.018962 -1.264770 -0.873130 +242 -0.873130 -1.024768 -1.264770 -0.873130 +243 -1.264770 -1.034703 -1.264770 -0.873130 +244 -1.120740 -1.043031 -1.264770 -0.873130 +245 -1.161201 -1.023714 -1.264770 -0.732230 +246 -0.891866 -1.035942 -1.264770 -0.732230 +247 -1.061490 -1.032799 -1.264770 -0.732230 +248 -1.035404 -1.048014 -1.264770 -0.732230 +249 -1.066105 -1.015013 -1.192959 -0.732230 +250 -0.732230 -0.988437 -1.192959 -0.732230 +251 -1.192959 -0.984767 -1.192959 -0.732230 +252 -0.960893 -1.002046 -1.192959 -0.732230 +253 -1.040500 -0.985397 -1.192959 -0.732230 +254 -0.901760 -0.982775 -1.192959 -0.732230 +255 -0.828404 -0.986986 -1.192959 -0.732230 +256 -1.120830 -1.000430 -1.192959 -0.828404 +257 -1.081925 -0.985363 -1.120830 -0.828404 +258 -0.878353 -0.991121 -1.120830 -0.828404 +259 -1.006563 -0.988908 -1.120830 -0.828404 +260 -1.112423 -0.998128 -1.120830 -0.828404 +261 -0.880114 -1.008961 -1.120830 -0.878353 +262 -1.027231 -0.994331 -1.112423 -0.878353 +263 -1.024224 -0.989539 -1.112423 -0.878353 +264 -1.016162 -1.003086 -1.112423 -0.880114 +265 -1.003174 -0.987079 -1.112423 -0.830495 +266 -0.947576 -0.984044 -1.079038 -0.830495 +267 -0.959896 -0.987848 -1.079038 -0.830495 +268 -1.029208 -0.981803 -1.079038 -0.830495 +269 -1.027370 -0.964468 -1.079038 -0.830495 +270 -0.830495 -0.960914 -1.079038 -0.830495 +271 -1.079038 -0.956894 -1.079038 -0.830495 +272 -0.921950 -0.963892 -1.079038 -0.830495 +273 -0.960735 -0.956820 -1.079038 -0.830495 +274 -0.833545 -0.954237 -1.079038 -0.830495 +275 -0.977067 -0.940472 -1.079038 -0.830495 +276 -0.958951 -0.944069 -1.079038 -0.833545 +277 -1.024561 -0.938022 -1.024561 -0.833545 +278 -0.882098 -0.919679 -1.024561 -0.720185 +279 -1.000801 -0.912088 -1.024561 -0.720185 +280 -0.875947 -0.909022 -1.024561 -0.720185 +281 -0.870066 -0.896914 -1.024561 -0.720185 +282 -1.012517 -0.890325 -1.024561 -0.720185 +283 -0.720185 -0.867328 -1.012517 -0.720185 +284 -0.877230 -0.852374 -1.012517 -0.717609 +285 -0.799814 -0.837617 -1.012517 -0.717609 +286 -0.843888 -0.838205 -1.012517 -0.717609 +287 -0.886468 -0.836749 -1.012517 -0.717609 +288 -0.771593 -0.828138 -0.917799 -0.717609 +289 -0.717609 -0.832601 -0.917799 -0.717609 +290 -0.838467 -0.833825 -0.917799 -0.717609 +291 -0.882423 -0.829501 -0.917799 -0.717609 +292 -0.854040 -0.834043 -0.917799 -0.717609 +293 -0.917799 -0.837622 -0.925833 -0.717609 +294 -0.769278 -0.850230 -0.925833 -0.717609 +295 -0.890701 -0.858097 -0.925833 -0.752249 +296 -0.752249 -0.847150 -0.925833 -0.718054 +297 -0.893852 -0.840316 -0.925833 -0.718054 +298 -0.925833 -0.847871 -0.937142 -0.718054 +299 -0.910285 -0.829060 -0.937142 -0.710878 +300 -0.804142 -0.829250 -0.937142 -0.710878 +301 -0.718054 -0.815351 -0.937142 -0.710878 +302 -0.807248 -0.805137 -0.937142 -0.639902 +303 -0.937142 -0.779022 -0.937142 -0.606577 +304 -0.710878 -0.766921 -0.937142 -0.606577 +305 -0.771371 -0.763344 -0.937142 -0.606577 +306 -0.737806 -0.761042 -0.937142 -0.606577 +307 -0.639902 -0.750893 -0.937142 -0.606425 +308 -0.606577 -0.740345 -0.937142 -0.606425 +309 -0.792721 -0.716246 -0.870945 -0.606425 +310 -0.870945 -0.721344 -0.870945 -0.606425 +311 -0.778812 -0.702106 -0.870945 -0.559753 +312 -0.606425 -0.669779 -0.870945 -0.382213 +313 -0.691215 -0.669660 -0.870945 -0.382213 +314 -0.672057 -0.667048 -0.870945 -0.382213 +315 -0.766952 -0.655691 -0.870945 -0.382213 +316 -0.559753 -0.657687 -0.892897 -0.382213 +317 -0.382213 -0.633918 -0.892897 -0.382213 +318 -0.638585 -0.642290 -0.892897 -0.382213 +319 -0.577856 -0.642953 -0.892897 -0.382213 +320 -0.667793 -0.647248 -0.892897 -0.382213 +321 -0.892897 -0.625084 -0.892897 -0.382213 +322 -0.517349 -0.634317 -0.892897 -0.382213 +323 -0.698519 -0.645092 -0.892897 -0.500739 +324 -0.698515 -0.636347 -0.892897 -0.500739 +325 -0.719300 -0.645738 -0.892897 -0.500739 +326 -0.523150 -0.638422 -0.892897 -0.500739 +327 -0.661314 -0.606323 -0.719300 -0.500739 +328 -0.500739 -0.601895 -0.719300 -0.468642 +329 -0.542385 -0.579661 -0.719300 -0.453948 +330 -0.681154 -0.567629 -0.719300 -0.453948 +331 -0.587320 -0.540919 -0.681154 -0.425489 +332 -0.539802 -0.536216 -0.681154 -0.425489 +333 -0.468642 -0.515872 -0.681154 -0.425489 +334 -0.453948 -0.508943 -0.681154 -0.424515 +335 -0.566167 -0.484997 -0.681154 -0.278983 +336 -0.425489 -0.474857 -0.587320 -0.278983 +337 -0.471413 -0.457795 -0.569606 -0.278983 +338 -0.437536 -0.444811 -0.569606 -0.278983 +339 -0.424515 -0.457290 -0.605908 -0.278983 +340 -0.278983 -0.458643 -0.605908 -0.278983 +341 -0.569606 -0.437657 -0.605908 -0.278983 +342 -0.399645 -0.440066 -0.605908 -0.278983 +343 -0.396978 -0.426797 -0.605908 -0.278983 +344 -0.605908 -0.414464 -0.605908 -0.278983 +345 -0.468828 -0.409242 -0.605908 -0.278983 +346 -0.335322 -0.390093 -0.605908 -0.068347 +347 -0.451991 -0.358057 -0.605908 -0.068347 +348 -0.325454 -0.354020 -0.605908 -0.068347 +349 -0.301874 -0.351934 -0.605908 -0.068347 +350 -0.367069 -0.330921 -0.468828 -0.068347 +351 -0.068347 -0.300187 -0.451991 -0.068347 +352 -0.217207 -0.269653 -0.451991 0.000548 +353 -0.355236 -0.249006 -0.374765 0.000548 +354 -0.374031 -0.227677 -0.374765 0.000548 +355 -0.374765 -0.212222 -0.374765 0.000548 +356 -0.130757 -0.182264 -0.374765 0.000548 +357 0.000548 -0.178046 -0.374765 0.000548 +358 -0.224869 -0.174059 -0.374765 0.000548 +359 -0.090843 -0.148084 -0.374765 0.000548 +360 -0.131869 -0.125299 -0.374765 0.000548 +361 -0.037525 -0.103980 -0.224869 0.000548 +362 -0.021950 -0.089067 -0.224869 0.033278 +363 -0.173351 -0.097219 -0.224869 0.033278 +364 -0.069516 -0.080847 -0.173351 0.033278 +365 -0.123392 -0.083517 -0.173351 0.033278 +366 -0.140251 -0.064638 -0.173351 0.075798 +367 0.033278 -0.066025 -0.173351 0.075798 +368 -0.089119 -0.064113 -0.173351 0.075798 +369 -0.044779 -0.043657 -0.140251 0.075798 +370 -0.120212 -0.050558 -0.145432 0.075798 +371 0.075798 -0.028394 -0.145432 0.120419 +372 -0.052776 -0.020337 -0.145432 0.120419 +373 -0.000922 -0.020633 -0.145432 0.120419 +374 0.051665 -0.000088 -0.145432 0.136882 +375 -0.145432 0.001980 -0.145432 0.136882 +376 0.120419 0.015908 -0.145432 0.136882 +377 -0.051630 0.008839 -0.145432 0.136882 +378 0.030021 0.023415 -0.145432 0.136882 +379 0.136882 0.035997 -0.145432 0.137475 +380 -0.022034 0.044648 -0.145432 0.146824 +381 0.032996 0.085343 -0.051630 0.302213 +382 -0.001956 0.090462 -0.051630 0.302213 +383 0.107561 0.109792 -0.022034 0.302213 +384 0.137475 0.129705 -0.022034 0.302213 +385 0.146824 0.139505 -0.022034 0.302213 +386 0.302213 0.175573 -0.001956 0.374715 +387 0.176725 0.171111 -0.016088 0.374715 +388 0.161005 0.201997 -0.016088 0.374715 +389 0.249059 0.211184 -0.016088 0.374715 +390 0.244685 0.241403 -0.016088 0.469875 +391 0.374715 0.247018 -0.016088 0.469875 +392 -0.016088 0.251853 -0.016088 0.469875 +393 0.337792 0.241875 -0.016088 0.469875 +394 0.208623 0.232960 -0.016088 0.469875 +395 0.469875 0.241472 -0.016088 0.469875 +396 0.208591 0.240708 -0.016088 0.469875 +397 0.355397 0.244141 -0.016088 0.469875 +398 0.066970 0.278441 0.062943 0.469875 +399 0.062943 0.279692 0.062943 0.469875 +400 0.342687 0.279032 0.062943 0.469875 +401 0.236279 0.255171 0.062943 0.412482 +402 0.412482 0.269991 0.062943 0.412482 +403 0.361210 0.271952 0.062943 0.412482 +404 0.351552 0.306849 0.062943 0.450837 +405 0.201364 0.341076 0.201364 0.450837 +406 0.207412 0.346704 0.201364 0.450837 +407 0.371610 0.367105 0.201364 0.460693 +408 0.376968 0.381765 0.201364 0.573741 +409 0.450837 0.399434 0.201364 0.573741 +410 0.439434 0.424286 0.201364 0.624922 +411 0.404595 0.444298 0.207412 0.624922 +412 0.460693 0.485105 0.371610 0.656290 +413 0.573741 0.497219 0.376968 0.656290 +414 0.555574 0.509820 0.404595 0.656290 +415 0.624922 0.508527 0.404595 0.656290 +416 0.421495 0.517763 0.404595 0.656290 +417 0.656290 0.539030 0.421495 0.656290 +418 0.504863 0.547166 0.421495 0.656290 +419 0.515579 0.544754 0.421495 0.656290 +420 0.436605 0.551199 0.421495 0.656290 +421 0.541029 0.544440 0.421495 0.656290 +422 0.638534 0.565228 0.436605 0.656290 +423 0.550194 0.561618 0.436605 0.650163 +424 0.547203 0.578910 0.436605 0.695074 +425 0.626469 0.594819 0.436605 0.695074 +426 0.550578 0.623842 0.541029 0.755863 +427 0.650163 0.638478 0.547203 0.755863 +428 0.616581 0.642307 0.547203 0.755863 +429 0.695074 0.652334 0.547203 0.755863 +430 0.690578 0.675403 0.550578 0.800961 +431 0.755863 0.683917 0.550578 0.800961 +432 0.702018 0.688552 0.601565 0.800961 +433 0.680657 0.692645 0.601565 0.800961 +434 0.660494 0.699567 0.601565 0.800961 +435 0.800961 0.697021 0.601565 0.800961 +436 0.720123 0.692928 0.601565 0.800961 +437 0.601565 0.689701 0.601565 0.800961 +438 0.695184 0.695285 0.601565 0.800961 +439 0.692716 0.710160 0.601565 0.844284 +440 0.667074 0.729648 0.601565 0.874857 +441 0.645554 0.710975 0.595553 0.874857 +442 0.720360 0.712048 0.595553 0.874857 +443 0.763451 0.724493 0.595553 0.874857 +444 0.844284 0.736420 0.595553 0.874857 +445 0.874857 0.755004 0.595553 0.897139 +446 0.595553 0.762285 0.595553 0.897139 +447 0.731929 0.795816 0.595553 1.014397 +448 0.738466 0.816706 0.595553 1.014397 +449 0.826376 0.839172 0.595553 1.014397 +450 0.897139 0.830670 0.595553 1.014397 +451 0.747169 0.831937 0.595553 1.014397 +452 1.014397 0.854478 0.731929 1.014397 +453 0.950147 0.858448 0.738466 1.014397 +454 1.010570 0.884680 0.747169 1.027027 +455 0.750768 0.881842 0.747169 1.027027 +456 0.888789 0.903073 0.747169 1.130677 +457 0.843511 0.905010 0.750768 1.130677 +458 0.775591 0.900443 0.750768 1.130677 +459 1.027027 0.886697 0.750768 1.130677 +460 0.795154 0.860403 0.721338 1.130677 +461 1.130677 0.868329 0.721338 1.130677 +462 0.768480 0.865755 0.721338 1.130677 +463 0.964156 0.862088 0.721338 1.130677 +464 0.798942 0.897826 0.721338 1.168710 +465 0.721338 0.881809 0.721338 1.168710 +466 0.837961 0.904046 0.721338 1.168710 +467 0.860465 0.889841 0.721338 1.168710 +468 0.803176 0.916090 0.721338 1.168710 +469 1.168710 0.921198 0.721338 1.168710 +470 0.850845 0.930022 0.721338 1.168710 +471 1.039756 0.936404 0.791537 1.168710 +472 0.974419 0.937972 0.791537 1.168710 +473 1.057222 0.954304 0.791537 1.168710 +474 1.020342 0.958065 0.791537 1.168710 +475 0.896010 0.945502 0.791537 1.057222 +476 0.791537 0.953835 0.791537 1.057222 +477 0.855209 0.948894 0.791537 1.057222 +478 1.040122 0.957838 0.791537 1.072795 +479 0.844547 0.950386 0.791537 1.072795 +480 1.030517 0.941772 0.791537 1.072795 +481 0.942499 0.945536 0.791537 1.072795 +482 0.985416 0.964838 0.844547 1.072795 +483 1.072795 0.972638 0.844547 1.072795 +484 0.975258 0.961047 0.844547 1.072795 +485 0.925586 0.967626 0.912619 1.072795 +486 0.937410 0.955375 0.895759 1.072795 +487 1.003865 0.970752 0.895759 1.111650 +488 0.941008 0.961434 0.882914 1.111650 +489 0.912619 0.959662 0.882914 1.111650 +490 0.916911 0.964683 0.882914 1.111650 +491 0.895759 0.982988 0.882914 1.126942 +492 1.111650 0.989781 0.882914 1.126942 +493 0.882914 0.997853 0.882914 1.126942 +494 1.053305 1.006621 0.882914 1.126942 +495 1.030481 1.017970 0.882914 1.126942 +496 1.126942 1.028928 0.882914 1.126942 +497 1.012136 1.041810 0.882914 1.126942 +498 1.092656 1.035065 0.882914 1.126942 +499 1.037457 1.049115 1.012136 1.126942 diff -Nru gsl-2.4+dfsg/doc/examples/movstat2.c gsl-2.5+dfsg/doc/examples/movstat2.c --- gsl-2.4+dfsg/doc/examples/movstat2.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat2.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,81 @@ +#include +#include + +#include +#include +#include +#include +#include + +int +main(void) +{ + const size_t N = 1000; /* length of time series */ + const double sigma[] = { 1.0, 5.0, 1.0, 3.0, 5.0 }; /* variances */ + const size_t N_sigma[] = { 200, 450, 600, 850, 1000 }; /* samples where variance changes */ + const size_t K = 41; /* window size */ + gsl_vector *x = gsl_vector_alloc(N); + gsl_vector *xmedian = gsl_vector_alloc(N); + gsl_vector *xmad = gsl_vector_alloc(N); + gsl_vector *xiqr = gsl_vector_alloc(N); + gsl_vector *xSn = gsl_vector_alloc(N); + gsl_vector *xQn = gsl_vector_alloc(N); + gsl_vector *xsd = gsl_vector_alloc(N); + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + gsl_movstat_workspace * w = gsl_movstat_alloc(K); + size_t idx = 0; + size_t i; + + for (i = 0; i < N; ++i) + { + double gi = gsl_ran_gaussian(r, sigma[idx]); + double u = gsl_rng_uniform(r); + double outlier = (u < 0.01) ? 15.0*GSL_SIGN(gi) : 0.0; + double xi = gi + outlier; + + gsl_vector_set(x, i, xi); + + if (i == N_sigma[idx] - 1) + ++idx; + } + + /* compute moving statistics */ + gsl_movstat_mad(GSL_MOVSTAT_END_TRUNCATE, x, xmedian, xmad, w); + gsl_movstat_qqr(GSL_MOVSTAT_END_TRUNCATE, x, 0.25, xiqr, w); + gsl_movstat_Sn(GSL_MOVSTAT_END_TRUNCATE, x, xSn, w); + gsl_movstat_Qn(GSL_MOVSTAT_END_TRUNCATE, x, xQn, w); + gsl_movstat_sd(GSL_MOVSTAT_END_TRUNCATE, x, xsd, w); + + /* scale IQR by factor to approximate standard deviation */ + gsl_vector_scale(xiqr, 0.7413); + + /* print results */ + idx = 0; + for (i = 0; i < N; ++i) + { + printf("%zu %f %f %f %f %f %f %f\n", + i, + gsl_vector_get(x, i), + sigma[idx], + gsl_vector_get(xmad, i), + gsl_vector_get(xiqr, i), + gsl_vector_get(xSn, i), + gsl_vector_get(xQn, i), + gsl_vector_get(xsd, i)); + + if (i == N_sigma[idx] - 1) + ++idx; + } + + gsl_vector_free(x); + gsl_vector_free(xmedian); + gsl_vector_free(xmad); + gsl_vector_free(xiqr); + gsl_vector_free(xSn); + gsl_vector_free(xQn); + gsl_vector_free(xsd); + gsl_rng_free(r); + gsl_movstat_free(w); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/movstat2.txt gsl-2.5+dfsg/doc/examples/movstat2.txt --- gsl-2.4+dfsg/doc/examples/movstat2.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat2.txt 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,1000 @@ +0 0.133919 1.000000 0.634780 0.572247 0.808577 0.746831 0.911713 +1 0.594129 1.000000 0.761385 0.586651 0.842338 0.851958 0.932072 +2 1.674408 1.000000 0.634780 0.565628 0.805441 0.786105 0.911598 +3 -1.286970 1.000000 0.624178 0.616265 0.818638 0.793885 0.913578 +4 -1.277502 1.000000 0.732107 0.607673 0.845620 0.853599 0.904846 +5 -1.339936 1.000000 0.901014 0.815512 0.899332 0.892324 0.915826 +6 -0.039091 1.000000 0.914039 0.882875 0.973002 0.931867 0.909640 +7 0.114046 1.000000 1.004368 0.939272 0.955987 0.962021 0.936883 +8 -0.017648 1.000000 0.938813 0.913400 0.994361 0.989223 0.948653 +9 -0.572385 1.000000 1.004368 0.948380 0.977622 0.975446 0.940535 +10 0.181709 1.000000 1.013403 0.967178 1.006853 0.996549 0.932949 +11 1.385318 1.000000 1.041662 0.991152 1.002304 0.976706 0.933625 +12 -0.638032 1.000000 1.006429 1.041661 1.007452 0.991973 0.929606 +13 -1.465648 1.000000 1.097440 1.033083 1.002304 0.982959 0.931635 +14 -0.827762 1.000000 1.006429 1.012117 0.991703 0.982032 0.919095 +15 -0.246354 1.000000 1.009916 0.991152 0.924432 0.966532 0.909800 +16 -0.289493 1.000000 0.937596 0.970187 0.923188 0.958141 0.897614 +17 -0.224180 1.000000 0.972012 0.992435 0.924432 0.980047 0.956973 +18 0.064615 1.000000 1.006429 0.992038 0.945551 1.001505 0.950711 +19 1.706591 1.000000 1.009916 0.967227 0.940569 0.975836 0.938556 +20 -0.144233 1.000000 1.013403 0.942416 0.961679 0.974183 0.927016 +21 1.182820 1.000000 1.014380 0.970187 0.976290 1.003298 0.943637 +22 -0.260697 1.000000 0.937596 0.942416 0.919517 0.967429 0.937187 +23 -1.045894 1.000000 0.894872 0.844759 0.844112 0.910789 0.891896 +24 0.577419 1.000000 0.751925 0.826354 0.833473 0.862953 0.875977 +25 1.088576 1.000000 0.715114 0.775585 0.819886 0.829490 0.859125 +26 0.715002 1.000000 0.792076 0.734255 0.813865 0.798872 0.840971 +27 -1.515063 1.000000 0.792076 0.734255 0.813865 0.798872 0.840949 +28 1.182771 1.000000 0.828887 0.824578 0.827717 0.847499 0.849113 +29 -0.706517 1.000000 0.894872 0.873242 0.831686 0.872197 0.863533 +30 -0.731346 1.000000 0.875302 0.901013 0.843749 0.922323 0.887804 +31 -1.034345 1.000000 0.875302 0.901013 0.843749 0.940883 0.888084 +32 -0.903006 1.000000 0.894872 0.924011 0.831686 0.915578 0.864894 +33 0.889186 1.000000 0.937596 0.942416 0.844140 0.984041 2.751313 +34 -0.375367 1.000000 0.935885 0.951782 0.909712 0.979339 2.764234 +35 0.408219 1.000000 0.870455 0.828989 0.887733 0.953368 2.764266 +36 -0.273845 1.000000 0.962290 0.909833 0.947194 1.003298 2.785699 +37 -2.328102 1.000000 0.989562 0.909833 0.940293 1.007373 2.787434 +38 0.539956 1.000000 1.022690 0.909833 0.970569 1.027996 2.791884 +39 -0.039068 1.000000 1.047520 1.032626 0.996669 1.055270 2.794225 +40 0.013851 1.000000 1.026373 1.018540 0.955638 1.007373 2.777936 +41 1.028263 1.000000 1.047520 1.036945 0.987347 1.042200 2.781737 +42 -0.237378 1.000000 0.999101 0.970187 0.975734 1.007373 2.770074 +43 -0.172270 1.000000 1.074792 1.023686 0.993536 1.022731 2.771019 +44 -0.540872 1.000000 0.999101 0.970187 0.975734 1.005811 2.769515 +45 -0.490678 1.000000 0.939346 0.995915 0.992322 1.000660 2.764966 +46 0.418112 1.000000 0.986861 0.934728 1.061442 1.022731 2.759020 +47 -0.057463 1.000000 0.986861 0.934728 1.061442 1.033751 2.762056 +48 0.686476 1.000000 0.939346 0.995915 0.992322 1.022731 2.770365 +49 -1.084243 1.000000 0.939346 0.986549 0.978580 1.005811 2.762342 +50 1.316748 1.000000 0.999101 0.986549 0.962601 1.007373 2.763825 +51 0.220587 1.000000 0.858462 0.986549 0.947194 1.003500 2.765904 +52 -0.803515 1.000000 0.851570 0.855353 0.906389 0.980266 2.768981 +53 -16.826706 1.000000 0.822434 0.801218 0.895637 0.955649 2.770614 +54 1.496198 1.000000 0.780004 0.791852 0.884705 0.943552 2.766481 +55 -0.003318 1.000000 0.780004 0.791852 0.841112 0.934656 2.767213 +56 1.800935 1.000000 0.822434 0.801218 0.884705 0.996285 2.793084 +57 0.272243 1.000000 0.851705 0.824274 0.991485 1.040969 2.825814 +58 0.667474 1.000000 0.851705 0.824274 0.963355 1.015499 2.811598 +59 -1.167809 1.000000 0.826116 0.824274 0.895637 1.000660 2.809012 +60 0.455081 1.000000 0.826116 0.824274 0.917388 1.005811 2.808804 +61 -1.353985 1.000000 0.840365 0.824274 0.963639 1.016996 2.808428 +62 -0.613899 1.000000 0.848375 0.845987 1.001663 1.015499 2.802740 +63 -0.968935 1.000000 0.916455 0.878409 1.001663 1.016996 2.807617 +64 -0.462268 1.000000 0.893827 0.878409 0.963639 1.016996 2.808621 +65 -0.805850 1.000000 0.893827 1.018971 1.001663 1.005811 2.810159 +66 -1.669557 1.000000 0.835189 1.018971 0.919256 0.981250 2.812080 +67 0.955392 1.000000 0.953499 1.090444 1.011756 1.020490 2.821579 +68 1.155739 1.000000 0.953499 1.090444 1.011756 1.035414 2.821388 +69 0.527321 1.000000 0.900067 1.018971 1.011756 1.023422 2.817582 +70 0.112199 1.000000 0.835189 0.878409 0.998036 0.993358 2.816845 +71 0.249406 1.000000 0.835189 0.878409 0.919256 0.981445 2.812003 +72 0.571058 1.000000 0.851705 0.878409 0.986470 0.997608 2.810899 +73 0.369879 1.000000 0.851705 0.878409 0.986470 1.003898 2.812401 +74 0.463358 1.000000 0.835189 0.837477 0.974701 0.986197 0.969756 +75 0.004240 1.000000 0.851705 0.878409 0.964608 0.964104 0.954479 +76 2.149705 1.000000 0.835189 0.879648 0.974701 0.964104 0.957241 +77 2.393308 1.000000 0.823252 0.878409 0.935121 0.915411 0.919993 +78 -1.280724 1.000000 0.823252 0.878409 0.935121 0.921353 0.919612 +79 -0.001162 1.000000 0.813205 0.869530 0.933139 0.915411 0.920612 +80 -0.382469 1.000000 0.733395 0.845987 0.945214 0.880601 0.903238 +81 -0.366381 1.000000 0.813205 0.869530 0.933139 0.905382 0.913601 +82 -1.048282 1.000000 0.733395 0.845987 0.961340 0.862525 0.888996 +83 0.719285 1.000000 0.811337 0.766004 0.961340 0.906725 0.908871 +84 0.180858 1.000000 0.811337 0.766004 0.961340 0.887721 0.900477 +85 -0.945417 1.000000 0.806927 0.706849 0.856607 0.874078 0.895459 +86 0.371411 1.000000 0.824981 0.696163 0.894144 0.880746 0.906899 +87 1.336323 1.000000 0.824981 0.696163 0.868543 0.862525 0.879876 +88 -0.363406 1.000000 0.806927 0.706849 0.961340 0.880746 0.962966 +89 0.024232 1.000000 0.806927 0.706849 0.986470 0.896215 0.989880 +90 0.407580 1.000000 0.709543 0.706849 0.974701 0.897554 0.989059 +91 0.924530 1.000000 0.811337 0.708089 1.021867 0.986197 1.013604 +92 -0.335992 1.000000 0.947584 0.902700 1.033113 0.993358 1.022123 +93 -1.065908 1.000000 0.993182 0.903192 1.031373 0.981805 1.029552 +94 1.315714 1.000000 0.976282 0.903192 1.031373 0.954886 1.028894 +95 -0.723670 1.000000 0.976282 0.903192 1.039481 0.989289 1.029767 +96 0.572730 1.000000 1.030487 1.011833 1.040474 1.048340 1.038201 +97 -0.311810 1.000000 0.993182 0.903192 1.025245 0.948526 0.987965 +98 0.193035 1.000000 0.992199 0.889324 0.980151 0.874459 0.917902 +99 -0.645659 1.000000 0.730301 0.888833 0.995759 0.845335 0.894647 +100 0.489070 1.000000 0.730301 0.888833 0.995759 0.860992 0.895874 +101 -0.912479 1.000000 0.850541 0.888833 0.995759 0.862411 0.897471 +102 0.504810 1.000000 0.850541 0.888833 0.995759 0.874459 0.898461 +103 1.493974 1.000000 0.921514 0.790420 0.976565 0.880601 0.895020 +104 -0.644996 1.000000 0.999852 0.790420 0.988788 0.895750 0.899506 +105 0.080149 1.000000 0.850541 0.790420 0.988788 0.897169 0.900195 +106 1.513680 1.000000 0.772203 0.751251 0.976565 0.887574 0.887050 +107 -1.056364 1.000000 0.772203 0.751251 0.931100 0.880746 0.886311 +108 -2.415729 1.000000 0.785469 0.776552 0.932787 0.896344 0.908634 +109 1.913067 1.000000 0.850541 0.790420 0.928780 0.898312 0.911728 +110 -0.134006 1.000000 0.867004 0.790420 0.968049 0.898684 0.912953 +111 1.560086 1.000000 0.948325 0.902700 0.997878 0.957183 0.971343 +112 -0.673723 1.000000 0.830105 0.888833 0.988788 0.908120 0.961586 +113 -0.757723 1.000000 0.948325 0.902700 1.024635 1.018413 1.011598 +114 0.012833 1.000000 0.948325 0.902700 1.024635 1.008893 1.004640 +115 0.554023 1.000000 0.830105 0.888833 0.974090 0.948227 0.984805 +116 0.969076 1.000000 0.850541 0.790420 0.993825 0.974084 0.994552 +117 0.375053 1.000000 0.948325 0.899432 0.997878 1.008893 1.007153 +118 0.321502 1.000000 1.075102 1.011712 1.159322 1.033102 1.014558 +119 0.412501 1.000000 0.976282 1.011712 1.084628 1.018413 1.016412 +120 -0.226119 1.000000 1.075102 1.019061 1.087173 1.033102 1.017086 +121 -0.493532 1.000000 1.017889 1.019061 1.084628 1.013358 1.019450 +122 -0.440694 1.000000 0.975298 1.005614 1.024635 0.992813 1.007760 +123 1.137429 1.000000 0.983407 1.019061 1.084628 1.044047 1.054007 +124 0.948226 1.000000 0.940815 0.899432 0.932787 0.989613 1.028517 +125 -0.098573 1.000000 0.983407 0.899432 1.041084 1.039852 1.070832 +126 -0.340550 1.000000 0.977257 1.033008 1.093148 1.125720 1.094564 +127 0.091253 1.000000 0.953264 0.972397 1.093148 1.111274 1.102403 +128 -1.673461 1.000000 0.953264 0.972397 1.118139 1.103869 1.120081 +129 0.719785 1.000000 0.932019 0.910128 1.084628 1.033102 1.059777 +130 0.398546 1.000000 0.891350 0.850800 0.993825 0.989613 1.014061 +131 -2.058964 1.000000 0.868815 0.850800 1.007764 1.002214 1.016375 +132 -0.221386 1.000000 0.868815 0.850800 1.007764 0.988137 1.006077 +133 2.059246 1.000000 0.868815 0.850800 1.007764 0.948213 1.003151 +134 -0.783959 1.000000 0.898645 0.855254 1.084628 0.949440 1.015792 +135 -0.010426 1.000000 0.960558 0.978133 1.109619 1.002214 1.030059 +136 1.246201 1.000000 0.960558 1.018730 1.118139 0.988137 1.034131 +137 1.208516 1.000000 0.960558 0.978133 1.109619 0.968823 1.024990 +138 -0.776972 1.000000 0.969790 1.018730 1.118139 0.963562 1.036711 +139 -0.314893 1.000000 0.889504 1.113693 1.147632 0.961287 1.039220 +140 0.881162 1.000000 1.056337 1.192725 1.213913 0.994310 1.073273 +141 -0.475392 1.000000 0.970917 1.192725 1.191793 1.000106 1.073040 +142 -0.187461 1.000000 1.258537 1.198219 1.213913 1.071636 1.086984 +143 -1.914903 1.000000 1.258537 1.198219 1.213913 1.071636 1.086002 +144 0.075505 1.000000 1.345084 1.150143 1.214410 1.086597 1.103572 +145 -1.990580 1.000000 1.057369 1.109546 1.067205 1.063068 1.088914 +146 -1.470919 1.000000 1.057369 1.109546 1.153104 1.090701 1.091951 +147 -1.902030 1.000000 1.345084 1.150143 1.213913 1.128318 1.110274 +148 -1.693956 1.000000 1.345084 1.150143 1.213913 1.125720 1.109612 +149 -0.129086 1.000000 0.970917 1.119186 1.293248 1.106648 1.085023 +150 -0.735212 1.000000 1.056337 1.150143 1.303892 1.171344 2.651855 +151 -0.599698 1.000000 1.057369 1.150143 1.195968 1.169232 2.648025 +152 1.300405 1.000000 0.884370 1.119186 1.109619 1.111274 2.638670 +153 -0.299204 1.000000 1.056337 1.150143 1.178096 1.169856 2.645304 +154 1.035069 1.000000 0.884370 0.965173 1.109619 1.096684 2.614401 +155 0.975320 1.000000 0.925674 0.934216 1.069006 1.030642 2.614966 +156 0.774549 1.000000 1.056337 0.965173 1.118139 1.105160 2.615599 +157 0.525028 1.000000 0.874011 0.824111 1.069006 1.096684 2.603500 +158 0.992704 1.000000 0.811066 0.820110 0.979526 1.070511 2.587245 +159 -0.727802 1.000000 0.801111 0.789154 1.059970 1.052355 2.591621 +160 1.671102 1.000000 0.863761 0.793154 1.173043 1.122667 2.642193 +161 -0.090324 1.000000 0.852774 0.789154 1.059970 1.096684 2.633997 +162 -1.260789 1.000000 0.887658 0.793154 1.154410 1.100049 2.638234 +163 -0.275838 1.000000 0.887658 0.793154 1.154410 1.098172 2.637971 +164 -1.911296 1.000000 0.919529 0.827078 1.154410 1.111274 2.651606 +165 -0.188156 1.000000 0.887658 0.827078 1.154410 1.122667 2.650210 +166 0.329342 1.000000 0.919529 0.917858 1.154410 1.117701 2.651070 +167 1.110349 1.000000 0.923396 1.035263 1.155203 1.133913 2.677685 +168 -0.107589 1.000000 1.029720 1.167561 1.155203 1.118189 2.674187 +169 0.325378 1.000000 1.029720 1.167561 1.154410 1.098172 2.665319 +170 -15.647560 1.000000 1.029720 1.167561 1.154410 1.098172 2.665329 +171 -0.713145 1.000000 1.102100 1.120465 1.155203 1.106648 2.670217 +172 0.141477 1.000000 1.131935 0.957238 1.155203 1.090701 2.669896 +173 -1.717268 1.000000 0.968429 0.956236 1.093226 1.042184 2.659742 +174 -0.018610 1.000000 1.131935 0.971221 1.155203 1.090701 2.671078 +175 -0.152614 1.000000 1.102100 1.105480 1.154410 1.106773 2.671900 +176 -1.235812 1.000000 0.894589 0.971634 1.049746 1.059605 2.665282 +177 0.334738 1.000000 0.894589 0.880272 1.049150 1.059605 2.664174 +178 -0.622001 1.000000 0.889371 0.880272 0.970274 1.021298 2.661407 +179 0.324728 1.000000 0.788265 0.748648 0.970274 1.029574 2.663541 +180 2.677702 1.000000 0.788265 0.748648 1.049150 1.080184 2.703795 +181 0.031194 1.000000 0.788265 0.748648 0.980272 1.030642 2.688135 +182 0.387911 1.000000 0.897799 0.816213 1.050539 1.118189 2.765993 +183 -0.273757 1.000000 0.897799 0.816213 1.055372 1.135571 2.836766 +184 1.696227 1.000000 0.998434 0.945426 1.160036 1.247624 2.858211 +185 -0.536167 1.000000 0.993216 0.943901 1.160036 1.231895 2.869043 +186 1.165979 1.000000 1.103559 1.169109 1.266341 1.326080 2.913577 +187 2.272367 1.000000 1.137498 1.279095 1.294253 1.432352 3.072539 +188 1.103474 1.000000 1.137498 1.279095 1.294253 1.496162 3.342283 +189 -0.736036 1.000000 1.301004 1.325430 1.498434 1.663867 3.379302 +190 -0.315977 1.000000 1.589765 1.392995 1.679350 1.876527 3.410838 +191 0.955105 1.000000 1.589765 1.392995 1.679350 1.840987 2.490017 +192 0.173718 1.000000 1.518929 1.484734 1.755566 2.023496 2.566998 +193 -0.334839 1.000000 1.878466 1.569269 1.869889 2.237125 2.970150 +194 1.380878 1.000000 1.878466 1.569269 2.062122 2.258532 3.049667 +195 -1.482407 1.000000 2.081312 1.715055 2.190484 2.420870 3.218398 +196 -0.022129 1.000000 2.081312 1.715055 2.257412 2.425033 3.220501 +197 0.651304 1.000000 2.063892 1.715055 2.257412 2.425033 3.220319 +198 -0.118530 1.000000 2.081312 1.764171 2.338202 2.596382 3.260310 +199 -1.750304 1.000000 2.033388 1.803037 2.581295 2.773204 3.320026 +200 -3.323619 5.000000 2.381455 2.230130 2.907379 3.026913 3.425691 +201 0.562217 5.000000 2.381455 2.230130 2.907379 3.075772 3.455961 +202 -4.614241 5.000000 2.772937 2.587673 3.169419 3.364469 3.652797 +203 -4.612867 5.000000 2.455375 2.713210 3.375916 3.458025 3.662293 +204 1.643797 5.000000 2.890957 2.713210 3.375916 3.458025 3.661587 +205 1.577542 5.000000 2.852559 2.783414 3.491394 3.616436 3.868408 +206 2.775860 5.000000 3.281952 3.156654 3.661902 3.774702 3.968982 +207 5.865571 5.000000 3.428549 3.393494 3.811989 4.114441 4.232382 +208 8.234119 5.000000 3.428549 3.393494 3.767490 3.998191 4.222691 +209 3.095353 5.000000 3.428549 3.393494 3.767490 3.998191 4.221204 +210 -3.013602 5.000000 3.755633 3.592086 3.918902 4.372677 4.725675 +211 -5.291502 5.000000 3.755402 3.592086 4.122688 4.576830 4.743418 +212 4.263975 5.000000 4.176478 4.528569 4.193060 4.794995 4.796623 +213 -9.292755 5.000000 4.176247 4.528569 4.193060 4.871193 4.811104 +214 -4.697274 5.000000 4.162337 4.528569 4.242076 4.794995 4.828620 +215 6.553692 5.000000 5.231606 4.738991 4.582639 5.000304 4.899242 +216 -0.662860 5.000000 5.231606 4.738991 4.571658 4.945563 4.891604 +217 -1.218356 5.000000 5.269586 5.273625 4.760161 4.945563 4.929741 +218 3.379209 5.000000 5.315659 5.273625 4.800042 5.021326 4.936126 +219 4.311424 5.000000 4.987390 5.351584 5.006539 5.000304 4.990401 +220 5.717484 5.000000 4.219000 5.351584 4.864391 4.879123 4.982976 +221 4.100420 5.000000 4.145204 4.146305 4.864391 4.794995 4.945355 +222 -7.098843 5.000000 4.243435 4.146305 4.816507 4.782220 4.951947 +223 -1.387704 5.000000 3.918867 4.100949 4.755502 4.610035 4.915036 +224 0.571755 5.000000 3.857478 4.064052 4.302735 4.190221 4.835901 +225 -7.875097 5.000000 3.918867 4.100949 4.688771 4.589972 4.888980 +226 5.778979 5.000000 4.623493 4.189589 4.787967 4.713386 5.070206 +227 9.640863 5.000000 4.681058 4.224764 5.069979 5.021326 5.261907 +228 0.900031 5.000000 5.057739 5.394868 5.320686 5.246220 5.527964 +229 0.562373 5.000000 5.387654 5.351584 4.970126 5.021326 5.387885 +230 -13.260275 5.000000 5.387654 5.351584 4.919430 4.996126 5.369747 +231 2.718149 5.000000 5.301086 4.260697 4.919430 4.966821 5.353048 +232 -4.529446 5.000000 5.145167 4.146305 4.800042 4.652996 5.281081 +233 2.387767 5.000000 4.162337 4.068346 4.603683 4.644887 5.246485 +234 2.721147 5.000000 4.075898 3.979706 4.468489 4.520211 5.043787 +235 5.555074 5.000000 3.780652 3.979706 4.442412 4.399273 4.990713 +236 0.200443 5.000000 3.694213 3.542148 4.550858 4.405824 5.008626 +237 4.205586 5.000000 3.694213 3.542148 4.550858 4.405824 5.007600 +238 -1.268130 5.000000 3.694213 3.542148 4.550858 4.385338 5.004178 +239 5.057468 5.000000 3.694213 4.068346 4.603683 4.463309 5.063598 +240 1.938970 5.000000 3.694213 4.068346 4.603683 4.596383 5.129349 +241 0.024430 5.000000 3.694213 4.068346 4.603683 4.589972 5.109072 +242 2.260724 5.000000 3.200603 3.542148 4.448770 4.500147 5.079116 +243 4.582206 5.000000 3.200603 3.542148 4.448770 4.534378 5.258559 +244 0.630058 5.000000 3.694213 4.057666 4.679094 4.628659 5.349815 +245 -3.644809 5.000000 4.193120 4.260697 4.883738 5.002537 5.404640 +246 -7.761540 5.000000 3.780652 4.057666 4.636933 4.644887 5.249803 +247 9.875363 5.000000 3.680303 3.656540 4.636933 4.893271 5.311000 +248 -11.306466 5.000000 3.483934 3.160282 4.170773 4.598910 5.089286 +249 -1.032675 5.000000 3.488380 3.656540 4.636933 4.879310 5.236676 +250 1.054487 5.000000 4.729718 3.936705 5.098362 5.384008 5.358965 +251 -1.542016 5.000000 3.737201 3.656540 4.636933 4.964392 4.932118 +252 0.368271 5.000000 3.998158 3.656540 4.622022 4.847064 4.915745 +253 -1.002730 5.000000 3.737201 4.057666 4.636933 4.644887 4.918690 +254 3.390589 5.000000 4.990675 4.260697 4.705442 4.879310 4.957943 +255 -1.919953 5.000000 4.990675 4.260697 4.622022 4.534378 4.940991 +256 -6.303733 5.000000 4.835284 3.936705 4.688771 4.651672 4.912625 +257 -0.399922 5.000000 5.595413 4.540862 4.918525 4.966821 4.959404 +258 -0.643083 5.000000 4.835284 3.936705 4.893415 4.857668 4.917188 +259 6.080277 5.000000 4.990675 3.936705 4.622022 4.831081 4.918276 +260 6.874898 5.000000 3.315534 3.099136 3.873154 4.603781 4.855329 +261 4.871720 5.000000 4.990675 3.936705 4.622022 4.644887 4.931465 +262 -1.156272 5.000000 5.328340 4.167394 5.001482 4.963970 4.966330 +263 -11.091105 5.000000 5.595413 5.260739 5.019805 5.041774 4.981375 +264 6.681987 5.000000 5.619820 5.215340 5.019805 5.229324 5.224911 +265 -4.581508 5.000000 5.334633 5.636815 5.269179 5.575973 5.253475 +266 1.527410 5.000000 5.695144 5.867504 5.586700 5.738940 5.535770 +267 -7.188982 5.000000 5.695144 5.867504 5.586700 5.691624 5.443611 +268 -0.754286 5.000000 5.385009 5.657474 5.586700 5.661132 5.452097 +269 7.822788 5.000000 5.385009 5.657474 5.303160 5.474633 5.263990 +270 -7.271588 5.000000 5.385009 5.657474 5.303781 5.712579 5.294837 +271 -0.647836 5.000000 5.702634 5.657474 5.303781 5.770878 5.322557 +272 -0.383459 5.000000 5.695144 5.657474 5.303160 5.752622 5.320580 +273 5.063808 5.000000 5.702634 5.657474 5.054122 5.737772 5.325291 +274 -4.241238 5.000000 5.702634 5.657474 5.054122 5.737772 5.325265 +275 0.107873 5.000000 5.696942 5.543813 5.364874 5.874387 5.428538 +276 -4.490366 5.000000 5.702634 5.543813 5.342140 5.947527 5.431649 +277 4.210545 5.000000 5.695144 5.628783 5.344592 5.884553 5.398343 +278 1.230910 5.000000 5.769927 5.888162 5.994389 5.960932 5.487853 +279 1.256412 5.000000 5.769927 5.888162 5.994389 6.036620 5.489710 +280 1.324993 5.000000 5.696942 5.628783 5.428206 5.960932 5.407547 +281 5.724715 5.000000 5.696942 5.620125 5.344592 5.752622 5.310821 +282 3.701784 5.000000 5.539120 5.543813 5.344581 5.707877 5.270076 +283 -3.394856 5.000000 5.674248 5.703303 5.479595 5.960932 5.427475 +284 -11.404739 5.000000 5.539120 5.543813 5.294530 5.682901 5.193445 +285 -4.213370 5.000000 5.539120 5.543813 5.294530 5.682901 5.193502 +286 11.059266 5.000000 5.377961 5.518625 5.335961 5.605745 5.180578 +287 -4.275216 5.000000 5.220139 5.518625 5.277917 5.646749 5.166872 +288 -10.902450 5.000000 5.327585 5.512708 5.175387 5.335664 5.087248 +289 -6.415396 5.000000 5.377961 5.518625 5.843820 5.706934 5.359813 +290 -4.233255 5.000000 5.327585 5.114187 5.640505 5.356382 5.207455 +291 3.203285 5.000000 5.520715 5.108270 5.303781 5.082667 5.118572 +292 -0.243010 5.000000 5.312485 5.108270 4.981409 5.063582 5.124535 +293 -2.292388 5.000000 5.312485 5.108270 5.554852 5.074195 5.127643 +294 -0.988202 5.000000 5.312485 5.108270 5.554852 5.106748 5.150840 +295 -8.617249 5.000000 5.006661 5.093529 4.383496 5.035319 5.123388 +296 0.682730 5.000000 5.109485 5.093529 5.084121 5.038606 5.121570 +297 3.351886 5.000000 4.978758 4.610367 4.383496 4.867844 5.100909 +298 5.708072 5.000000 4.672934 4.205568 4.902923 4.722350 5.042756 +299 -1.390486 5.000000 4.920140 4.610367 5.113957 5.106748 5.262576 +300 -3.561594 5.000000 5.109485 5.014805 5.128198 5.391971 5.332633 +301 3.340206 5.000000 5.126282 5.497967 5.718812 5.706934 5.461842 +302 -4.961103 5.000000 5.010479 5.093529 5.336958 5.511373 5.372576 +303 -9.348193 5.000000 5.010479 5.093529 5.336958 5.577010 5.400782 +304 -0.853739 5.000000 5.010479 5.093529 5.336958 5.589529 5.401533 +305 6.683526 5.000000 5.064071 4.687134 5.211245 5.399548 5.158954 +306 1.934211 5.000000 4.920140 4.938380 5.292158 5.570167 5.318262 +307 -1.084508 5.000000 4.920140 4.938380 5.128198 5.473333 5.102231 +308 2.111639 5.000000 4.803662 4.432619 5.084121 5.356382 5.074232 +309 -11.472716 5.000000 4.076637 4.175442 4.902923 5.279437 4.908097 +310 2.657706 5.000000 4.076637 4.175442 4.902923 5.106748 4.849805 +311 0.815234 5.000000 3.957296 4.008303 4.853005 4.881096 4.800551 +312 0.732248 5.000000 4.076637 4.016961 5.084121 5.279437 5.139921 +313 -2.066920 5.000000 4.150052 4.016961 5.084121 5.371390 5.140675 +314 5.820691 5.000000 4.003762 3.636978 4.853005 5.304413 5.137616 +315 -0.036735 5.000000 3.837284 3.636978 4.363936 5.184403 5.129738 +316 -0.817591 5.000000 3.837284 3.636978 4.363936 5.058771 4.955603 +317 1.751958 5.000000 4.439564 4.138418 4.853005 5.159427 4.987217 +318 -1.279063 5.000000 5.281118 5.146236 5.283907 5.473333 5.278802 +319 9.049142 5.000000 4.273087 4.138418 5.283907 5.251880 5.229896 +320 5.217183 5.000000 4.439564 4.138418 4.853005 5.294091 5.217850 +321 -8.288637 5.000000 4.439564 4.138418 4.853005 5.228289 5.211998 +322 -2.776235 5.000000 5.114641 4.559194 5.348747 5.204853 5.231451 +323 4.875258 5.000000 5.114641 4.559194 5.348747 5.294091 5.267383 +324 -3.458497 5.000000 4.439564 4.426764 4.955135 4.978755 5.026550 +325 2.761264 5.000000 4.439564 4.426764 4.955135 4.978755 5.036502 +326 8.652122 5.000000 4.413978 4.138418 4.772958 4.711363 4.968877 +327 5.928311 5.000000 4.413978 4.138418 4.772958 4.718688 4.967719 +328 1.889721 5.000000 4.865704 4.426764 4.955135 5.182514 5.443802 +329 7.320146 5.000000 4.439564 4.426764 5.283907 5.178847 5.459672 +330 -4.416639 5.000000 4.413978 4.136959 4.772958 4.641304 5.065697 +331 -1.036730 5.000000 4.273087 4.136959 4.487097 4.534561 5.067312 +332 12.419299 5.000000 4.337910 4.136959 4.487097 4.591389 5.067146 +333 1.658067 5.000000 4.515632 4.426764 4.631147 4.915916 5.186128 +334 3.515730 5.000000 5.179464 4.847541 5.040168 5.142322 5.224802 +335 0.927521 5.000000 4.515632 4.559194 4.631147 4.730982 5.177288 +336 -3.607262 5.000000 5.217139 4.847541 5.040168 4.978755 5.220703 +337 -2.634539 5.000000 5.455767 5.433643 5.314278 5.228289 5.232270 +338 12.181637 5.000000 5.455767 5.433643 5.314278 5.228289 5.235794 +339 -0.158993 5.000000 5.455767 5.433643 5.314278 5.293852 5.251487 +340 1.784266 5.000000 5.217139 4.847541 4.567238 4.804339 5.114469 +341 -3.287667 5.000000 5.179464 4.646519 4.715363 5.159204 5.308371 +342 -2.752338 5.000000 4.625905 4.559194 4.434477 4.730982 5.099029 +343 -6.136168 5.000000 4.663580 4.570761 4.487097 4.798812 5.122461 +344 3.904704 5.000000 4.477957 4.541376 4.487097 4.739118 5.107991 +345 -1.675977 5.000000 4.477957 4.541376 4.825596 5.142322 5.640669 +346 3.096701 5.000000 4.477957 4.541376 4.641262 4.959511 5.634822 +347 1.605890 5.000000 4.419186 4.282415 4.359785 4.645731 5.504573 +348 15.544441 5.000000 4.419186 4.282415 4.322957 4.629714 5.467235 +349 -1.288100 5.000000 4.470853 4.559194 4.497622 4.915916 5.609190 +350 -0.229852 5.000000 4.456861 4.248568 4.439661 4.609383 5.510586 +351 0.329253 5.000000 3.901263 3.971789 4.065422 4.449698 5.462203 +352 0.858956 5.000000 3.859952 3.971789 3.929714 4.288101 5.457372 +353 -5.500308 5.000000 3.901263 4.034029 3.929714 4.166432 5.154648 +354 -3.892115 5.000000 4.333399 4.034029 4.199089 4.275990 5.164648 +355 0.884368 5.000000 4.456861 4.034029 4.311449 4.343885 5.180551 +356 5.834929 5.000000 4.778057 4.121353 4.497622 4.469879 5.218446 +357 4.695344 5.000000 4.304709 4.034029 4.311449 4.372944 5.182654 +358 2.807291 5.000000 4.304709 4.121353 4.311449 4.427750 5.216447 +359 -2.261169 5.000000 4.304709 4.121353 4.005256 4.372944 4.974854 +360 0.642313 5.000000 4.456861 4.335893 3.978050 4.469879 5.005713 +361 -8.654712 5.000000 4.470853 4.796260 4.175938 4.731294 5.131351 +362 -0.092398 5.000000 4.433178 4.541376 4.186231 4.915916 5.299535 +363 6.487920 5.000000 4.419186 4.395123 4.136632 4.731294 5.273712 +364 3.865063 5.000000 4.419186 4.395123 4.136632 4.731294 5.280065 +365 -14.569866 5.000000 4.371074 4.285903 4.136632 4.709270 5.269798 +366 1.053951 5.000000 4.419186 4.432156 4.504785 4.742014 5.332498 +367 1.379787 5.000000 4.470853 4.603911 4.474791 4.851329 5.339864 +368 3.874501 5.000000 4.625905 4.713131 4.667231 5.173955 5.387031 +369 -7.232712 5.000000 4.648220 4.603911 4.322957 4.709270 4.827389 +370 1.757142 5.000000 4.778057 4.848752 4.463610 4.842387 4.895612 +371 2.634704 5.000000 4.792049 5.538047 4.667231 5.068787 4.955838 +372 1.748700 5.000000 4.756907 5.538047 4.633249 5.047151 4.956826 +373 -2.823149 5.000000 4.963795 5.538047 4.667231 5.148903 4.972983 +374 -2.063877 5.000000 5.072482 4.957972 4.889501 5.305669 5.113165 +375 4.417386 5.000000 4.756907 4.870919 4.722181 5.313927 5.083906 +376 -3.752995 5.000000 4.756907 4.870919 4.899794 5.228880 5.089637 +377 0.589799 5.000000 4.778057 4.761699 4.837104 5.133296 5.018975 +378 -4.463349 5.000000 4.855914 4.408166 4.903747 5.172565 5.034793 +379 6.907824 5.000000 4.855914 4.408166 4.802487 5.148903 5.020191 +380 3.717728 5.000000 4.855914 4.408166 4.727607 5.131172 5.010025 +381 7.597070 5.000000 5.427210 5.097461 4.972918 5.173955 5.116314 +382 9.747758 5.000000 5.427210 5.097461 4.972918 5.073570 4.992504 +383 -0.360552 5.000000 5.236867 5.097461 5.078670 5.049937 4.992743 +384 -6.328120 5.000000 5.029643 4.735202 5.173245 4.858752 4.896177 +385 3.123386 5.000000 5.029643 4.735202 5.173245 4.988539 4.961658 +386 -4.982464 5.000000 4.958070 4.501532 5.078670 4.858752 4.565345 +387 -2.492864 5.000000 5.029643 4.501532 5.002814 4.869931 4.577641 +388 5.177591 5.000000 5.029643 4.501532 5.002814 4.858752 4.575117 +389 -0.220782 5.000000 4.440774 4.139272 5.002814 4.802576 4.551337 +390 -5.183332 5.000000 4.440774 4.139272 5.002814 4.599155 4.465799 +391 -4.813882 5.000000 5.029643 4.501532 5.301365 4.737383 4.540566 +392 0.715621 5.000000 5.293875 5.097461 5.222898 4.737383 4.609255 +393 -2.705716 5.000000 5.592584 5.624047 5.364765 5.034031 4.987675 +394 9.502533 5.000000 5.592584 5.624047 5.324491 5.065919 4.980714 +395 -2.090813 5.000000 6.175048 6.064632 5.470516 5.173955 5.026604 +396 1.972222 5.000000 5.954235 5.624047 5.430242 5.034031 4.974397 +397 -1.214261 5.000000 6.175048 5.805547 5.596937 5.323906 5.236500 +398 -5.184635 5.000000 6.175048 5.805547 5.596937 5.313927 5.242685 +399 1.471915 5.000000 6.046467 5.805547 5.646401 5.350998 5.211639 +400 -0.936050 5.000000 5.165294 5.301113 5.528275 5.209911 5.087036 +401 -6.740659 5.000000 5.165294 5.301113 5.561079 5.301063 5.203150 +402 -4.846911 5.000000 4.156424 5.191195 5.528275 5.174001 5.066682 +403 -0.447279 5.000000 3.936586 4.952190 4.829758 4.829573 4.804838 +404 -2.949098 5.000000 4.285006 4.952190 5.347469 4.858752 4.825368 +405 6.255510 5.000000 4.045008 4.286611 4.829758 4.829573 4.769609 +406 7.713422 5.000000 4.045008 4.286611 5.347469 5.149333 5.176752 +407 -2.094391 5.000000 4.257306 3.997098 4.912404 5.274512 5.177156 +408 0.917200 5.000000 4.287655 4.396529 4.954329 5.286284 5.210216 +409 2.442914 5.000000 4.257306 4.286611 4.912404 4.862131 5.147818 +410 -4.708191 5.000000 4.257306 4.286611 4.912404 5.090271 5.149978 +411 5.631424 5.000000 3.914019 3.887179 4.650344 4.839602 5.092908 +412 -5.421105 5.000000 4.331485 3.816679 4.573163 5.072900 5.089364 +413 -12.296347 5.000000 4.552420 3.816679 4.573163 5.103898 5.097737 +414 -2.205921 5.000000 4.552420 3.997098 4.573163 5.184600 5.153410 +415 4.503806 5.000000 4.387065 3.997098 4.484631 4.857745 4.962289 +416 -0.077589 5.000000 4.630346 4.272474 4.437477 4.957424 5.003673 +417 -11.206864 5.000000 4.552420 4.272474 4.484631 4.839602 4.996563 +418 1.500243 5.000000 5.381754 4.272474 4.609187 4.956988 5.013333 +419 1.812451 5.000000 4.552420 4.136224 4.484631 4.724219 4.940300 +420 0.434045 5.000000 5.172976 4.272474 4.961299 5.096248 5.236862 +421 7.684015 5.000000 5.445477 4.671906 4.962531 5.205085 5.297417 +422 2.294635 5.000000 5.381754 4.652682 4.609187 5.017013 5.215906 +423 0.864640 5.000000 5.381754 4.652682 4.609187 4.986194 5.207489 +424 -3.487923 5.000000 5.381754 4.652682 4.609187 5.072900 5.209310 +425 2.814391 5.000000 4.552420 4.516431 4.519173 5.090271 5.196782 +426 12.837914 5.000000 4.343642 4.671906 4.279213 4.986194 5.141610 +427 4.761137 5.000000 4.289523 4.396529 4.192072 4.752178 4.992292 +428 -4.477532 5.000000 4.043526 4.671906 4.279213 4.551350 5.018673 +429 1.303452 5.000000 4.351943 4.671906 4.279213 4.688257 5.016155 +430 -1.099795 5.000000 5.048072 4.671906 4.364926 4.662450 4.997656 +431 1.539987 5.000000 4.289523 4.136224 4.243410 4.415913 4.956182 +432 4.900701 5.000000 4.024678 3.750929 4.188295 4.134028 4.869178 +433 2.157716 5.000000 3.529107 3.336262 4.065719 3.945399 4.805683 +434 -5.373555 5.000000 3.511712 3.135109 3.910426 3.763098 4.404351 +435 3.369386 5.000000 3.752517 3.063013 3.935502 3.686000 4.393520 +436 4.774591 5.000000 3.752517 3.063013 4.033002 3.742874 4.957682 +437 0.723821 5.000000 3.752517 3.063013 3.935502 3.742874 4.957018 +438 -2.765298 5.000000 3.099484 3.040700 3.310097 3.561608 4.590831 +439 -0.110626 5.000000 3.099484 3.040700 3.310097 3.529767 4.589366 +440 -10.941173 5.000000 3.099484 3.040700 3.310097 3.529767 4.587770 +441 -5.199335 5.000000 2.918419 3.040700 3.310097 3.561608 4.590097 +442 3.327284 5.000000 3.099484 2.939203 3.310097 3.478121 4.470489 +443 -4.480336 5.000000 3.099484 2.631717 3.310097 3.478121 4.465326 +444 -0.918793 5.000000 3.012703 2.631717 3.310097 3.442915 4.465203 +445 -1.934569 5.000000 2.703698 2.608728 3.131815 3.231079 4.419449 +446 -3.999568 5.000000 2.416004 2.540414 2.933102 3.099830 4.405615 +447 -1.807214 5.000000 2.068133 2.528496 2.827115 2.969671 3.948695 +448 3.451138 5.000000 2.044298 2.458291 2.553253 2.685466 3.882998 +449 -0.773710 5.000000 2.044298 2.131967 2.428477 2.591104 3.820045 +450 -0.210281 1.000000 2.044298 2.131967 2.251567 2.591104 3.816161 +451 1.634693 1.000000 1.929772 2.179489 2.395212 2.580917 3.816587 +452 0.099787 1.000000 2.044298 2.179489 2.218302 2.565652 3.811095 +453 1.399718 1.000000 2.058885 2.455542 2.218302 2.572988 4.475544 +454 -1.837313 1.000000 2.013519 2.418743 2.115226 2.423295 4.462064 +455 1.536279 1.000000 2.013519 2.092419 2.101201 2.210105 4.390144 +456 15.461575 1.000000 1.942993 2.027986 2.082939 2.139251 4.352843 +457 0.245996 1.000000 1.927281 1.765415 2.069165 2.022400 4.276809 +458 0.063799 1.000000 1.980637 1.765415 2.035218 2.099358 4.274333 +459 0.845947 1.000000 1.913268 1.657701 1.858039 1.964217 4.260197 +460 1.486638 1.000000 1.927281 1.765415 2.035218 2.101232 4.270235 +461 1.742924 1.000000 1.912745 1.657701 1.843216 1.932605 3.927183 +462 -1.776202 1.000000 1.839378 1.863433 1.734962 1.861585 3.855941 +463 1.650770 1.000000 1.912745 1.657701 1.670353 1.790977 3.826878 +464 0.255835 1.000000 1.783879 1.600862 1.628975 1.709738 3.765389 +465 1.045515 1.000000 1.783879 1.600862 1.628975 1.688697 3.763496 +466 0.710777 1.000000 1.725297 1.469406 1.484396 1.591194 3.751352 +467 -0.936687 1.000000 1.652247 1.418806 1.454122 1.499168 3.696021 +468 0.742553 1.000000 1.652247 1.418806 1.380636 1.481326 3.689802 +469 -1.335997 1.000000 1.497032 1.270866 1.359474 1.374527 3.651517 +470 0.333081 1.000000 1.477478 1.270866 1.315445 1.306576 3.649411 +471 1.604094 1.000000 1.477478 1.270866 1.315445 1.315489 3.649156 +472 0.196511 1.000000 1.200154 1.231242 1.145298 1.261929 3.641195 +473 -15.658232 1.000000 1.492264 1.270866 1.315445 1.388793 3.666623 +474 0.792495 1.000000 1.185369 1.270866 1.177150 1.366498 3.662891 +475 -1.114018 1.000000 1.175309 1.208340 1.177150 1.380593 3.665994 +476 -0.475007 1.000000 1.175309 1.208340 1.145298 1.354679 3.662644 +477 -0.760521 1.000000 1.175309 1.208340 1.069780 1.274487 2.736621 +478 -1.190693 1.000000 1.237276 1.208340 1.162648 1.312312 2.736617 +479 0.320925 1.000000 1.237276 1.208340 1.162648 1.304296 2.736947 +480 -2.307515 1.000000 1.212431 1.208340 1.138404 1.302200 2.732584 +481 0.252781 1.000000 1.153849 1.151250 1.100690 1.252087 2.719429 +482 1.865834 1.000000 1.134726 1.194220 1.098508 1.195271 2.705248 +483 -1.692357 1.000000 1.134726 1.194220 1.098508 1.188332 2.698193 +484 -0.868428 1.000000 1.073418 1.170664 1.089281 1.154155 2.680321 +485 -0.489642 1.000000 1.078218 1.194220 1.164161 1.195271 2.693005 +486 0.236023 1.000000 1.072278 1.170664 1.089281 1.173121 2.685026 +487 0.371736 1.000000 1.072278 0.987914 1.080448 1.163880 2.681108 +488 -1.254621 1.000000 1.073418 1.114228 1.009357 1.188784 2.686777 +489 -0.031377 1.000000 1.186457 0.907922 1.138735 1.188784 2.682394 +490 -0.222826 1.000000 1.072278 0.900546 1.004602 1.138235 2.678284 +491 0.008775 1.000000 1.186457 1.143874 1.098508 1.176948 2.689050 +492 0.464250 1.000000 1.186457 1.143874 1.098508 1.162788 2.678840 +493 2.802897 1.000000 1.189422 1.143874 1.126600 1.175016 2.678260 +494 0.869507 1.000000 1.085500 1.080370 1.080448 1.107148 1.071941 +495 2.349648 1.000000 1.125806 0.900546 1.032490 1.097603 1.081688 +496 1.099712 1.000000 1.085500 0.837042 1.080448 1.065844 1.067468 +497 1.266472 1.000000 1.088466 0.932983 1.022144 1.065844 1.067622 +498 -0.581749 1.000000 1.078218 1.075816 1.034653 1.124375 1.092542 +499 0.183612 1.000000 1.078218 1.075816 1.034653 1.093282 1.084930 +500 0.142260 1.000000 1.088466 1.075816 1.022144 1.067466 1.085543 +501 -0.085219 1.000000 1.073418 1.007537 0.925369 1.017065 1.014907 +502 -1.249745 1.000000 1.073418 1.007537 0.943281 1.050149 1.018502 +503 -1.112341 1.000000 0.997719 0.981448 0.943281 1.061808 1.103952 +504 -0.421823 1.000000 0.997719 0.981448 0.943281 1.027143 1.074166 +505 1.425884 1.000000 1.073418 1.007537 0.920746 1.032999 1.070014 +506 0.069254 1.000000 1.061713 1.008918 0.978240 1.059877 1.089199 +507 0.173353 1.000000 1.119516 1.041781 1.049548 1.128557 1.145746 +508 0.938138 1.000000 1.090886 1.041781 1.043157 1.133280 1.145720 +509 -0.750569 1.000000 1.090886 1.041781 1.043157 1.121444 1.139363 +510 0.067254 1.000000 1.119516 1.041781 1.006157 1.133280 1.142146 +511 1.352565 1.000000 1.112230 1.041781 1.052769 1.134882 1.141073 +512 0.889468 1.000000 1.053011 1.041781 1.080448 1.125722 1.140414 +513 -0.664905 1.000000 1.053011 1.041781 1.104522 1.134882 1.143359 +514 -0.471544 1.000000 0.963271 1.008918 1.063664 1.052303 1.072888 +515 -1.162472 1.000000 1.112230 1.090613 1.009540 1.067466 1.089835 +516 0.288422 1.000000 1.112230 1.090613 1.009540 1.057772 1.065324 +517 0.593672 1.000000 1.061713 1.067702 0.962455 1.052303 1.055861 +518 1.797173 1.000000 1.045065 1.067228 0.964114 1.050149 1.045766 +519 -0.910366 1.000000 1.045065 1.048787 0.964114 1.050149 1.045345 +520 -0.170271 1.000000 1.061043 1.048787 0.980201 1.044728 1.047216 +521 0.538727 1.000000 1.045065 1.048787 0.980201 1.031639 1.048434 +522 0.742206 1.000000 1.045065 1.048787 1.020586 1.031639 1.050677 +523 -3.051487 1.000000 1.014944 0.985534 0.964894 0.979797 1.027336 +524 -0.682138 1.000000 0.998268 0.973059 0.962455 0.975757 1.019779 +525 0.933800 1.000000 0.950955 0.973059 0.951256 0.940912 1.015302 +526 1.629978 1.000000 0.909526 0.972585 0.962171 0.914593 1.001206 +527 2.480905 1.000000 0.932541 0.985534 0.964894 0.940912 1.019382 +528 0.153676 1.000000 0.998268 1.048787 1.030724 0.940912 1.028396 +529 -1.048369 1.000000 0.998268 1.048787 1.112643 0.970398 1.052656 +530 0.857923 1.000000 0.956838 0.986008 1.123092 1.051045 2.652727 +531 0.702038 1.000000 0.956838 0.986008 1.127931 1.056405 2.654764 +532 0.483993 1.000000 0.932541 0.985534 1.089465 1.027175 2.653062 +533 0.858562 1.000000 0.998268 0.985534 1.127151 1.057754 2.656292 +534 0.479959 1.000000 0.909526 0.972585 1.069988 1.063013 2.653079 +535 -1.118587 1.000000 0.895336 0.897648 1.069988 1.051045 2.651571 +536 1.778968 1.000000 0.886720 0.890553 1.047198 0.980895 2.640665 +537 0.056305 1.000000 0.901056 0.897648 1.144511 1.082007 2.661266 +538 -0.454076 1.000000 0.957365 0.897648 1.036490 1.061768 2.662966 +539 -0.556872 1.000000 0.957365 0.897648 1.036490 1.041062 2.656623 +540 -0.265134 1.000000 0.901056 0.890553 1.112643 1.030154 2.647348 +541 0.451695 1.000000 0.901056 0.890553 1.127151 1.008409 2.647745 +542 -0.352988 1.000000 0.901056 0.890553 1.061264 0.999284 2.648347 +543 0.260478 1.000000 0.957365 0.897648 1.036490 1.041263 2.666717 +544 1.238717 1.000000 1.038295 0.891027 1.036490 0.977273 2.608369 +545 0.492358 1.000000 1.038295 0.891027 1.036490 1.041062 2.616674 +546 -0.329513 1.000000 0.957365 0.897648 0.987749 1.033279 2.622681 +547 -1.028432 1.000000 0.970511 0.969674 0.959953 0.968247 2.623117 +548 -0.693736 1.000000 0.874178 0.857027 0.945648 0.916548 2.603750 +549 1.782936 1.000000 0.942936 0.857027 0.987749 0.937164 2.603574 +550 15.818794 1.000000 0.874178 0.782090 0.953131 0.905967 2.594181 +551 -0.255493 1.000000 0.802867 0.757416 0.913007 0.886705 2.594710 +552 0.032752 1.000000 0.802867 0.713530 0.913007 0.875255 2.594504 +553 1.442903 1.000000 0.817254 0.713530 0.878542 0.860304 2.596434 +554 -0.343417 1.000000 0.817254 0.713530 0.878542 0.864776 2.597031 +555 -0.303262 1.000000 0.817254 0.713530 0.823233 0.845104 2.597463 +556 -0.268796 1.000000 0.774383 0.713530 0.798197 0.822710 2.590808 +557 -1.543759 1.000000 0.751394 0.775898 0.748980 0.805205 2.590720 +558 -0.070619 1.000000 0.781834 0.788467 0.756806 0.824487 2.591346 +559 1.054617 1.000000 0.834670 0.713530 0.874077 0.834041 2.587819 +560 0.853996 1.000000 0.835712 0.706435 0.910085 0.835011 2.583300 +561 -0.226444 1.000000 0.849057 0.713530 0.916851 0.873077 2.587618 +562 0.188203 1.000000 0.867516 0.882915 0.941887 0.920355 2.606325 +563 -1.475397 1.000000 0.867516 0.882915 0.941887 0.924734 2.606878 +564 1.306774 1.000000 0.923834 0.926801 0.953131 0.951755 2.611340 +565 -1.242503 1.000000 0.867516 0.882915 0.922189 0.920355 2.608540 +566 -0.621848 1.000000 0.929559 0.912836 0.894256 0.926640 2.622731 +567 -0.642380 1.000000 0.933376 0.928056 0.966058 0.976884 2.632097 +568 0.609551 1.000000 0.983283 0.956722 0.955139 0.985566 2.626332 +569 0.668753 1.000000 0.951479 0.926801 0.938918 0.964261 2.621618 +570 -0.115041 1.000000 0.879498 0.882915 0.916851 0.914806 2.611912 +571 -0.049168 1.000000 0.867516 0.900267 0.903496 0.852394 0.844950 +572 0.592595 1.000000 0.879498 0.900267 0.860845 0.852394 0.844481 +573 -0.191465 1.000000 0.879498 0.900267 0.898372 0.901035 0.847517 +574 0.986086 1.000000 0.849057 0.842384 0.806022 0.825155 0.812627 +575 0.130059 1.000000 0.849057 0.842384 0.806022 0.834041 0.811912 +576 -0.581485 1.000000 0.879498 0.857604 0.875408 0.914806 0.865156 +577 -0.954385 1.000000 0.951479 0.931466 0.923408 0.955787 0.907232 +578 0.873495 1.000000 0.934416 0.915487 0.923408 0.975591 0.923398 +579 0.514512 1.000000 0.959554 0.989350 0.938532 1.017289 0.940851 +580 0.236322 1.000000 0.934416 0.931466 0.915476 0.975591 0.922564 +581 -0.742019 1.000000 0.896561 0.913349 0.883543 0.964261 0.914375 +582 -1.569790 1.000000 0.900868 0.913349 0.867634 0.964261 0.914680 +583 -0.428112 1.000000 0.930109 0.931466 0.915476 1.071690 1.037852 +584 1.362854 1.000000 0.930109 0.931466 0.915476 1.096653 1.137038 +585 0.014266 1.000000 0.930109 0.931466 0.939227 1.125413 1.334542 +586 -1.379133 1.000000 0.930109 0.931466 0.955731 1.138339 1.357751 +587 -1.228347 1.000000 0.955247 1.088893 0.972625 1.147308 1.366202 +588 1.129630 1.000000 1.043020 1.256805 1.007069 1.148425 1.389272 +589 0.000026 1.000000 1.048593 1.256805 1.063383 1.205405 1.692282 +590 0.315187 1.000000 1.044287 1.238687 1.036973 1.177336 1.689192 +591 -1.197582 1.000000 1.350878 1.251058 1.181140 1.273989 1.795091 +592 -0.034754 1.000000 1.359141 1.273864 1.329732 1.317496 1.808411 +593 0.397784 1.000000 1.598342 1.224727 1.460323 1.408617 1.870814 +594 -0.037659 1.000000 1.614428 1.317228 1.508528 1.589512 2.014759 +595 -0.217015 1.000000 1.453790 1.255999 1.516079 1.564340 2.005114 +596 -2.014863 1.000000 1.499403 1.317228 1.657350 1.668902 2.140207 +597 -1.887054 1.000000 1.668696 1.385642 1.761323 1.818586 2.192964 +598 1.641117 1.000000 1.765318 1.403759 1.931545 1.901629 2.218456 +599 -1.254351 1.000000 1.707249 1.385642 1.924872 1.825985 2.214361 +600 0.108400 3.000000 1.827246 1.385642 1.924872 1.954925 2.222985 +601 0.490072 3.000000 1.892251 1.859746 1.924987 2.096900 2.242326 +602 0.008793 3.000000 1.892251 1.859746 1.924987 2.096900 2.240242 +603 2.997641 3.000000 1.916353 1.860109 1.973322 2.215651 2.256421 +604 -3.347985 3.000000 1.916353 1.860109 1.973322 2.215651 2.257366 +605 4.543545 3.000000 1.916353 1.860109 1.973322 2.302730 2.261569 +606 -2.034774 3.000000 1.988873 2.129106 2.103072 2.396861 2.275871 +607 -1.180894 3.000000 2.162972 2.122085 2.185209 2.411543 2.286230 +608 -1.783292 3.000000 2.450041 2.141361 2.199375 2.461461 2.326376 +609 6.100999 3.000000 2.474552 2.146410 2.237281 2.540909 2.379937 +610 -0.102829 3.000000 2.484649 2.243061 2.265744 2.601845 2.420237 +611 -3.885730 3.000000 2.592387 2.481996 2.424726 2.658816 2.467381 +612 -1.493656 3.000000 2.592387 2.481996 2.424726 2.644251 2.466087 +613 -3.297359 3.000000 2.613389 2.481996 2.580747 2.699986 2.471461 +614 -5.008837 3.000000 2.588080 2.481996 2.528738 2.699986 2.473525 +615 -0.869117 3.000000 2.645296 2.659393 2.698299 2.808248 2.554917 +616 4.425439 3.000000 2.645296 2.659393 2.729840 2.762799 2.556960 +617 2.807595 3.000000 2.613389 2.481996 2.780789 2.740275 2.536087 +618 2.108389 3.000000 2.613389 2.481996 2.780789 2.701181 2.534669 +619 -0.685891 3.000000 2.550970 2.616546 2.660747 2.685061 2.539093 +620 1.254902 3.000000 2.575480 2.659393 2.848193 2.906569 2.735396 +621 1.771498 3.000000 2.846728 2.729457 2.868415 2.906569 2.747831 +622 -0.302315 3.000000 2.885491 2.729457 2.868415 2.896194 2.758460 +623 2.242549 3.000000 2.885491 2.729457 2.970128 2.903450 2.769875 +624 -0.595095 3.000000 2.885491 2.704880 2.970128 2.865029 2.748574 +625 1.617774 3.000000 2.885491 2.704880 2.916815 2.725071 2.721230 +626 1.634306 3.000000 2.860391 2.490523 2.780789 2.618938 2.623792 +627 2.093815 3.000000 2.860391 2.486965 2.780789 2.555220 2.609599 +628 -2.924627 3.000000 2.821627 2.486965 2.767425 2.606765 2.605268 +629 3.448153 3.000000 2.846728 2.486965 2.780789 2.689642 2.619958 +630 2.966387 3.000000 2.860391 2.385265 2.668373 2.509029 2.436651 +631 3.287939 3.000000 2.901382 2.388823 2.807509 2.593412 2.725013 +632 -1.109032 3.000000 2.901382 2.388823 2.885745 2.620717 2.763630 +633 1.392653 3.000000 2.901382 2.560515 2.917290 2.739487 2.776920 +634 -0.328460 3.000000 2.901382 2.560515 2.917290 2.693841 2.766323 +635 -3.796088 3.000000 2.910002 2.490523 2.913214 2.580587 2.725111 +636 -0.564299 3.000000 2.871239 2.490523 2.921761 2.618938 2.729533 +637 1.171487 3.000000 2.910002 2.560515 2.953642 2.683576 3.876342 +638 -1.819781 3.000000 2.879141 2.708212 2.877988 2.683576 3.838504 +639 -1.435856 3.000000 2.758637 2.695662 2.676878 2.620717 3.809517 +640 -6.438690 3.000000 2.879141 2.708212 2.875264 2.624484 3.831074 +641 -1.588172 3.000000 2.901382 2.720467 2.877988 2.618938 3.850043 +642 -1.583372 3.000000 2.901382 2.720467 2.959294 2.749752 3.968964 +643 1.600844 3.000000 2.901382 2.720467 3.238340 2.743285 3.979167 +644 2.060660 3.000000 2.901382 2.720467 3.238340 2.743285 3.981488 +645 -2.295968 3.000000 3.210046 2.913512 3.539941 2.848598 3.997507 +646 -0.178108 3.000000 3.011935 2.913512 3.231812 2.758265 3.981881 +647 -1.014658 3.000000 3.011935 2.918731 3.231812 2.758265 3.982202 +648 0.607130 3.000000 2.949265 2.888707 2.875264 2.743285 3.953410 +649 -2.506250 3.000000 3.011935 2.695662 3.059425 2.718478 3.958630 +650 -1.403625 3.000000 3.011935 2.598099 3.053427 2.689642 3.910942 +651 -8.028533 3.000000 2.924752 2.541330 2.762414 2.538213 3.861135 +652 -4.946371 3.000000 2.714866 2.377379 2.676878 2.365749 3.809720 +653 -2.455768 3.000000 2.919289 2.541330 3.033267 2.475046 3.847652 +654 -2.849491 3.000000 2.720328 2.377379 3.033267 2.492932 3.838198 +655 3.219823 3.000000 2.919289 2.598099 3.193748 2.528325 3.872865 +656 0.954373 3.000000 2.567376 2.499020 3.149137 2.249963 3.853050 +657 -18.565652 3.000000 2.919289 2.598099 3.193748 2.492932 3.884630 +658 -2.035554 3.000000 2.919289 2.598099 3.193748 2.365749 3.887860 +659 -1.485858 3.000000 2.755101 2.598099 3.189256 2.446993 3.885785 +660 1.641346 3.000000 2.697527 2.695662 2.976980 2.446993 3.914385 +661 2.337248 3.000000 2.565077 2.596583 2.905234 2.207343 3.819874 +662 5.797985 3.000000 2.542671 2.626607 2.351580 2.365749 3.868440 +663 1.092394 3.000000 2.542671 2.725686 2.434436 2.446993 3.907315 +664 2.363627 3.000000 2.567210 2.735403 2.722161 2.725088 3.975097 +665 -3.046177 3.000000 2.581780 2.735403 2.722161 2.957221 4.026025 +666 -1.901898 3.000000 2.513546 2.636324 2.708998 2.781497 4.025248 +667 1.654455 3.000000 2.536907 3.044049 2.943128 2.781497 4.051945 +668 -1.034876 3.000000 2.536907 3.044049 2.947405 2.781497 4.051962 +669 1.469234 3.000000 2.924490 3.044049 3.033051 2.697463 4.063035 +670 1.062924 3.000000 2.502937 2.735639 2.561448 2.539779 4.049163 +671 -1.018342 3.000000 2.502937 3.044049 2.577433 2.659349 4.082257 +672 0.692775 3.000000 2.100257 2.735639 2.411250 2.452413 3.885650 +673 2.370975 3.000000 1.939318 2.401326 2.241089 2.339270 3.814896 +674 0.680703 3.000000 1.939318 2.401326 2.241089 2.339270 3.813503 +675 2.353799 3.000000 1.939318 2.401326 2.241089 2.372086 3.867918 +676 0.622243 3.000000 1.928424 2.401326 2.046340 2.313725 3.851750 +677 -4.024787 3.000000 1.928424 2.401326 2.101096 2.339270 3.849786 +678 1.398995 3.000000 1.928424 2.401326 2.101096 2.195268 2.459831 +679 -0.459292 3.000000 1.928424 2.401326 2.101096 2.313725 2.489612 +680 2.204468 3.000000 1.884733 2.444471 2.101096 2.350454 2.523394 +681 1.206986 3.000000 1.895627 2.487499 2.334113 2.436448 2.548028 +682 3.452934 3.000000 2.256842 2.456728 2.411250 2.496133 2.577908 +683 -4.155428 3.000000 2.256842 2.456728 2.334113 2.429935 2.466030 +684 4.569687 3.000000 2.446058 2.456728 2.577433 2.470298 2.472619 +685 4.303976 3.000000 2.589427 2.456728 2.577433 2.489142 2.477002 +686 1.475320 3.000000 2.589427 2.456728 2.577433 2.508606 2.523933 +687 2.642578 3.000000 2.589427 2.456728 2.627244 2.509973 2.546866 +688 -1.018165 3.000000 2.536907 3.012314 2.815284 2.761247 2.753353 +689 1.832124 3.000000 2.536645 3.012314 2.705022 2.664034 2.747922 +690 0.728376 3.000000 2.518746 3.012314 2.752862 2.888544 2.743551 +691 -3.682597 3.000000 2.592674 3.448745 3.003536 2.999890 2.797642 +692 0.075563 3.000000 2.592674 3.448745 2.983071 2.897447 2.794217 +693 1.913475 3.000000 2.703985 3.448745 3.003536 2.919299 2.793748 +694 -2.373089 3.000000 2.776077 3.393343 2.928443 2.993320 2.774841 +695 -4.928370 3.000000 3.267123 3.393343 3.040472 2.999890 2.772328 +696 2.279204 3.000000 3.228184 3.177630 3.059849 2.999890 2.752379 +697 0.481364 3.000000 3.360464 3.258577 2.985805 3.060622 2.788998 +698 -1.784352 3.000000 3.288980 3.393343 3.118642 3.130957 4.154187 +699 -3.019125 3.000000 3.580452 3.474290 3.248101 3.292068 4.253630 +700 3.809892 3.000000 3.651936 3.474290 3.118954 3.292068 4.253050 +701 3.068653 3.000000 3.651936 3.529691 3.209772 3.299164 4.271650 +702 -2.482284 3.000000 3.651936 3.529691 3.220083 3.316380 4.276435 +703 2.882974 3.000000 3.360464 3.258577 3.187937 3.230511 4.247706 +704 -0.921465 3.000000 3.228184 3.177630 3.115824 3.140602 4.195075 +705 2.572128 3.000000 3.168368 3.117324 2.948163 3.038754 4.137857 +706 -4.217676 3.000000 3.201911 3.179300 2.982675 2.909659 4.105819 +707 -2.768101 3.000000 3.239852 3.198271 2.985805 3.059858 4.146381 +708 -6.526300 3.000000 3.235694 3.179300 3.003536 2.931256 4.139220 +709 -0.304908 3.000000 3.201911 3.179300 2.916958 2.909659 4.137100 +710 -0.782297 3.000000 2.811942 2.586985 2.692556 2.842997 4.127723 +711 -3.562248 3.000000 3.106499 2.959216 2.911837 2.909659 4.134044 +712 0.547164 3.000000 3.018246 2.889990 2.732246 2.846009 4.096676 +713 -0.585658 3.000000 3.156699 3.110074 2.804846 2.919359 4.113546 +714 -1.328922 3.000000 2.811942 2.889990 2.692556 2.846009 4.110689 +715 -0.353123 3.000000 3.018246 2.889990 2.732246 2.882257 4.097908 +716 -1.559586 3.000000 2.761742 2.513794 2.589684 2.717177 4.027700 +717 -3.243840 3.000000 2.761742 2.513794 2.589684 2.702338 4.023627 +718 19.863106 3.000000 2.876634 2.571240 2.655020 2.770927 4.030568 +719 -5.720992 3.000000 3.018246 2.947436 2.804846 2.900036 4.135098 +720 -0.241575 3.000000 3.039515 2.733878 2.830864 2.878981 4.123004 +721 3.389403 3.000000 2.855365 2.571240 2.649434 2.801957 4.085030 +722 1.806533 3.000000 2.876634 2.889990 2.732246 2.801957 4.080391 +723 -1.126151 3.000000 2.855365 2.571240 2.649434 2.818511 4.093769 +724 0.648574 3.000000 2.855365 2.571240 2.649434 2.781123 4.076470 +725 1.007511 3.000000 2.948174 2.947436 2.725765 2.834541 4.100098 +726 -2.869856 3.000000 2.876634 2.889990 2.741013 2.804224 4.078977 +727 3.897635 3.000000 2.876634 2.889990 2.741013 2.721434 4.052790 +728 -2.388899 3.000000 2.876634 2.889990 2.741013 2.801957 4.074435 +729 -0.338777 3.000000 2.876634 2.889990 2.741013 2.770927 4.007605 +730 -1.186396 3.000000 2.969444 2.947436 2.772607 2.818511 4.021189 +731 1.509644 3.000000 2.948174 2.947436 2.649434 2.801957 4.019758 +732 0.144474 3.000000 2.815216 2.571240 2.568901 2.702338 3.980612 +733 2.271196 3.000000 2.908025 2.617644 2.683003 2.906037 4.058393 +734 -1.881418 3.000000 2.868645 2.617644 2.683003 2.906037 4.056808 +735 0.835095 3.000000 2.804062 2.617644 2.780351 2.861612 4.052573 +736 -1.116284 3.000000 2.704250 2.733878 2.795581 2.994796 4.079903 +737 1.968463 3.000000 2.762149 3.110074 2.859741 3.085075 4.137025 +738 1.587137 3.000000 2.762149 3.110074 2.859741 3.074505 4.123536 +739 -6.121077 3.000000 3.183628 3.101207 2.859741 3.028435 2.780199 +740 2.251272 3.000000 3.036529 2.993840 2.795581 2.881229 2.650197 +741 1.379585 3.000000 3.101112 2.993840 2.827970 2.919359 2.652425 +742 -2.964491 3.000000 2.908025 2.947436 2.813371 2.846009 2.592848 +743 3.107060 3.000000 2.861358 2.947436 2.813371 2.846009 2.589043 +744 1.649736 3.000000 2.821978 2.947436 2.780351 2.821071 2.586465 +745 -2.974466 3.000000 2.821978 2.947436 2.702828 2.836899 2.582718 +746 -0.764166 3.000000 2.821978 2.947436 2.479890 2.871637 2.574512 +747 -2.980226 3.000000 2.821978 2.947436 2.702828 2.882671 2.681601 +748 -3.878759 3.000000 2.861358 2.997357 2.702828 2.861612 2.642274 +749 -4.517339 3.000000 2.821978 3.054803 2.827970 2.919359 2.700840 +750 2.007515 3.000000 2.726325 3.077874 3.097630 3.100053 2.857255 +751 -0.311697 3.000000 2.811999 3.101207 3.138391 3.100053 2.886718 +752 -0.285136 3.000000 2.953741 3.337480 3.175423 3.116427 2.906802 +753 5.105813 3.000000 3.256769 3.337480 3.175423 3.133703 2.907982 +754 0.311570 3.000000 3.333779 3.101207 3.224720 3.144749 2.881762 +755 1.158871 3.000000 3.341190 3.420526 3.314432 3.183738 2.961575 +756 3.311317 3.000000 3.399089 3.656798 3.379695 3.191304 2.981240 +757 -4.429894 3.000000 3.476099 3.685748 3.388083 3.183738 3.013271 +758 -2.533736 3.000000 3.495910 3.685748 3.364041 3.191304 2.990726 +759 -5.088047 3.000000 3.495910 3.685748 3.224720 3.144749 2.984364 +760 -1.381488 3.000000 3.399089 3.366429 3.114643 3.039905 2.840284 +761 -0.940713 3.000000 3.300724 3.101207 2.975714 2.940805 2.813460 +762 -1.445287 3.000000 3.294399 3.101207 3.045089 2.912642 2.800264 +763 1.618259 3.000000 2.901700 2.294340 2.972874 2.857299 2.777626 +764 -0.189142 3.000000 2.908025 3.077874 3.019963 2.857299 2.802392 +765 0.140214 3.000000 2.861358 2.737330 2.942170 2.742694 2.784559 +766 0.110850 3.000000 2.173943 1.930462 2.893244 2.586012 2.758536 +767 -5.766043 3.000000 2.324243 2.022140 2.838440 2.629138 2.770795 +768 -3.955276 3.000000 2.181923 2.223713 2.841829 2.648474 2.856138 +769 3.382713 3.000000 2.212545 2.068202 2.822768 2.564291 2.801673 +770 5.451579 3.000000 2.191354 2.191689 2.795581 2.480934 2.726770 +771 2.406461 3.000000 2.212545 2.068202 2.832027 2.564291 2.850405 +772 2.524557 3.000000 2.256079 2.362386 2.896445 2.758102 3.117517 +773 -0.949033 3.000000 2.350666 2.517897 2.972874 2.876728 3.146689 +774 -1.171706 3.000000 2.350666 2.517897 2.902398 2.771888 3.063528 +775 -4.974113 3.000000 2.823257 2.565191 3.152246 2.876728 3.138506 +776 2.072820 3.000000 3.268027 3.245806 3.230040 3.024616 3.150593 +777 2.493424 3.000000 3.048219 2.951622 3.183387 2.924566 3.103674 +778 -0.307431 3.000000 3.223594 2.565191 3.186841 2.986586 3.137744 +779 1.156092 3.000000 2.823257 2.560679 3.193314 2.940556 3.146619 +780 -0.365228 3.000000 2.307132 2.509924 3.068760 2.846933 3.038874 +781 -0.945390 3.000000 2.531999 2.405167 2.992629 2.859828 3.040044 +782 -0.603722 3.000000 2.513581 2.405167 2.943193 2.824677 3.036075 +783 1.031379 3.000000 2.571849 2.408696 2.996484 2.921351 3.101589 +784 -4.584915 3.000000 2.702371 2.573764 2.953074 3.032406 3.125446 +785 0.280422 3.000000 2.702371 2.573764 2.972874 3.107682 3.128952 +786 0.250098 3.000000 2.994607 2.652496 3.207917 3.273325 3.193153 +787 1.282542 3.000000 2.994607 2.652496 3.221877 3.273325 3.193948 +788 4.863871 3.000000 2.775968 2.551893 3.170940 3.253183 3.086084 +789 1.203662 3.000000 2.775968 2.551893 3.170940 3.277231 3.383899 +790 2.015108 3.000000 2.479282 2.487428 2.953074 3.231410 3.353705 +791 -5.617834 3.000000 2.657413 2.573764 2.953074 3.253183 3.332458 +792 8.003587 3.000000 2.657413 2.573764 2.965529 3.333674 3.375635 +793 -2.644323 3.000000 2.702371 2.509924 3.068760 3.355007 3.409329 +794 2.300254 3.000000 2.702371 2.509924 3.068760 3.400091 3.407694 +795 -4.399941 3.000000 2.657413 2.509924 2.965529 3.352244 3.404238 +796 -2.363424 3.000000 2.437263 2.405996 2.890444 3.264131 3.320509 +797 -1.313021 3.000000 2.994607 2.678521 2.965529 3.349792 3.369088 +798 4.915234 3.000000 2.571849 2.467142 2.937447 3.258930 3.350963 +799 2.880904 3.000000 2.994607 3.178020 2.989573 3.350737 3.372162 +800 -0.322732 3.000000 2.994607 3.178020 2.989573 3.355007 3.375897 +801 1.848021 3.000000 2.994607 3.178020 3.054059 3.407512 3.376424 +802 0.926972 3.000000 2.994607 3.178020 3.054059 3.404221 3.377329 +803 4.743483 3.000000 3.323497 3.242613 3.125989 3.432812 3.438656 +804 -2.359116 3.000000 3.323497 3.242613 3.125989 3.432812 3.436363 +805 -0.745278 3.000000 3.193255 3.178020 3.125989 3.407512 3.370436 +806 4.402179 3.000000 3.368456 3.242613 3.414675 3.586689 3.480014 +807 -0.128392 3.000000 3.263202 3.242613 3.414675 3.586689 3.480188 +808 4.079384 3.000000 3.313663 3.245806 3.625801 3.608663 3.499044 +809 -9.297312 3.000000 3.441995 3.330174 3.584094 3.576037 3.452184 +810 0.955193 3.000000 3.332951 3.330174 3.679062 3.576037 3.456104 +811 -4.169035 3.000000 2.995781 3.123477 3.749098 3.515430 3.445217 +812 4.280045 3.000000 3.194716 3.121944 3.749098 3.508401 3.428276 +813 -3.615090 3.000000 2.857547 2.915246 3.674526 3.316028 3.162917 +814 -0.716937 3.000000 3.052247 3.062177 3.305526 3.316775 3.163299 +815 1.065912 3.000000 2.643256 2.912053 3.268416 3.264792 3.134189 +816 2.522087 3.000000 2.479103 2.847461 3.018496 3.129667 3.075868 +817 -3.722015 3.000000 2.643256 2.847461 3.181533 3.307408 3.227247 +818 0.807026 3.000000 3.052247 2.997584 3.268416 3.330214 3.287613 +819 -2.271982 3.000000 3.052247 2.997584 3.268416 3.451125 4.168753 +820 1.569190 3.000000 3.052247 2.997584 3.416289 3.512087 4.196434 +821 -0.489519 3.000000 3.332951 3.054158 3.737556 3.630207 4.272992 +822 -1.052418 3.000000 2.995781 2.997584 3.729138 3.517509 4.267200 +823 -4.049410 3.000000 2.995781 2.997584 3.674526 3.451125 4.265009 +824 0.624813 3.000000 2.995781 2.997584 3.449086 3.433325 4.230699 +825 -1.873395 3.000000 3.052247 2.994337 3.245795 3.350737 4.215219 +826 -5.440599 3.000000 3.263273 3.103771 3.268416 3.586689 4.224431 +827 0.327601 3.000000 2.963026 2.994337 3.169845 3.410289 4.169533 +828 -2.737561 3.000000 3.263273 3.103771 3.526914 3.527665 4.191745 +829 -3.818614 3.000000 2.964529 2.994337 3.169845 3.351781 4.141487 +830 -2.267602 3.000000 2.964529 2.994337 2.916132 3.316032 3.939834 +831 -2.251232 3.000000 3.332951 2.997584 3.138594 3.316775 3.964966 +832 4.348987 3.000000 3.264776 3.103771 3.120870 3.307408 3.923187 +833 -1.092680 3.000000 3.264776 3.103771 3.120870 3.258930 3.892682 +834 1.771703 3.000000 3.263273 3.202874 3.169845 3.325399 4.162102 +835 -0.787716 3.000000 3.263273 3.215009 3.241395 3.367788 4.184917 +836 -1.548491 3.000000 3.263273 3.215009 3.241395 3.422484 4.186276 +837 -6.920749 3.000000 3.263273 3.215009 3.295995 3.603606 4.247523 +838 3.608718 3.000000 3.339778 3.681870 3.568225 3.724733 4.255643 +839 16.767200 3.000000 3.339778 3.681870 3.568225 3.724733 4.255948 +840 4.164433 3.000000 3.339778 3.401780 3.506953 3.612689 4.235673 +841 5.098976 3.000000 3.339778 3.401780 3.295995 3.517509 4.234960 +842 -1.132046 3.000000 3.358650 3.681870 3.465326 3.672786 4.284294 +843 -0.429341 3.000000 3.545664 3.694005 3.580101 3.826235 4.387368 +844 3.318777 3.000000 3.358650 3.681870 3.526914 3.777243 4.333033 +845 -0.346047 3.000000 3.545664 3.843156 3.580101 3.817264 4.358146 +846 1.919328 3.000000 3.694106 3.843156 3.834766 3.862258 4.341850 +847 0.992457 3.000000 3.823383 3.322214 3.955246 3.767985 4.229888 +848 2.715543 3.000000 3.226797 3.322214 3.955246 3.789384 4.233095 +849 -0.430354 3.000000 3.226797 3.322214 3.966313 3.847345 4.422802 +850 -4.579176 5.000000 3.542740 3.299395 3.998499 3.928876 4.501671 +851 -3.004309 5.000000 3.056060 3.270213 3.711497 3.847345 4.476080 +852 2.069386 5.000000 3.149793 3.196283 3.711497 4.017648 4.740379 +853 2.933114 5.000000 3.149793 3.196283 3.711497 4.017648 4.735483 +854 10.294773 5.000000 3.435550 3.259076 4.048533 4.038927 4.735075 +855 -2.598693 5.000000 3.746049 3.262695 4.447061 4.285211 4.888453 +856 1.332669 5.000000 3.732592 3.262695 4.313934 4.333337 4.878284 +857 5.407839 5.000000 3.241649 3.154884 4.277709 4.233788 4.863772 +858 5.090794 5.000000 3.241649 3.154884 4.277709 4.235181 4.927157 +859 1.001533 5.000000 3.195159 3.088472 4.116225 4.235181 4.922075 +860 -0.647163 5.000000 3.195159 3.088472 4.116225 4.227250 4.435368 +861 -0.107056 5.000000 3.208617 3.047762 4.249352 4.333337 4.455799 +862 -3.642306 5.000000 3.208617 3.047762 4.263725 4.442465 4.498559 +863 -5.673594 5.000000 3.449007 3.047762 4.447061 4.636900 4.700873 +864 -0.792598 5.000000 3.435550 3.047762 4.313934 4.608596 4.708123 +865 3.519129 5.000000 3.732592 3.196283 4.558236 4.675652 4.736074 +866 1.441713 5.000000 4.289433 4.535141 4.879622 4.814103 4.793635 +867 0.929235 5.000000 4.302890 4.535141 4.879622 4.814103 4.790707 +868 -0.328249 5.000000 4.583239 4.535141 4.926736 4.893770 4.819760 +869 -8.070508 5.000000 5.148255 4.813561 5.016210 5.088720 4.868617 +870 7.887639 5.000000 5.255445 4.813561 5.033105 5.040657 4.883139 +871 -0.219072 5.000000 5.255445 4.813561 5.033105 5.040657 4.875855 +872 11.649209 5.000000 4.476050 4.772432 4.922872 4.893770 4.837691 +873 4.020583 5.000000 4.583239 4.772432 4.879622 4.936753 4.843386 +874 3.894712 5.000000 4.583239 4.772432 4.879622 4.865796 4.833743 +875 -6.315154 5.000000 4.396623 4.694384 4.859083 4.736603 4.619699 +876 1.980309 5.000000 4.240527 3.569635 4.751241 4.675652 4.597745 +877 3.156636 5.000000 4.240527 3.569635 4.751241 4.606157 4.597084 +878 -8.291929 5.000000 3.953270 3.426007 4.514987 4.466974 4.538681 +879 -0.340037 5.000000 3.953270 3.426007 4.514987 4.528842 4.560734 +880 8.919116 5.000000 4.332040 4.550756 4.859083 4.777980 4.640380 +881 -3.063581 5.000000 4.488136 4.936506 4.887829 4.961961 4.919543 +882 6.662776 5.000000 4.583239 5.080135 4.918285 4.995592 4.958527 +883 -7.948970 5.000000 4.428344 4.772432 4.998998 5.121459 5.362227 +884 2.985318 5.000000 4.241728 3.647683 4.891199 4.969578 5.263995 +885 4.967178 5.000000 3.658555 3.647683 4.769389 4.954401 5.258546 +886 -3.934817 5.000000 3.823438 3.740991 4.786110 4.970073 5.276477 +887 0.867510 5.000000 4.223627 3.976936 4.923732 5.136797 5.357228 +888 -2.543210 5.000000 4.843741 5.061755 5.100099 5.287745 5.388664 +889 5.551567 5.000000 4.843741 5.061755 5.310979 5.402935 5.403018 +890 3.595675 5.000000 4.806010 4.514671 4.818862 5.058228 5.199951 +891 -4.314848 5.000000 4.806010 4.514671 5.074988 5.121459 5.309229 +892 -0.016654 5.000000 4.806010 4.514671 5.074988 5.141809 5.307494 +893 -0.875097 5.000000 4.624252 4.278726 4.877776 4.961961 5.068873 +894 1.490265 5.000000 4.900235 4.732501 5.310979 5.141809 5.275762 +895 3.789427 5.000000 5.223289 5.061755 5.574519 5.478655 5.578500 +896 -1.025945 5.000000 4.805729 4.514671 5.310979 5.196787 5.454534 +897 1.033710 5.000000 4.805729 4.514671 5.310979 5.287745 5.458927 +898 1.490075 5.000000 4.843741 4.824727 5.585001 5.600300 5.687619 +899 5.923518 5.000000 4.843459 4.889699 5.585001 5.562792 5.670075 +900 -4.800176 5.000000 4.843459 4.889699 5.549839 5.600300 5.660922 +901 -9.946581 5.000000 4.806010 4.733989 5.265883 5.366831 5.550287 +902 4.338869 5.000000 4.624534 4.286992 4.635090 5.175071 5.513526 +903 14.262665 5.000000 4.624252 4.423933 4.641008 4.941615 5.493358 +904 -0.462271 5.000000 4.624252 4.423933 4.641008 4.940752 5.412793 +905 2.062066 5.000000 4.129121 4.423933 4.852603 4.941615 5.427730 +906 4.757129 5.000000 4.085632 4.016632 4.519414 4.874650 5.400482 +907 7.036645 5.000000 4.141334 4.111298 4.462945 4.822055 5.346344 +908 -2.489345 5.000000 4.223346 4.152445 4.641008 4.941615 5.375744 +909 -1.751339 5.000000 4.045482 3.976936 4.635090 4.917066 5.341423 +910 2.028441 5.000000 4.045482 3.976936 4.635090 5.070249 5.384630 +911 10.782682 5.000000 4.141053 3.976936 4.641008 5.070249 5.395836 +912 0.020329 5.000000 3.975680 3.905617 4.608938 4.868846 5.303650 +913 -1.628935 5.000000 3.975680 3.905617 4.595912 4.874650 5.302531 +914 -8.782086 5.000000 4.045482 4.215673 4.253523 5.070249 5.337491 +915 12.760311 5.000000 4.045482 4.215673 4.253523 5.070249 5.337227 +916 1.908713 5.000000 4.057973 4.215673 4.608938 4.907286 5.342695 +917 2.806770 5.000000 4.045482 4.106074 4.177078 4.894889 5.318387 +918 11.605220 5.000000 4.208290 4.106074 4.253523 4.941615 5.323241 +919 11.260197 5.000000 4.223068 4.215673 4.966874 5.196787 5.391405 +920 0.913256 5.000000 4.045482 3.905617 4.861485 4.940752 5.364741 +921 2.049888 5.000000 4.045482 3.905617 4.861485 4.926536 5.358075 +922 -0.929736 5.000000 4.045482 3.905617 4.861485 4.860429 5.082622 +923 -2.193199 5.000000 3.975680 3.864470 4.462945 4.647129 5.083263 +924 -5.899560 5.000000 3.863491 3.784069 3.949733 4.366170 4.697244 +925 -1.262703 5.000000 4.024294 4.030897 4.098989 4.510821 4.767767 +926 1.610233 5.000000 4.196631 4.111298 4.627504 4.685223 4.785785 +927 4.283363 5.000000 4.195058 4.302385 4.587521 4.661326 4.839312 +928 5.403657 5.000000 4.027551 4.238315 4.088715 4.438356 4.760266 +929 4.088473 5.000000 4.027551 4.238315 4.088715 4.438915 4.772583 +930 7.576778 5.000000 3.866747 3.966827 3.939460 4.365322 4.746189 +931 -0.781889 5.000000 3.866747 3.966827 3.939460 4.359429 4.747410 +932 1.601807 5.000000 3.738607 3.596756 3.939460 4.131427 4.523862 +933 0.101579 5.000000 3.863491 3.966827 4.083307 4.250072 4.540969 +934 7.050916 5.000000 3.735350 3.719998 4.083307 4.182880 4.522551 +935 1.569018 5.000000 3.704658 3.610399 3.503161 3.900190 4.215072 +936 -0.002263 5.000000 3.482203 3.240329 3.431770 3.593768 3.831949 +937 2.324108 5.000000 3.089134 3.240329 3.245351 3.544593 3.835892 +938 4.174902 5.000000 3.089134 3.240329 3.452905 3.560577 3.839468 +939 -3.202602 5.000000 3.226081 3.022695 3.450227 3.448255 3.511829 +940 0.428766 5.000000 3.197676 2.689056 3.164886 3.306090 3.170430 +941 -4.588781 5.000000 2.870346 2.796455 3.164886 3.430238 3.186843 +942 -3.443394 5.000000 3.096802 2.909683 3.164886 3.430238 3.192906 +943 -0.047314 5.000000 3.887330 3.492061 3.707641 3.522594 3.320903 +944 1.566821 5.000000 3.412475 3.376922 3.707641 3.672888 3.532972 +945 -3.858219 5.000000 3.412475 3.376922 3.707641 3.526577 3.414776 +946 4.399602 5.000000 3.412475 3.376922 3.707641 3.522594 3.403349 +947 -3.800820 5.000000 4.031281 3.993973 3.839183 3.844337 3.721307 +948 1.884652 5.000000 3.568748 3.526735 3.815276 3.801018 3.677873 +949 -3.046701 5.000000 3.479915 3.413507 3.245329 3.657918 3.613366 +950 0.894097 5.000000 3.479915 3.413507 3.245329 3.665471 3.617136 +951 2.364784 5.000000 3.347108 3.383354 3.013588 3.395144 3.427585 +952 3.589254 5.000000 3.347108 3.383354 3.013588 3.381011 3.426777 +953 4.228067 5.000000 3.347108 3.383354 3.013588 3.360118 3.421810 +954 -0.228697 5.000000 3.479915 3.724471 3.127481 3.451760 3.453902 +955 1.153853 5.000000 3.509390 3.502082 3.127481 3.381011 3.404449 +956 0.107194 5.000000 3.735846 3.827852 3.348653 3.672888 3.731989 +957 0.167111 5.000000 4.162151 3.858005 3.815276 3.982862 4.007414 +958 3.147823 5.000000 4.162151 3.858005 3.815276 3.886087 3.999301 +959 -2.239973 5.000000 3.573565 3.502082 3.460174 3.665471 3.953648 +960 -3.261503 5.000000 3.568748 3.754624 3.821580 3.902935 4.049106 +961 -1.407582 5.000000 4.250984 3.867852 4.042150 4.038791 4.093972 +962 2.517527 5.000000 4.250984 3.867852 4.042150 4.123780 4.145083 +963 -5.388479 5.000000 3.995440 3.993973 4.161425 4.081666 4.120984 +964 8.801876 5.000000 3.995847 3.993973 4.233123 4.035219 4.121813 +965 -2.700134 5.000000 4.133449 4.335091 4.466806 4.410819 4.298934 +966 -0.337379 5.000000 4.133449 4.335091 4.466806 4.410819 4.290690 +967 -8.787952 5.000000 4.419210 3.971233 4.344644 4.396896 4.290204 +968 -0.320155 5.000000 4.250984 3.867852 4.249740 4.175697 4.251973 +969 -1.975703 5.000000 4.250984 3.867852 4.249740 4.142849 4.250381 +970 4.231599 5.000000 3.568748 3.526735 4.144564 4.069873 4.221413 +971 0.454910 5.000000 4.250984 3.993973 4.344644 4.265449 4.256900 +972 -0.658922 5.000000 4.250984 3.993973 4.344644 4.274367 4.253187 +973 0.996911 5.000000 3.660233 3.616893 4.144564 4.264021 4.242248 +974 -2.839593 5.000000 3.573565 3.396556 4.138318 4.081666 4.206367 +975 -6.154551 5.000000 3.749066 3.616893 4.387216 4.118500 4.233324 +976 9.689669 5.000000 4.250984 4.084132 4.402248 4.301085 4.264703 +977 9.319547 5.000000 4.133449 4.084132 4.402248 4.289885 4.269196 +978 1.588541 5.000000 4.175757 4.335091 4.757726 4.419468 4.383903 +979 1.449763 5.000000 4.207153 3.971233 5.021169 4.806105 4.759353 +980 6.745770 5.000000 4.508943 4.183849 4.910948 4.805979 4.808167 +981 4.226361 5.000000 4.177951 4.188394 4.799851 4.807988 4.843379 +982 -6.052798 5.000000 4.473302 4.348665 4.760599 4.809336 4.903000 +983 3.242879 5.000000 4.677676 4.508936 5.072554 4.977193 4.952553 +984 1.423245 5.000000 4.473302 4.436964 4.760599 4.843016 4.939043 +985 -7.291660 5.000000 4.177951 4.078226 4.665393 4.777649 4.776579 +986 -3.511600 5.000000 4.187240 4.230841 4.710933 4.587962 4.827588 +987 -3.767617 5.000000 4.242607 4.508936 4.894074 4.810059 4.902228 +988 -1.558932 5.000000 4.015952 4.248744 4.710933 4.510046 4.720420 +989 1.708610 5.000000 4.155905 4.342892 4.391040 4.757592 4.797493 +990 -0.844955 5.000000 3.863556 4.437040 4.177548 4.527021 4.861991 +991 3.858505 5.000000 3.610522 4.508936 4.311348 4.738681 4.889573 +992 2.016079 5.000000 3.863556 4.639039 4.731916 4.713819 4.978938 +993 -2.361595 5.000000 4.116591 4.769141 4.321601 4.782224 5.071283 +994 2.220296 5.000000 4.288644 4.899244 5.313357 4.885008 5.168955 +995 3.272895 5.000000 3.910838 5.029346 5.035401 4.802522 5.239045 +996 3.672797 5.000000 3.759372 4.464084 4.177548 4.671521 5.174955 +997 1.606136 5.000000 3.607907 4.591971 3.446223 4.604706 4.900145 +998 -6.014203 5.000000 3.486680 4.604460 3.002670 4.187014 4.576577 +999 -12.099984 5.000000 3.571207 5.007095 3.459641 4.455075 4.669759 diff -Nru gsl-2.4+dfsg/doc/examples/movstat3.c gsl-2.5+dfsg/doc/examples/movstat3.c --- gsl-2.4+dfsg/doc/examples/movstat3.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat3.c 2018-05-23 14:44:07.000000000 +0000 @@ -0,0 +1,65 @@ +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +double +func(const size_t n, double x[], void * params) +{ + const double alpha = *(double *) params; + + gsl_sort(x, 1, n); + + return gsl_stats_trmean_from_sorted_data(alpha, x, 1, n); +} + +int +main(void) +{ + const size_t N = 1000; /* length of time series */ + const size_t K = 11; /* window size */ + double alpha = 0.1; /* trimmed mean parameter */ + gsl_vector *x = gsl_vector_alloc(N); /* input vector */ + gsl_vector *y = gsl_vector_alloc(N); /* filtered output vector for alpha1 */ + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + gsl_movstat_workspace *w = gsl_movstat_alloc(K); + gsl_movstat_function F; + size_t i; + double sum = 0.0; + + /* generate input signal */ + for (i = 0; i < N; ++i) + { + double ui = gsl_ran_gaussian(r, 1.0); + double outlier = (gsl_rng_uniform(r) < 0.01) ? 10.0*GSL_SIGN(ui) : 0.0; + sum += ui; + gsl_vector_set(x, i, sum + outlier); + } + + /* apply moving window function */ + F.function = func; + F.params = α + gsl_movstat_apply(GSL_MOVSTAT_END_PADVALUE, &F, x, y, w); + + /* print results */ + for (i = 0; i < N; ++i) + { + double xi = gsl_vector_get(x, i); + double yi = gsl_vector_get(y, i); + + printf("%f %f\n", xi, yi); + } + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_rng_free(r); + gsl_movstat_free(w); + + return 0; +} diff -Nru gsl-2.4+dfsg/doc/examples/movstat3.txt gsl-2.5+dfsg/doc/examples/movstat3.txt --- gsl-2.4+dfsg/doc/examples/movstat3.txt 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/movstat3.txt 2018-05-23 14:44:13.000000000 +0000 @@ -0,0 +1,1000 @@ +0.133919 0.276114 +0.728047 0.094351 +2.402456 -0.079084 +1.115486 -0.254480 +-0.162016 -0.440587 +-1.501952 -0.659391 +-1.541044 -0.724272 +-1.426997 -0.926058 +-1.444645 -1.274116 +-2.017030 -1.539856 +-1.835321 -1.865572 +-0.450003 -2.101777 +-1.088034 -2.365805 +-2.553682 -2.660233 +-3.381444 -2.763080 +-3.627798 -2.818354 +-3.917291 -2.762394 +-4.141471 -2.818432 +-4.076856 -2.963609 +-2.370265 -2.908849 +-2.514497 -2.681098 +-1.331678 -2.386039 +-1.592375 -2.147711 +-2.638269 -1.760234 +-2.060850 -1.611102 +-0.972274 -1.573009 +-0.257272 -1.586761 +-1.772335 -1.778994 +-0.589564 -1.943796 +-1.296081 -2.034095 +-2.027427 -2.143194 +-3.061772 -2.403673 +-3.964778 -2.778696 +-3.075592 -3.148963 +-3.450958 -3.576487 +-3.042740 -3.921212 +-3.316585 -4.038872 +-5.644687 -4.180794 +-5.104731 -4.241522 +-5.143800 -4.461146 +-5.129949 -4.693582 +-4.101686 -4.894492 +-4.339064 -5.014553 +-4.511335 -4.898206 +-5.052207 -4.946890 +-5.542885 -4.849052 +-5.124773 -4.734800 +-5.182236 -4.817522 +-4.495760 -4.955404 +-5.580003 -5.029333 +-4.263255 -5.043533 +-4.042668 -4.876842 +-4.846184 -4.682876 +-16.672890 -4.452275 +-5.176692 -4.353543 +-5.180009 -4.083774 +-3.379074 -4.110754 +-3.106832 -4.230454 +-2.439358 -4.368534 +-3.607167 -4.368534 +-3.152086 -4.521254 +-4.506071 -4.763144 +-5.119970 -5.284490 +-6.088904 -5.707670 +-6.551172 -6.067230 +-7.357022 -6.363759 +-9.026579 -6.532698 +-8.071187 -6.569975 +-6.915448 -6.569975 +-6.388126 -6.458495 +-6.275928 -6.244167 +-6.026521 -5.939830 +-5.455463 -5.317285 +-5.085584 -4.699535 +-4.622226 -4.140505 +-4.617985 -3.636438 +-2.468281 -3.200792 +-0.074973 -2.945073 +-1.355697 -2.650531 +-1.356859 -2.387378 +-1.739327 -2.229742 +-2.105708 -2.188474 +-3.153990 -2.079946 +-2.434705 -2.135417 +-2.253847 -2.188067 +-3.199265 -2.188067 +-2.827853 -2.152933 +-1.491530 -2.011698 +-1.854937 -1.872420 +-1.830705 -1.666873 +-1.423125 -1.561829 +-0.498595 -1.329370 +-0.834586 -1.234596 +-1.900494 -1.163814 +-0.584780 -1.124394 +-1.308451 -1.033325 +-0.735721 -1.086366 +-1.047530 -1.179030 +-0.854495 -1.151274 +-1.500155 -1.003416 +-1.011085 -0.992844 +-1.923564 -0.839102 +-1.418754 -0.760946 +0.075220 -0.858283 +-0.569776 -0.822780 +-0.489626 -0.730427 +1.024053 -0.519072 +-0.032311 -0.281189 +-2.448040 -0.183587 +-0.534972 -0.250557 +-0.668978 -0.184302 +0.891108 -0.019278 +0.217385 -0.019278 +-0.540338 0.136607 +-0.527505 0.398954 +0.026518 0.667121 +0.995594 0.881047 +1.370647 0.886958 +1.692149 1.094108 +2.104650 1.386569 +1.878530 1.709333 +1.384998 1.892281 +0.944305 2.079669 +2.081734 2.039445 +3.029960 2.043475 +2.931387 2.045954 +2.590838 1.942151 +2.682091 1.795818 +1.008630 1.902657 +1.728415 1.796009 +2.126962 1.593796 +0.067998 1.557750 +-0.153388 1.567889 +1.905858 1.579792 +1.121899 1.742647 +1.111473 1.923433 +2.357674 2.007114 +3.566190 2.298741 +2.789218 2.298741 +2.474325 2.181783 +3.355488 2.143542 +2.880096 1.893674 +2.692635 1.341903 +0.777733 0.467928 +0.853238 -0.531346 +-1.137343 -1.509975 +-2.608262 -2.615379 +-4.510291 -3.622099 +-6.204247 -4.457685 +-6.333333 -5.169875 +-7.068545 -5.560910 +-7.668243 -5.702448 +-6.367839 -5.702448 +-6.667043 -5.574312 +-5.631973 -5.228527 +-4.656653 -4.787531 +-3.882104 -4.170070 +-3.357076 -3.737308 +-2.364371 -3.368439 +-3.092173 -3.293700 +-1.421071 -3.293700 +-1.511396 -3.311642 +-2.772185 -3.292273 +-3.048023 -3.343195 +-4.959319 -3.468265 +-5.147475 -3.696632 +-4.818134 -4.067665 +-3.707785 -4.282892 +-3.815373 -4.658277 +-3.489995 -4.986622 +-14.137555 -5.168666 +-4.850700 -5.467116 +-4.709223 -5.764967 +-6.426491 -6.255301 +-6.445101 -6.697600 +-6.597715 -6.743059 +-7.833527 -6.405990 +-7.498788 -6.390270 +-8.120790 -6.419580 +-7.796062 -6.227665 +-5.118359 -5.935204 +-5.087165 -5.566212 +-4.699255 -4.989928 +-4.973012 -4.198352 +-3.276785 -3.332919 +-3.812951 -2.800117 +-2.646972 -2.164659 +-0.374605 -1.531116 +0.728869 -0.956661 +-0.007167 -0.443480 +-0.323144 -0.038358 +0.631962 0.294326 +0.805680 0.446891 +0.470841 0.580569 +1.851719 0.463679 +0.369312 0.367770 +0.347183 0.245605 +0.998487 0.004824 +0.879957 -0.345305 +-0.870347 -0.724208 +-1.535071 -1.126683 +-1.422628 -1.397563 +-2.345476 -1.535638 +-3.268049 -1.549930 +-2.939290 -1.549930 +-2.623782 -1.367927 +-2.068610 -1.229655 +-0.895495 -1.009122 +0.751328 -0.892555 +1.370399 -0.814393 +0.767679 -0.625650 +-0.290622 -0.494743 +0.562173 -0.409490 +-1.296378 -0.379490 +-2.235833 -0.436661 +-0.925094 -0.436661 +-1.057666 -0.368594 +-1.301337 -0.249569 +-0.625496 -0.256137 +0.236789 -0.043494 +1.380286 -0.005302 +2.200370 0.119508 +0.780601 0.473288 +0.503061 0.824175 +0.617412 1.149937 +-0.957608 1.097715 +0.198188 0.978840 +2.126361 0.668191 +2.306367 0.568356 +2.418842 0.559828 +-0.233213 0.662040 +0.310416 0.903472 +-0.595473 1.150177 +-0.117919 1.154459 +0.426310 1.166957 +1.537325 1.251130 +1.577413 1.673063 +2.418531 2.035137 +2.164905 2.495042 +3.176398 2.996303 +3.564192 3.307124 +3.569078 3.441012 +4.021223 3.729076 +4.937664 3.737704 +5.063676 3.737704 +4.334714 3.662610 +2.782406 3.520994 +4.757479 3.376185 +2.496185 3.172954 +2.289650 2.929144 +2.500548 2.662689 +2.192145 2.410526 +2.265799 2.223440 +2.065253 2.031805 +2.743371 1.988461 +2.359380 2.038874 +1.098633 2.147821 +1.018649 2.373600 +0.890033 2.344726 +2.106088 2.486624 +3.481068 2.451364 +4.455412 2.492713 +4.224157 2.514389 +2.005936 2.528190 +3.342334 2.702030 +2.426032 2.607253 +2.731514 2.347452 +1.293718 2.002939 +1.142861 1.860413 +2.707418 1.772126 +1.253101 1.605617 +1.123533 1.452373 +1.046841 1.282323 +2.059603 1.296704 +1.211356 1.355768 +1.232930 1.342415 +0.334857 1.432026 +1.176966 1.649897 +1.423148 1.883110 +1.674430 1.750355 +1.939429 1.652967 +3.084372 1.764195 +3.824729 1.880205 +3.145757 1.751891 +0.864810 1.504703 +0.022136 1.087030 +2.233989 0.617025 +1.378946 0.014404 +-0.801544 -0.645980 +-2.084624 -1.219898 +-2.931275 -1.648804 +-2.290618 -2.160401 +-2.339220 -2.748269 +-2.797697 -2.967014 +-2.995338 -3.074094 +-4.718787 -3.237433 +-4.582241 -3.255361 +-3.911864 -3.449319 +-2.770250 -3.665823 +-3.048347 -4.016577 +-3.760666 -4.215820 +-3.092624 -4.180587 +-4.084845 -4.184625 +-5.954484 -4.216224 +-6.125231 -4.558100 +-4.788526 -4.876615 +-4.401684 -5.102787 +-4.618585 -5.276667 +-4.196258 -5.484099 +-6.490801 -5.366824 +-5.959260 -5.231394 +-5.796213 -5.262655 +-5.649763 -5.297966 +-6.063147 -5.337600 +-4.899009 -5.337600 +-4.906356 -5.015635 +-5.069874 -4.773469 +-4.719483 -4.611112 +-4.975295 -4.356689 +-3.165467 -4.243553 +-2.122030 -4.088041 +-3.779758 -3.778672 +-4.335005 -3.422414 +-3.359953 -2.962839 +-4.051653 -2.503991 +-3.499400 -2.110569 +-1.768976 -1.856123 +-0.583313 -1.296298 +-0.205369 -0.551465 +1.258660 0.153358 +0.375332 0.951803 +0.167986 1.498429 +2.651846 1.854770 +2.983459 2.307823 +3.686605 2.847855 +3.872109 3.270235 +3.150657 3.753820 +2.623749 3.926418 +5.060077 3.959535 +5.028278 4.042577 +5.385131 4.010247 +4.727598 4.026122 +4.177130 4.157845 +2.949897 4.428426 +3.730838 4.331465 +3.395642 4.232930 +4.014982 4.102061 +4.336160 4.063339 +14.445049 3.963551 +4.187429 3.963551 +4.141458 3.846512 +4.207309 3.896382 +4.379100 3.981778 +3.279038 4.093871 +2.500615 4.043623 +2.677489 4.136268 +3.844475 4.041694 +4.783544 3.937749 +5.345002 3.958893 +4.892768 4.188156 +5.021231 4.188156 +3.290288 4.183904 +3.271809 4.080649 +4.569393 3.959153 +5.342405 3.635378 +2.428432 3.380067 +2.639222 3.169031 +2.915180 3.189182 +3.690080 3.148649 +2.243538 2.918077 +2.594966 2.883370 +3.121907 2.905447 +3.471647 2.917209 +2.907017 2.842582 +2.494242 2.816174 +3.377719 2.952630 +2.627120 3.106247 +2.745080 3.370139 +1.852410 3.803776 +3.233974 4.159524 +3.977520 4.630545 +5.496934 4.892680 +7.446486 5.182818 +7.374375 5.574907 +6.108751 5.907768 +6.733428 6.042828 +5.736936 6.042828 +5.238363 5.917991 +6.273881 5.568648 +6.229725 5.457463 +5.193058 5.369225 +4.230282 5.306466 +4.373406 5.276384 +3.832263 5.186485 +5.732769 5.019144 +5.314607 4.886219 +5.709051 4.735020 +5.466199 4.619246 +4.429272 4.379860 +4.723655 4.190661 +4.536445 3.866406 +3.188313 3.757388 +2.218931 3.584984 +2.129475 3.515467 +1.539656 3.532947 +2.790758 3.428320 +4.333442 3.433891 +3.914564 3.489302 +4.098004 3.413827 +4.586587 3.313635 +3.644949 3.330042 +4.771233 3.205714 +3.687012 2.811615 +1.227743 2.346717 +0.786559 1.901713 +1.687320 1.412067 +1.671802 1.197804 +-0.569571 1.029859 +-0.269522 1.029859 +0.092968 1.076871 +0.179777 1.235446 +1.716580 1.308903 +2.175507 1.654404 +2.348435 2.221910 +1.650850 2.778105 +2.213728 3.300214 +4.781311 3.693093 +5.733539 4.139422 +4.838032 4.582910 +5.098723 4.935721 +4.878764 5.378375 +5.186761 5.580279 +6.166901 5.837445 +6.598444 5.949744 +5.523733 6.154560 +6.197611 6.130120 +7.152529 6.091799 +7.297293 5.977655 +6.744233 5.680667 +6.722108 5.310106 +4.533874 5.038540 +3.494007 4.649108 +4.159463 4.064695 +3.263396 3.562179 +3.079638 3.044929 +2.692724 2.747451 +1.892810 2.673207 +1.531368 2.683990 +2.221595 2.683990 +2.066853 2.671774 +1.856572 2.850674 +3.491266 3.106013 +3.591053 3.495401 +4.990771 3.895905 +3.153458 4.349845 +4.689737 4.986161 +15.151312 5.695400 +5.397308 6.169750 +5.461107 6.816431 +6.307054 7.336014 +7.793692 8.005214 +9.536615 8.674770 +7.760413 8.570693 +9.411183 9.211590 +9.667019 9.610048 +10.712534 9.884032 +11.423310 10.287323 +10.486624 10.542182 +11.229177 10.542182 +9.893180 10.832814 +10.226261 10.986157 +11.830355 10.970554 +12.026865 10.791473 +1.368634 10.584169 +12.161129 10.330018 +11.047111 9.967920 +10.572104 9.596900 +9.811583 9.254963 +8.620890 8.703151 +8.941815 8.703151 +6.634300 8.163708 +6.887081 7.648865 +8.752915 7.259827 +7.060557 6.899902 +6.192129 6.503761 +5.702488 6.089465 +5.938511 5.886787 +6.310247 5.707606 +5.055626 5.707606 +5.024249 5.820582 +4.801423 6.126663 +4.810198 6.748219 +5.274448 7.465742 +8.077345 8.218041 +8.946852 9.130143 +11.296500 10.061539 +12.396212 11.007249 +13.662685 11.762515 +13.080936 12.082755 +13.264548 12.259513 +13.406808 12.417945 +13.321589 12.499758 +12.071844 12.478642 +10.959503 12.449476 +10.537680 12.373121 +11.963564 12.283837 +12.032818 12.283837 +12.206172 12.338501 +13.144310 12.556976 +12.393740 12.846651 +12.460995 12.895600 +13.813560 12.968901 +14.703027 13.088905 +14.038123 13.345492 +13.566579 13.459792 +12.404107 13.637417 +12.692529 13.868581 +13.286200 14.009671 +15.083374 13.754236 +14.173008 13.553576 +14.002737 13.433272 +14.541464 13.623240 +15.283670 13.911145 +12.232182 14.278759 +11.550045 14.347277 +12.483844 14.612271 +14.113823 14.917345 +16.594728 15.219404 +16.748404 15.492773 +15.700035 16.200592 +16.557958 16.809489 +17.259995 17.361566 +17.743988 17.810772 +18.602550 18.116371 +19.082509 18.343020 +17.963922 18.561371 +19.742891 18.751905 +19.799196 18.849442 +19.345119 18.951484 +18.788247 19.084445 +18.523113 19.199834 +18.974808 19.395473 +18.621820 19.341310 +18.882299 19.203810 +20.121015 19.314867 +20.613373 19.517659 +20.283860 19.778352 +19.255429 19.996782 +18.561693 20.414756 +20.344629 20.765631 +31.163423 20.945174 +20.907931 21.040145 +20.940683 21.000200 +22.383586 21.066678 +22.040169 21.183857 +21.736907 21.341382 +21.468111 21.247194 +19.924352 21.337880 +19.853733 21.260994 +20.908350 21.207140 +21.762346 21.046100 +21.535902 20.836858 +21.724105 20.639416 +20.248708 20.609855 +21.555482 20.662446 +20.312980 20.585076 +19.691132 20.411603 +19.048752 20.324885 +19.658303 20.214718 +20.327055 20.359313 +20.212015 20.359313 +20.162847 20.446608 +20.755442 20.496955 +20.563977 20.648004 +21.550063 20.802227 +21.680123 20.952568 +21.098637 21.043073 +20.144252 21.041007 +21.017747 20.896710 +21.532259 20.877548 +21.768581 20.750405 +21.026562 20.455798 +19.456772 20.225577 +19.028660 20.090430 +20.391514 19.858231 +20.405780 19.603884 +19.026646 19.272662 +17.798299 19.006554 +18.927929 18.890089 +18.927955 18.817008 +19.243142 18.568386 +18.045560 18.407848 +18.010806 18.087005 +18.408590 17.875317 +18.370932 17.398744 +18.153916 16.926182 +16.139053 16.529478 +14.251999 16.173437 +15.893116 15.932280 +14.638765 15.527111 +14.674898 15.314334 +14.838256 15.238972 +14.841187 15.130969 +15.840401 15.130969 +14.724406 15.169392 +16.238921 15.384195 +15.560663 15.451067 +15.167031 15.444467 +14.572601 15.414625 +16.606267 15.174551 +16.571990 14.872965 +15.276747 14.534815 +14.778862 14.376012 +13.679742 14.339034 +12.010130 14.342701 +11.720424 14.170691 +13.195570 14.170691 +14.131435 14.197012 +14.834232 14.289849 +14.605601 14.554631 +15.023902 15.026966 +15.614401 15.405463 +15.513630 15.740504 +16.261146 15.992090 +16.062781 16.326591 +16.602039 16.659408 +17.146807 17.047677 +17.844746 17.505449 +16.869870 17.954477 +18.019254 18.379803 +19.008050 18.626657 +20.104029 18.822851 +19.734352 19.031663 +20.198570 19.095527 +20.089083 19.095527 +18.823720 19.086822 +18.635620 18.729780 +19.026116 18.192142 +18.419522 17.696225 +17.940904 17.237216 +15.794674 16.811277 +15.265283 16.401231 +14.737492 15.974504 +15.271107 15.594275 +15.957994 15.238340 +15.192671 15.038790 +15.133302 14.805401 +14.795082 14.333479 +14.997459 13.737002 +14.162042 12.990280 +13.694167 12.265989 +11.017989 11.583642 +9.369199 10.761789 +8.550610 9.909570 +7.600779 9.072657 +8.674054 8.348520 +8.992178 8.008302 +-2.196372 8.008302 +7.125110 8.066022 +6.629824 8.255156 +7.176939 8.524547 +7.956022 8.604244 +9.888684 8.709871 +10.252815 9.039653 +11.040690 9.368819 +10.025298 9.731593 +9.391332 9.970087 +9.942817 10.074760 +9.597858 10.202760 +10.087603 10.299527 +10.441911 10.333963 +10.102464 10.568398 +10.333389 10.724307 +11.123714 10.893701 +11.350615 11.029997 +12.135215 11.246289 +12.342629 11.457480 +11.001033 11.692816 +11.467365 11.827952 +11.314267 12.103361 +12.049090 12.368902 +12.451419 12.706672 +13.602397 13.076037 +12.217254 13.619828 +13.740483 14.184318 +15.175142 14.714318 +15.666915 15.116218 +16.547774 15.494898 +16.208386 15.816562 +16.819094 16.034990 +17.061886 16.034990 +15.834354 15.995894 +15.859541 15.919986 +16.497367 15.680116 +15.706337 15.441801 +14.063547 15.201073 +14.823281 15.109746 +14.983736 15.000151 +14.388952 14.994534 +13.382577 14.960406 +14.652541 14.971811 +15.675425 15.070675 +14.847997 14.982601 +15.808988 14.804694 +15.501833 14.523164 +16.359209 14.342161 +14.953317 13.991077 +14.030617 13.414669 +11.855184 12.909932 +11.753548 12.296993 +11.492782 11.668963 +10.305366 11.088800 +10.487754 10.553397 +10.292535 10.553397 +9.849561 10.139567 +9.731853 9.705256 +9.211991 9.416505 +8.130711 9.326598 +19.751746 9.174716 +7.844749 9.068547 +7.764224 9.048912 +8.894025 8.936065 +9.496203 9.025337 +9.120819 9.146274 +9.337011 9.045249 +9.672848 9.141471 +8.716229 9.197384 +10.015441 9.238283 +9.219141 9.295977 +9.106215 9.326113 +8.710750 9.363158 +9.213964 9.321544 +9.262122 9.459126 +10.019188 9.459543 +9.392049 9.403055 +9.670414 9.412763 +9.298319 9.517506 +9.954473 9.456542 +10.483519 9.505303 +8.443160 9.531046 +9.193584 9.516307 +9.653446 9.442335 +8.665282 9.347318 +9.700969 9.131405 +10.250881 8.738901 +9.259392 8.454298 +9.004671 8.074770 +8.011262 7.633586 +6.718342 7.491302 +5.212562 7.245482 +5.881734 7.091647 +5.777835 7.088755 +5.682790 6.924685 +7.384727 6.774260 +7.488584 6.606951 +7.874875 6.579047 +8.978647 6.425623 +7.502016 6.248903 +6.657437 6.089150 +4.961421 5.733288 +4.500925 5.371078 +4.187354 4.970054 +3.705592 4.548229 +4.245012 4.068918 +4.181964 3.756847 +4.228702 3.697853 +4.265653 3.697853 +2.343638 3.762828 +1.025213 3.939685 +2.152784 4.013210 +3.969977 3.909514 +4.772131 3.877396 +5.613650 3.933521 +5.297305 4.191817 +4.906737 4.514138 +3.248699 4.701163 +3.939639 4.773031 +4.770780 4.733412 +4.668303 4.673639 +5.053668 4.473087 +4.931925 4.297284 +4.616795 4.314971 +4.415554 4.303389 +4.759347 4.334821 +3.231042 4.422419 +3.324516 4.511779 +3.407882 4.481232 +3.835396 4.693767 +5.456687 4.919085 +5.857908 5.191399 +6.529610 5.460178 +4.656999 5.632159 +7.324861 5.708009 +6.443420 5.890055 +7.210172 6.074507 +5.743525 6.202426 +4.955717 6.290787 +4.518043 6.620585 +6.156455 6.688287 +7.116756 6.942237 +7.009178 7.083388 +7.625185 7.502479 +7.934176 8.052414 +9.515337 8.473689 +8.728965 8.602206 +8.480539 8.754147 +9.947932 8.754147 +9.905135 8.853707 +11.264929 8.785042 +8.165825 8.516065 +8.484223 8.372016 +7.094545 8.348980 +8.521226 8.030012 +7.316196 7.740725 +7.077217 7.575316 +7.432522 7.453257 +8.273217 7.277689 +7.032545 7.217552 +7.301554 7.025442 +6.544227 6.813840 +7.067290 6.605650 +6.904117 6.311738 +6.553311 5.843008 +5.203508 5.392034 +5.411779 4.847942 +4.787313 4.220538 +2.973780 3.469160 +3.082981 2.834456 +2.170460 2.286119 +0.897589 1.826542 +0.141722 1.384034 +-0.608689 1.073545 +0.840973 0.675493 +0.476747 0.343727 +1.067315 0.343727 +0.804743 0.373082 +0.288579 0.675273 +-2.018337 1.018915 +-0.815431 1.185582 +9.773635 1.515636 +1.161779 1.767255 +2.861438 2.119135 +2.484089 2.565124 +2.340976 3.234356 +3.447235 3.667960 +3.331886 3.550261 +3.971662 3.684321 +4.302480 3.806538 +5.207661 4.035863 +5.064210 4.244282 +4.148375 4.537615 +3.547513 4.849420 +3.961390 5.142232 +4.548013 5.490327 +6.606968 5.850974 +6.087229 6.235436 +6.353763 6.719278 +7.435331 7.142955 +8.453489 7.375373 +8.653796 7.419154 +8.524364 7.483388 +8.502952 7.607795 +7.774491 7.738685 +6.639772 7.756273 +6.481253 7.537135 +7.185079 7.429656 +7.473421 7.319686 +7.659268 7.319686 +7.593618 7.549529 +5.979517 7.994797 +7.557045 8.403891 +7.513230 8.778790 +9.843072 9.191797 +10.647189 9.399890 +11.426131 9.607721 +10.163100 10.022686 +10.559162 10.364704 +11.190489 10.582708 +9.532104 10.642140 +9.464096 10.678567 +11.247919 10.738748 +10.635203 10.851903 +11.967758 10.940330 +10.377964 10.902093 +10.975028 11.171490 +11.968463 11.348212 +11.181500 11.410981 +11.355002 11.541459 +10.846360 11.504429 +11.956673 11.625116 +12.675808 11.814092 +11.812839 11.871511 +11.809508 12.039170 +11.634489 12.187723 +11.932542 12.338334 +12.690427 12.478111 +12.485238 12.362409 +12.691980 12.393551 +12.989995 12.656350 +14.174699 13.013985 +13.214663 13.348775 +11.225347 13.634907 +12.093121 14.049552 +14.945654 14.542276 +14.853200 14.962969 +15.265613 15.297104 +16.217039 15.787072 +17.624368 16.592109 +17.126499 17.054724 +16.776231 17.311909 +17.181919 17.764898 +19.338456 18.164381 +19.342522 18.544146 +19.016734 18.892047 +17.260317 19.553161 +19.812379 20.458343 +20.194122 21.375109 +20.755476 22.085863 +23.076520 22.747427 +25.328559 23.314089 +25.511210 23.764285 +25.921188 24.207849 +25.735241 24.684226 +25.296601 25.000300 +24.116689 25.251350 +23.864148 25.430543 +24.186195 25.740438 +25.042868 26.022156 +26.123599 26.342755 +26.941294 26.714350 +28.456649 27.373732 +28.300271 28.060209 +28.620633 28.651549 +28.640949 29.174406 +30.051132 29.628013 +30.364935 29.940152 +30.364483 30.132942 +30.829304 30.230992 +31.664285 30.325733 +31.023764 30.360552 +31.109518 30.298606 +30.191761 30.248642 +29.503083 30.114266 +29.493620 29.970124 +29.806984 29.739660 +29.035340 29.526075 +29.915261 29.457487 +29.155097 29.457487 +29.532027 29.545179 +28.922687 29.722798 +29.101506 29.870680 +29.574463 30.124860 +30.292314 30.283653 +31.137927 30.530622 +31.092188 30.755885 +31.322958 30.956505 +31.344397 31.073295 +31.377819 31.166269 +32.007384 31.166269 +31.559389 31.241139 +30.907089 31.261088 +30.625572 31.247899 +31.129078 31.104230 +30.051382 30.889657 +31.811757 30.619755 +31.271730 30.428024 +31.204254 30.318880 +29.446664 30.226373 +29.382633 30.100075 +28.987492 30.030418 +29.833812 29.776614 +29.924794 29.657419 +29.793010 29.657419 +29.992392 29.940612 +29.424473 30.266221 +28.193563 30.667952 +30.131497 31.125553 +31.995406 31.532457 +32.313114 32.026068 +32.603067 32.529153 +33.952221 32.933304 +34.797493 33.180860 +33.586933 33.180860 +34.235509 33.137591 +34.520158 33.062347 +33.061826 32.936109 +32.359506 32.745710 +31.605983 32.537009 +31.294197 32.379519 +31.635919 32.199305 +31.466928 32.199305 +32.238629 32.222231 +32.641844 32.404811 +32.169525 32.573158 +32.613585 32.573158 +33.268164 32.469291 +34.002723 32.384200 +34.323950 32.213365 +33.121110 31.997729 +30.701113 31.834572 diff -Nru gsl-2.4+dfsg/doc/examples/nlfit.c gsl-2.5+dfsg/doc/examples/nlfit.c --- gsl-2.4+dfsg/doc/examples/nlfit.c 2017-04-04 19:17:36.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/nlfit.c 2018-01-11 16:46:21.000000000 +0000 @@ -7,11 +7,12 @@ #include #include -/* number of data points to fit */ -#define N 40 +#define N 100 /* number of data points to fit */ +#define TMAX (40.0) /* time variable in [0,TMAX] */ struct data { size_t n; + double * t; double * y; }; @@ -20,6 +21,7 @@ gsl_vector * f) { size_t n = ((struct data *)data)->n; + double *t = ((struct data *)data)->t; double *y = ((struct data *)data)->y; double A = gsl_vector_get (x, 0); @@ -30,9 +32,8 @@ for (i = 0; i < n; i++) { - /* Model Yi = A * exp(-lambda * i) + b */ - double t = i; - double Yi = A * exp (-lambda * t) + b; + /* Model Yi = A * exp(-lambda * t_i) + b */ + double Yi = A * exp (-lambda * t[i]) + b; gsl_vector_set (f, i, Yi - y[i]); } @@ -44,6 +45,7 @@ gsl_matrix * J) { size_t n = ((struct data *)data)->n; + double *t = ((struct data *)data)->t; double A = gsl_vector_get (x, 0); double lambda = gsl_vector_get (x, 1); @@ -54,14 +56,14 @@ { /* Jacobian matrix J(i,j) = dfi / dxj, */ /* where fi = (Yi - yi)/sigma[i], */ - /* Yi = A * exp(-lambda * i) + b */ + /* Yi = A * exp(-lambda * t_i) + b */ /* and the xj are the parameters (A,lambda,b) */ - double t = i; - double e = exp(-lambda * t); + double e = exp(-lambda * t[i]); gsl_matrix_set (J, i, 0, e); - gsl_matrix_set (J, i, 1, -t * A * e); + gsl_matrix_set (J, i, 1, -t[i] * A * e); gsl_matrix_set (J, i, 2, 1.0); } + return GSL_SUCCESS; } @@ -99,8 +101,8 @@ gsl_vector *f; gsl_matrix *J; gsl_matrix *covar = gsl_matrix_alloc (p, p); - double y[N], weights[N]; - struct data d = { n, y }; + double t[N], y[N], weights[N]; + struct data d = { n, t, y }; double x_init[3] = { 1.0, 1.0, 0.0 }; /* starting values */ gsl_vector_view x = gsl_vector_view_array (x_init, p); gsl_vector_view wts = gsl_vector_view_array(weights, n); @@ -127,14 +129,15 @@ /* this is the data to be fitted */ for (i = 0; i < n; i++) { - double t = i; - double yi = 1.0 + 5 * exp (-0.1 * t); + double ti = i * TMAX / (n - 1.0); + double yi = 1.0 + 5 * exp (-0.1 * ti); double si = 0.1 * yi; double dy = gsl_ran_gaussian(r, si); - weights[i] = 1.0 / (si * si); + t[i] = ti; y[i] = yi + dy; - printf ("data: %zu %g %g\n", i, y[i], si); + weights[i] = 1.0 / (si * si); + printf ("data: %g %g %g\n", ti, y[i], si); }; /* allocate workspace with default parameters */ @@ -147,8 +150,8 @@ f = gsl_multifit_nlinear_residual(w); gsl_blas_ddot(f, f, &chisq0); - /* solve the system with a maximum of 20 iterations */ - status = gsl_multifit_nlinear_driver(20, xtol, gtol, ftol, + /* solve the system with a maximum of 100 iterations */ + status = gsl_multifit_nlinear_driver(100, xtol, gtol, ftol, callback, NULL, &info, w); /* compute covariance of best fit parameters */ diff -Nru gsl-2.4+dfsg/doc/examples/nlfit.txt gsl-2.5+dfsg/doc/examples/nlfit.txt --- gsl-2.4+dfsg/doc/examples/nlfit.txt 2017-04-04 19:17:36.000000000 +0000 +++ gsl-2.5+dfsg/doc/examples/nlfit.txt 2018-01-11 16:48:28.000000000 +0000 @@ -1,40 +1,100 @@ data: 0 6.08035 0.6 -data: 1 5.47552 0.552419 -data: 2 5.94654 0.509365 -data: 3 5.0492 0.470409 -data: 4 4.78568 0.43516 -data: 5 3.51748 0.403265 -data: 6 2.84671 0.374406 -data: 7 3.24634 0.348293 -data: 8 3.23395 0.324664 -data: 9 3.30385 0.303285 -data: 10 2.83439 0.28394 -data: 11 2.31891 0.266436 -data: 12 2.33858 0.250597 -data: 13 2.40559 0.236266 -data: 14 2.41856 0.223298 -data: 15 1.99966 0.211565 -data: 16 1.88127 0.200948 -data: 17 1.91477 0.191342 -data: 18 1.70415 0.182649 -data: 19 1.60316 0.174784 -data: 20 1.77937 0.167668 -data: 21 1.55302 0.161228 -data: 22 1.50903 0.155402 -data: 23 1.36364 0.150129 -data: 24 1.36873 0.145359 -data: 25 1.41954 0.141042 -data: 26 1.37778 0.137137 -data: 27 1.23573 0.133603 -data: 28 1.28524 0.130405 -data: 29 1.46327 0.127512 -data: 30 1.22315 0.124894 -data: 31 1.1933 0.122525 -data: 32 1.18717 0.120381 -data: 33 0.883172 0.118442 -data: 34 1.23424 0.116687 -data: 35 1.14683 0.115099 -data: 36 1.11091 0.113662 -data: 37 1.20396 0.112362 -data: 38 1.28722 0.111185 -data: 39 1.05801 0.110121 +data: 0.40404 5.75089 0.580201 +data: 0.808081 6.55151 0.561185 +data: 1.21212 5.82754 0.542923 +data: 1.61616 5.77792 0.525384 +data: 2.0202 4.43573 0.508539 +data: 2.42424 3.74357 0.492362 +data: 2.82828 4.44435 0.476825 +data: 3.23232 4.60097 0.461903 +data: 3.63636 4.87565 0.447572 +data: 4.0404 4.33043 0.433809 +data: 4.44444 3.66058 0.42059 +data: 4.84848 3.80649 0.407895 +data: 5.25253 4.02893 0.395703 +data: 5.65657 4.15905 0.383994 +data: 6.06061 3.52312 0.372748 +data: 6.46465 3.38854 0.361947 +data: 6.86869 3.51824 0.351575 +data: 7.27273 3.18729 0.341613 +data: 7.67677 3.0456 0.332045 +data: 8.08081 3.42631 0.322856 +data: 8.48485 3.02488 0.314032 +data: 8.88889 2.9671 0.305556 +data: 9.29293 2.70147 0.297416 +data: 9.69697 2.72692 0.289599 +data: 10.101 2.83914 0.282091 +data: 10.5051 2.76165 0.274881 +data: 10.9091 2.47839 0.267955 +data: 11.3131 2.57536 0.261305 +data: 11.7172 2.92532 0.254917 +data: 12.1212 2.43646 0.248783 +data: 12.5253 2.36559 0.242891 +data: 12.9293 2.33954 0.237233 +data: 13.3333 1.72843 0.231799 +data: 13.7374 2.39663 0.22658 +data: 14.1414 2.20767 0.221567 +data: 14.5455 2.11851 0.216753 +data: 14.9495 2.27297 0.21213 +data: 15.3535 2.40448 0.20769 +data: 15.7576 1.95446 0.203425 +data: 16.1616 2.22906 0.19933 +data: 16.5657 2.30433 0.195397 +data: 16.9697 1.77605 0.191619 +data: 17.3737 1.76151 0.187991 +data: 17.7778 2.22712 0.184507 +data: 18.1818 1.64801 0.18116 +data: 18.5859 2.0883 0.177946 +data: 18.9899 1.99045 0.17486 +data: 19.3939 1.65443 0.171896 +data: 19.798 1.63904 0.169049 +data: 20.202 1.87163 0.166314 +data: 20.6061 1.59206 0.163688 +data: 21.0101 1.6042 0.161166 +data: 21.4141 1.71428 0.158744 +data: 21.8182 1.64864 0.156418 +data: 22.2222 1.55508 0.154184 +data: 22.6263 1.72644 0.152038 +data: 23.0303 1.50185 0.149978 +data: 23.4343 1.59119 0.147999 +data: 23.8384 1.23089 0.146098 +data: 24.2424 1.40848 0.144273 +data: 24.6465 1.47315 0.142519 +data: 25.0505 1.39715 0.140836 +data: 25.4545 1.31689 0.139219 +data: 25.8586 1.18662 0.137666 +data: 26.2626 1.59549 0.136174 +data: 26.6667 1.40375 0.134742 +data: 27.0707 1.53704 0.133366 +data: 27.4747 1.41109 0.132045 +data: 27.8788 1.23079 0.130776 +data: 28.2828 1.46617 0.129557 +data: 28.6869 1.17692 0.128387 +data: 29.0909 1.37112 0.127263 +data: 29.4949 1.16044 0.126183 +data: 29.899 1.24077 0.125146 +data: 30.303 1.42726 0.12415 +data: 30.7071 1.28094 0.123194 +data: 31.1111 1.63097 0.122276 +data: 31.5152 1.43256 0.121394 +data: 31.9192 1.41718 0.120546 +data: 32.3232 1.27725 0.119733 +data: 32.7273 1.0646 0.118951 +data: 33.1313 1.22094 0.118201 +data: 33.5354 1.22827 0.11748 +data: 33.9394 0.893778 0.116788 +data: 34.3434 1.08994 0.116123 +data: 34.7475 0.905193 0.115485 +data: 35.1515 1.03369 0.114872 +data: 35.5556 1.09 0.114283 +data: 35.9596 1.0442 0.113717 +data: 36.3636 1.15261 0.113174 +data: 36.7677 1.08203 0.112652 +data: 37.1717 0.93427 0.112151 +data: 37.5758 1.01116 0.11167 +data: 37.9798 1.11248 0.111208 +data: 38.3838 1.23566 0.110764 +data: 38.7879 1.31053 0.110338 +data: 39.1919 1.11162 0.109929 +data: 39.596 1.1152 0.109535 +data: 40 1.23112 0.109158 Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/filt_edge.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/filt_edge.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/fit-exp.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/fit-exp.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/gaussfilt2.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/gaussfilt2.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/gaussfilt.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/gaussfilt.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/histogram2d.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/histogram2d.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/impulse.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/impulse.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/movstat1.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/movstat1.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/movstat2.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/movstat2.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/movstat3.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/movstat3.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/nlfit2.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/nlfit2.png differ Binary files /tmp/tmpNrhwUE/U81CNntIUi/gsl-2.4+dfsg/doc/images/rand-binomial.png and /tmp/tmpNrhwUE/eFa2nAF6Nl/gsl-2.5+dfsg/doc/images/rand-binomial.png differ diff -Nru gsl-2.4+dfsg/doc/Makefile.in gsl-2.5+dfsg/doc/Makefile.in --- gsl-2.4+dfsg/doc/Makefile.in 2017-06-19 12:55:38.000000000 +0000 +++ gsl-2.5+dfsg/doc/Makefile.in 2018-06-13 20:31:02.000000000 +0000 @@ -80,7 +80,7 @@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/mkinstalldirs TODO mdate-sh texinfo.tex + $(top_srcdir)/mkinstalldirs TODO texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -358,15 +358,23 @@ images/dwt.png \ images/fft-complex-radix2.png \ images/fft-real-mixedradix.png \ + images/filt_edge.png \ images/fit-exp.png \ images/fit-wlinear2.png \ images/fit-wlinear.png \ + images/gaussfilt.png \ + images/gaussfilt2.png \ images/histogram.png \ + images/histogram2d.png \ + images/impulse.png \ images/interp2d.png \ images/interp_compare.png \ images/interp.png \ images/interpp.png \ images/min-interval.png \ + images/movstat1.png \ + images/movstat2.png \ + images/movstat3.png \ images/multilarge.png \ images/multimin.png \ images/nlfit2b.png \ @@ -437,6 +445,7 @@ err.rst \ fdl.rst \ fft.rst \ + filter.rst \ gpl.rst \ histogram.rst \ ieee754.rst \ @@ -450,6 +459,7 @@ math.rst \ min.rst \ montecarlo.rst \ + movstat.rst \ multimin.rst \ multiroots.rst \ multiset.rst \ diff -Nru gsl-2.4+dfsg/doc/mdate-sh gsl-2.5+dfsg/doc/mdate-sh --- gsl-2.4+dfsg/doc/mdate-sh 2017-05-11 08:24:07.000000000 +0000 +++ gsl-2.5+dfsg/doc/mdate-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,224 +0,0 @@ -#!/bin/sh -# Get modification time of a file or directory and pretty-print it. - -scriptversion=2010-08-21.06; # UTC - -# Copyright (C) 1995-2013 Free Software Foundation, Inc. -# written by Ulrich Drepper , June 1995 -# -# 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, 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, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -fi - -case $1 in - '') - echo "$0: No file. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: mdate-sh [--help] [--version] FILE - -Pretty-print the modification day of FILE, in the format: -1 January 1970 - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "mdate-sh $scriptversion" - exit $? - ;; -esac - -error () -{ - echo "$0: $1" >&2 - exit 1 -} - - -# Prevent date giving response in another language. -LANG=C -export LANG -LC_ALL=C -export LC_ALL -LC_TIME=C -export LC_TIME - -# GNU ls changes its time format in response to the TIME_STYLE -# variable. Since we cannot assume 'unset' works, revert this -# variable to its documented default. -if test "${TIME_STYLE+set}" = set; then - TIME_STYLE=posix-long-iso - export TIME_STYLE -fi - -save_arg1=$1 - -# Find out how to get the extended ls output of a file or directory. -if ls -L /dev/null 1>/dev/null 2>&1; then - ls_command='ls -L -l -d' -else - ls_command='ls -l -d' -fi -# Avoid user/group names that might have spaces, when possible. -if ls -n /dev/null 1>/dev/null 2>&1; then - ls_command="$ls_command -n" -fi - -# A 'ls -l' line looks as follows on OS/2. -# drwxrwx--- 0 Aug 11 2001 foo -# This differs from Unix, which adds ownership information. -# drwxrwx--- 2 root root 4096 Aug 11 2001 foo -# -# To find the date, we split the line on spaces and iterate on words -# until we find a month. This cannot work with files whose owner is a -# user named "Jan", or "Feb", etc. However, it's unlikely that '/' -# will be owned by a user whose name is a month. So we first look at -# the extended ls output of the root directory to decide how many -# words should be skipped to get the date. - -# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. -set x`$ls_command /` - -# Find which argument is the month. -month= -command= -until test $month -do - test $# -gt 0 || error "failed parsing '$ls_command /' output" - shift - # Add another shift to the command. - command="$command shift;" - case $1 in - Jan) month=January; nummonth=1;; - Feb) month=February; nummonth=2;; - Mar) month=March; nummonth=3;; - Apr) month=April; nummonth=4;; - May) month=May; nummonth=5;; - Jun) month=June; nummonth=6;; - Jul) month=July; nummonth=7;; - Aug) month=August; nummonth=8;; - Sep) month=September; nummonth=9;; - Oct) month=October; nummonth=10;; - Nov) month=November; nummonth=11;; - Dec) month=December; nummonth=12;; - esac -done - -test -n "$month" || error "failed parsing '$ls_command /' output" - -# Get the extended ls output of the file or directory. -set dummy x`eval "$ls_command \"\\\$save_arg1\""` - -# Remove all preceding arguments -eval $command - -# Because of the dummy argument above, month is in $2. -# -# On a POSIX system, we should have -# -# $# = 5 -# $1 = file size -# $2 = month -# $3 = day -# $4 = year or time -# $5 = filename -# -# On Darwin 7.7.0 and 7.6.0, we have -# -# $# = 4 -# $1 = day -# $2 = month -# $3 = year or time -# $4 = filename - -# Get the month. -case $2 in - Jan) month=January; nummonth=1;; - Feb) month=February; nummonth=2;; - Mar) month=March; nummonth=3;; - Apr) month=April; nummonth=4;; - May) month=May; nummonth=5;; - Jun) month=June; nummonth=6;; - Jul) month=July; nummonth=7;; - Aug) month=August; nummonth=8;; - Sep) month=September; nummonth=9;; - Oct) month=October; nummonth=10;; - Nov) month=November; nummonth=11;; - Dec) month=December; nummonth=12;; -esac - -case $3 in - ???*) day=$1;; - *) day=$3; shift;; -esac - -# Here we have to deal with the problem that the ls output gives either -# the time of day or the year. -case $3 in - *:*) set `date`; eval year=\$$# - case $2 in - Jan) nummonthtod=1;; - Feb) nummonthtod=2;; - Mar) nummonthtod=3;; - Apr) nummonthtod=4;; - May) nummonthtod=5;; - Jun) nummonthtod=6;; - Jul) nummonthtod=7;; - Aug) nummonthtod=8;; - Sep) nummonthtod=9;; - Oct) nummonthtod=10;; - Nov) nummonthtod=11;; - Dec) nummonthtod=12;; - esac - # For the first six month of the year the time notation can also - # be used for files modified in the last year. - if (expr $nummonth \> $nummonthtod) > /dev/null; - then - year=`expr $year - 1` - fi;; - *) year=$3;; -esac - -# The result. -echo $day $month $year - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru gsl-2.4+dfsg/doc/TODO gsl-2.5+dfsg/doc/TODO --- gsl-2.4+dfsg/doc/TODO 2017-05-22 09:59:46.000000000 +0000 +++ gsl-2.5+dfsg/doc/TODO 2017-10-19 08:56:01.000000000 +0000 @@ -1,4 +1,2 @@ -1. fix specfunc-hyperg.rst re: math expressions for texinfo -2. in fft.rst, we reference doc/fftalgorithms.tex - make sure this file +1. in fft.rst, we reference doc/fftalgorithms.tex - make sure this file is in the right place in the final dir structure -3. Histogram2d figure - need to write gnuplot script diff -Nru gsl-2.4+dfsg/filter/gaussian.c gsl-2.5+dfsg/filter/gaussian.c --- gsl-2.4+dfsg/filter/gaussian.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/gaussian.c 2018-05-12 23:55:02.000000000 +0000 @@ -0,0 +1,344 @@ +/* filter/gaussian.c + * + * Gaussian smoothing filters + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include + +#include +#include +#include +#include + +/* maximum derivative order allowed for Gaussian filter */ +#define GSL_FILTER_GAUSSIAN_MAX_ORDER 10 + +typedef double gaussian_type_t; +typedef double ringbuf_type_t; +#include "ringbuf.c" + +typedef struct +{ + size_t n; /* window size */ + double * window; /* linear array with current window */ + ringbuf * rbuf; /* ring buffer storing current window */ +} gaussian_state_t; + +static size_t gaussian_size(const size_t n); +static int gaussian_init(const size_t n, void * vstate); +static int gaussian_insert(const gaussian_type_t x, void * vstate); +static int gaussian_delete(void * vstate); +static int gaussian_get(void * params, gaussian_type_t * result, const void * vstate); + +static const gsl_movstat_accum gaussian_accum_type; + +/* +gsl_filter_gaussian_alloc() + Allocate a workspace for Gaussian filtering. + +Inputs: K - number of samples in window; if even, it is rounded up to + the next odd, to have a symmetric window + +Return: pointer to workspace +*/ + +gsl_filter_gaussian_workspace * +gsl_filter_gaussian_alloc(const size_t K) +{ + const size_t H = K / 2; + gsl_filter_gaussian_workspace *w; + size_t state_size; + + w = calloc(1, sizeof(gsl_filter_gaussian_workspace)); + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->K = 2 * H + 1; + + w->kernel = malloc(w->K * sizeof(double)); + if (w->kernel == 0) + { + gsl_filter_gaussian_free(w); + GSL_ERROR_NULL ("failed to allocate space for kernel", GSL_ENOMEM); + return NULL; + } + + state_size = gaussian_size(w->K); + + w->movstat_workspace_p = gsl_movstat_alloc_with_size(state_size, H, H); + if (!w->movstat_workspace_p) + { + gsl_filter_gaussian_free(w); + GSL_ERROR_NULL ("failed to allocate space for movstat workspace", GSL_ENOMEM); + } + + return w; +} + +void +gsl_filter_gaussian_free(gsl_filter_gaussian_workspace * w) +{ + if (w->kernel) + free(w->kernel); + + if (w->movstat_workspace_p) + gsl_movstat_free(w->movstat_workspace_p); + + free(w); +} + +/* +gsl_filter_gaussian() + Apply a Gaussian filter to an input vector: + +G_{sigma}(x) = exp [ -x^2 / (2 sigma^2) ] + +Inputs: alpha - number of standard deviations to include in Gaussian kernel + order - derivative order of Gaussian + x - input vector, size n + y - (output) filtered vector, size n + w - workspace + +Notes: +1) If alpha = 3, then the Gaussian kernel will be a Gaussian of +/- 3 standard deviations +*/ + +int +gsl_filter_gaussian(const gsl_filter_end_t endtype, const double alpha, const size_t order, const gsl_vector * x, + gsl_vector * y, gsl_filter_gaussian_workspace * w) +{ + if (x->size != y->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else if (alpha <= 0.0) + { + GSL_ERROR("alpha must be positive", GSL_EDOM); + } + else + { + int status; + gsl_vector_view kernel = gsl_vector_view_array(w->kernel, w->K); + + /* construct Gaussian kernel of length K */ + gsl_filter_gaussian_kernel(alpha, order, 1, &kernel.vector); + + status = gsl_movstat_apply_accum(endtype, x, &gaussian_accum_type, (void *) w->kernel, y, + NULL, w->movstat_workspace_p); + + return status; + } +} + +/* +gsl_filter_gaussian_kernel() + Construct Gaussian kernel with given sigma and order + +Inputs: alpha - number of standard deviations to include in window + order - kernel order (0 = gaussian, 1 = first derivative, ...) + normalize - normalize so sum(G) = 1 + kernel - (output) Gaussian kernel + +Return: success/error + +Notes: +1) If alpha = 3, then the output kernel will contain a Gaussian with +/- 3 standard deviations +*/ + +int +gsl_filter_gaussian_kernel(const double alpha, const size_t order, const int normalize, gsl_vector * kernel) +{ + const size_t N = kernel->size; + + if (alpha <= 0.0) + { + GSL_ERROR("alpha must be positive", GSL_EDOM); + } + else if (order > GSL_FILTER_GAUSSIAN_MAX_ORDER) + { + GSL_ERROR("derivative order is too large", GSL_EDOM); + } + else + { + const double half = 0.5 * (N - 1.0); /* (N - 1) / 2 */ + double sum = 0.0; + size_t i; + + /* check for quick return */ + if (N == 1) + { + if (order == 0) + gsl_vector_set(kernel, 0, 1.0); + else + gsl_vector_set(kernel, 0, 0.0); + + return GSL_SUCCESS; + } + + for (i = 0; i < N; ++i) + { + double xi = ((double)i - half) / half; + double yi = alpha * xi; + double gi = exp(-0.5 * yi * yi); + + gsl_vector_set(kernel, i, gi); + sum += gi; + } + + /* normalize so sum(kernel) = 1 */ + if (normalize) + gsl_vector_scale(kernel, 1.0 / sum); + + if (order > 0) + { + const double beta = -0.5 * alpha * alpha; + double q[GSL_FILTER_GAUSSIAN_MAX_ORDER + 1]; + size_t k; + + /* + * Need to calculate derivatives of the Gaussian window; define + * + * w(n) = C * exp [ p(n) ] + * + * p(n) = beta * n^2 + * beta = -1/2 * ( alpha / ((N-1)/2) )^2 + * + * Then: + * + * d^k/dn^k w(n) = q_k(n) * w(n) + * + * where q_k(n) is a degree-k polynomial in n, which satisfies: + * + * q_k(n) = d/dn q_{k-1}(n) + q_{k-1}(n) * dp(n)/dn + * q_0(n) = 1 / half^{order} + */ + + /* initialize q_0(n) = 1 / half^{order} */ + q[0] = 1.0 / gsl_pow_uint(half, order); + for (i = 1; i <= GSL_FILTER_GAUSSIAN_MAX_ORDER; ++i) + q[i] = 0.0; + + /* loop through derivative orders and calculate q_k(n) for k = 1,...,order */ + for (k = 1; k <= order; ++k) + { + double qm1 = q[0]; + + q[0] = q[1]; + for (i = 1; i <= k; ++i) + { + double tmp = q[i]; + q[i] = (i + 1.0) * q[i + 1] + /* d/dn q_{k-1} */ + 2.0 * beta * qm1; /* q_{k-1}(n) p'(n) */ + qm1 = tmp; + } + } + + /* now set w(n) := q(n) * w(n) */ + for (i = 0; i < N; ++i) + { + double xi = ((double)i - half) / half; + double qn = gsl_poly_eval(q, order + 1, xi); + double *wn = gsl_vector_ptr(kernel, i); + + *wn *= qn; + } + } + + return GSL_SUCCESS; + } +} + +static size_t +gaussian_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(gaussian_state_t); + size += n * sizeof(gaussian_type_t); + size += ringbuf_size(n); + + return size; +} + +static int +gaussian_init(const size_t n, void * vstate) +{ + gaussian_state_t * state = (gaussian_state_t *) vstate; + + state->n = n; + + state->window = (gaussian_type_t *) ((unsigned char *) vstate + sizeof(gaussian_state_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->window + n * sizeof(gaussian_type_t)); + + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +gaussian_insert(const gaussian_type_t x, void * vstate) +{ + gaussian_state_t * state = (gaussian_state_t *) vstate; + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +gaussian_delete(void * vstate) +{ + gaussian_state_t * state = (gaussian_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +static int +gaussian_get(void * params, gaussian_type_t * result, const void * vstate) +{ + const gaussian_state_t * state = (const gaussian_state_t *) vstate; + const double * kernel = (const double *) params; + size_t n = ringbuf_copy(state->window, state->rbuf); + double sum = 0.0; + size_t i; + + for (i = 0; i < n; ++i) + sum += state->window[i] * kernel[n - i - 1]; + + *result = sum; + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum gaussian_accum_type = +{ + gaussian_size, + gaussian_init, + gaussian_insert, + gaussian_delete, + gaussian_get +}; diff -Nru gsl-2.4+dfsg/filter/gsl_filter.h gsl-2.5+dfsg/filter/gsl_filter.h --- gsl-2.4+dfsg/filter/gsl_filter.h 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/gsl_filter.h 2018-06-02 20:41:45.000000000 +0000 @@ -0,0 +1,109 @@ +/* filter/gsl_filter.h + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#ifndef __GSL_FILTER_H__ +#define __GSL_FILTER_H__ + +#include +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +/* end point handling methods */ +typedef enum +{ + GSL_FILTER_END_PADZERO = GSL_MOVSTAT_END_PADZERO, + GSL_FILTER_END_PADVALUE = GSL_MOVSTAT_END_PADVALUE, + GSL_FILTER_END_TRUNCATE = GSL_MOVSTAT_END_TRUNCATE +} gsl_filter_end_t; + +/* robust scale estimates */ +typedef enum +{ + GSL_FILTER_SCALE_MAD, /* median absolute deviation */ + GSL_FILTER_SCALE_IQR, /* interquartile range */ + GSL_FILTER_SCALE_SN, /* S_n scale statistic */ + GSL_FILTER_SCALE_QN /* Q_n scale statistic */ +} gsl_filter_scale_t; + +/* workspace for Gaussian filter */ +typedef struct +{ + size_t K; /* window size */ + double *kernel; /* Gaussian kernel, size K */ + gsl_movstat_workspace *movstat_workspace_p; +} gsl_filter_gaussian_workspace; + +gsl_filter_gaussian_workspace *gsl_filter_gaussian_alloc(const size_t K); +void gsl_filter_gaussian_free(gsl_filter_gaussian_workspace * w); +int gsl_filter_gaussian(const gsl_filter_end_t endtype, const double alpha, const size_t order, const gsl_vector * x, + gsl_vector * y, gsl_filter_gaussian_workspace * w); +int gsl_filter_gaussian_kernel(const double alpha, const size_t order, const int normalize, gsl_vector * kernel); + +/* workspace for standard median filter */ +typedef struct +{ + gsl_movstat_workspace *movstat_workspace_p; +} gsl_filter_median_workspace; + +gsl_filter_median_workspace *gsl_filter_median_alloc(const size_t K); +void gsl_filter_median_free(gsl_filter_median_workspace * w); +int gsl_filter_median(const gsl_filter_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_filter_median_workspace * w); + +/* workspace for recursive median filter */ +typedef struct +{ + size_t H; /* window half-length (K / 2) */ + size_t K; /* window size */ + void *state; /* workspace for min/max accumulator */ + double *window; /* array holding first window */ + const gsl_movstat_accum * minmaxacc; /* minimum/maximum accumulator */ + gsl_movstat_workspace *movstat_workspace_p; +} gsl_filter_rmedian_workspace; + +gsl_filter_rmedian_workspace *gsl_filter_rmedian_alloc(const size_t K); +void gsl_filter_rmedian_free(gsl_filter_rmedian_workspace * w); +int gsl_filter_rmedian(const gsl_filter_end_t, const gsl_vector * x, gsl_vector * y, gsl_filter_rmedian_workspace * w); +int gsl_filter_rmedian2(const gsl_vector * x, gsl_vector * y, gsl_filter_rmedian_workspace * w); + +typedef struct +{ + gsl_movstat_workspace *movstat_workspace_p; +} gsl_filter_impulse_workspace; + +gsl_filter_impulse_workspace *gsl_filter_impulse_alloc(const size_t K); +void gsl_filter_impulse_free(gsl_filter_impulse_workspace * w); +int gsl_filter_impulse(const gsl_filter_end_t endtype, const gsl_filter_scale_t scale_type, const double t, + const gsl_vector * x, gsl_vector * y, gsl_vector * xmedian, gsl_vector * xsigma, size_t * noutlier, + gsl_vector_int * ioutlier, gsl_filter_impulse_workspace * w); + +__END_DECLS + +#endif /* __GSL_FILTER_H__ */ diff -Nru gsl-2.4+dfsg/filter/impulse.c gsl-2.5+dfsg/filter/impulse.c --- gsl-2.4+dfsg/filter/impulse.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/impulse.c 2018-06-02 20:41:37.000000000 +0000 @@ -0,0 +1,283 @@ +/* filter/impulse.c + * + * Impulse detecting filters + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include + +#include +#include +#include + +static int filter_impulse(const double scale, const double epsilon, const double t, const gsl_vector * x, const gsl_vector * xmedian, + gsl_vector * y, gsl_vector * xsigma, size_t * noutlier, gsl_vector_int * ioutlier); + +/* +gsl_filter_impulse_alloc() + Allocate a workspace for impulse detection filtering. + +Inputs: K - number of samples in window; if even, it is rounded up to + the next odd, to have a symmetric window + +Return: pointer to workspace +*/ + +gsl_filter_impulse_workspace * +gsl_filter_impulse_alloc(const size_t K) +{ + gsl_filter_impulse_workspace *w; + + w = calloc(1, sizeof(gsl_filter_impulse_workspace)); + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->movstat_workspace_p = gsl_movstat_alloc(K); + if (w->movstat_workspace_p == 0) + { + gsl_filter_impulse_free(w); + return NULL; + } + + return w; +} + +void +gsl_filter_impulse_free(gsl_filter_impulse_workspace * w) +{ + if (w->movstat_workspace_p) + gsl_movstat_free(w->movstat_workspace_p); + + free(w); +} + +/* +gsl_filter_impulse() + Apply an impulse detection filter to an input vector. The filter output is + +y_i = { x_i, |x_i - m_i| <= t * S_i + { m_i, |x_i - m_i| > t * S_i + +where m_i is the median of the window W_i^H and S_i is the scale estimate (MAD, IQR, S_n, Q_n) + +Inputs: endtype - how to handle signal end points + scale_type - which statistic to use for scale estimate (MAD, IQR, etc) + t - number of standard deviations required to identity outliers (>= 0) + x - input vector, size n + y - (output) filtered vector, size n + xmedian - (output) vector of median values of x, size n + xmedian_i = median of window centered on x_i + xsigma - (output) vector of estimated local standard deviations of x, size n + xsigma_i = sigma for i-th window: scale*MAD + noutlier - (output) number of outliers detected + ioutlier - (output) boolean array indicating outliers identified, size n; may be NULL + ioutlier_i = 1 if outlier detected, 0 if not + w - workspace + +Notes: +*/ + +int +gsl_filter_impulse(const gsl_filter_end_t endtype, const gsl_filter_scale_t scale_type, const double t, + const gsl_vector * x, gsl_vector * y, gsl_vector * xmedian, gsl_vector * xsigma, size_t * noutlier, + gsl_vector_int * ioutlier, gsl_filter_impulse_workspace * w) +{ + const size_t n = x->size; + + if (n != y->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else if (xmedian->size != n) + { + GSL_ERROR("xmedian vector must match input size", GSL_EBADLEN); + } + else if (xsigma->size != n) + { + GSL_ERROR("xsigma vector must match input size", GSL_EBADLEN); + } + else if ((ioutlier != NULL) && (ioutlier->size != n)) + { + GSL_ERROR("ioutlier vector must match input size", GSL_EBADLEN); + } + else if (t < 0.0) + { + GSL_ERROR("t must be non-negative", GSL_EDOM); + } + else + { + int status; + double scale = 1.0; + + switch (scale_type) + { + case GSL_FILTER_SCALE_MAD: + { + /* compute window medians and MADs */ + gsl_movstat_mad(endtype, x, xmedian, xsigma, w->movstat_workspace_p); + + break; + } + + case GSL_FILTER_SCALE_IQR: + { + /* multiplication factor for IQR to estimate stddev for Gaussian signal */ + scale = 0.741301109252801; + + /* calculate the window medians */ + gsl_movstat_median(endtype, x, xmedian, w->movstat_workspace_p); + + /* calculate window IQRs */ + gsl_movstat_qqr(endtype, x, 0.25, xsigma, w->movstat_workspace_p); + + break; + } + + case GSL_FILTER_SCALE_SN: + { + /* calculate the window medians */ + gsl_movstat_median(endtype, x, xmedian, w->movstat_workspace_p); + + /* calculate window S_n values */ + gsl_movstat_Sn(endtype, x, xsigma, w->movstat_workspace_p); + + break; + } + + case GSL_FILTER_SCALE_QN: + { + /* calculate the window medians */ + gsl_movstat_median(endtype, x, xmedian, w->movstat_workspace_p); + + /* calculate window Q_n values */ + gsl_movstat_Qn(endtype, x, xsigma, w->movstat_workspace_p); + + break; + } + + default: + GSL_ERROR("unknown scale type", GSL_EDOM); + break; + } + + /* apply impulse detecting filter using previously computed scale estimate */ + status = filter_impulse(scale, 0.0, t, x, xmedian, y, xsigma, noutlier, ioutlier); + + return status; + } +} + +/* +filter_impulse() + Apply an impulse detection filter to an input vector. The filter output is + +y_i = { x_i, |x_i - m_i| <= t * S_i OR S_i < epsilon + { m_i, |x_i - m_i| > t * S_i + +where m_i is the median of the window W_i^H and S_i is the scale estimate (MAD, IQR, etc) + +Inputs: scale - scale factor to multiply xsigma to get unbiased estimate of stddev for Gaussian data + epsilon - minimum allowed scale estimate for identifying outliers + t - number of standard deviations required to identity outliers (>= 0) + x - input vector, size n + xmedian - vector of median values of x, size n + xmedian_i = median of window centered on x_i + y - (output) filtered vector, size n + xsigma - (output) vector of estimated local standard deviations of x, size n + xsigma_i = S_n for i-th window + noutlier - (output) number of outliers detected + ioutlier - (output) boolean array indicating outliers identified, size n; may be NULL + ioutlier_i = 1 if outlier detected, 0 if not + +Notes: +1) If S_i = 0 or is very small for a particular sample, then the filter may erroneously flag the +sample as an outlier, since it will act as a standard median filter. To avoid this scenario, the +parameter epsilon specifies the minimum value of S_i which can be used in the filter test. Any +samples for which S_i < epsilon are passed through unchanged. +*/ + +static int +filter_impulse(const double scale, const double epsilon, const double t, const gsl_vector * x, const gsl_vector * xmedian, + gsl_vector * y, gsl_vector * xsigma, size_t * noutlier, gsl_vector_int * ioutlier) +{ + const size_t n = x->size; + + if (n != y->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else if (xmedian->size != n) + { + GSL_ERROR("xmedian vector must match input size", GSL_EBADLEN); + } + else if (xsigma->size != n) + { + GSL_ERROR("xsigma vector must match input size", GSL_EBADLEN); + } + else if ((ioutlier != NULL) && (ioutlier->size != n)) + { + GSL_ERROR("ioutlier vector must match input size", GSL_EBADLEN); + } + else if (t < 0.0) + { + GSL_ERROR("t must be non-negative", GSL_EDOM); + } + else + { + size_t i; + + *noutlier = 0; + + /* build output vector */ + for (i = 0; i < n; ++i) + { + double xi = gsl_vector_get(x, i); + double xmedi = gsl_vector_get(xmedian, i); + double absdevi = fabs(xi - xmedi); /* absolute deviation for this sample */ + double *xsigmai = gsl_vector_ptr(xsigma, i); + + /* multiply by scale factor to get estimate of standard deviation */ + *xsigmai *= scale; + + /* + * If the absolute deviation for this sample is more than t stddevs + * for this window (and S_i is sufficiently large to avoid scale implosion), + * set the output value to the window median, otherwise use the original sample + */ + if ((*xsigmai >= epsilon) && (absdevi > t * (*xsigmai))) + { + gsl_vector_set(y, i, xmedi); + ++(*noutlier); + if (ioutlier) + gsl_vector_int_set(ioutlier, i, 1); + } + else + { + gsl_vector_set(y, i, xi); + if (ioutlier) + gsl_vector_int_set(ioutlier, i, 0); + } + } + + return GSL_SUCCESS; + } +} diff -Nru gsl-2.4+dfsg/filter/Makefile.am gsl-2.5+dfsg/filter/Makefile.am --- gsl-2.4+dfsg/filter/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/Makefile.am 2018-06-02 20:51:20.000000000 +0000 @@ -0,0 +1,15 @@ +noinst_LTLIBRARIES = libgslfilter.la + +pkginclude_HEADERS = gsl_filter.h + +AM_CPPFLAGS = -I$(top_srcdir) + +libgslfilter_la_SOURCES = gaussian.c impulse.c median.c rmedian.c + +noinst_HEADERS = ringbuf.c test_impulse.c test_gaussian.c test_median.c test_rmedian.c + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c +test_LDADD = libgslfilter.la ../movstat/libgslmovstat.la ../statistics/libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../err/libgslerr.la ../test/libgsltest.la ../vector/libgslvector.la ../block/libgslblock.la ../poly/libgslpoly.la ../sys/libgslsys.la ../utils/libutils.la diff -Nru gsl-2.4+dfsg/filter/Makefile.in gsl-2.5+dfsg/filter/Makefile.in --- gsl-2.4+dfsg/filter/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/Makefile.in 2018-06-13 20:31:02.000000000 +0000 @@ -0,0 +1,1035 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = filter +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(top_srcdir)/test-driver TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslfilter_la_LIBADD = +am_libgslfilter_la_OBJECTS = gaussian.lo impulse.lo median.lo \ + rmedian.lo +libgslfilter_la_OBJECTS = $(am_libgslfilter_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslfilter.la ../movstat/libgslmovstat.la \ + ../statistics/libgslstatistics.la ../sort/libgslsort.la \ + ../ieee-utils/libgslieeeutils.la ../randist/libgslrandist.la \ + ../rng/libgslrng.la ../specfunc/libgslspecfunc.la \ + ../complex/libgslcomplex.la ../err/libgslerr.la \ + ../test/libgsltest.la ../vector/libgslvector.la \ + ../block/libgslblock.la ../poly/libgslpoly.la \ + ../sys/libgslsys.la ../utils/libutils.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgslfilter_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslfilter_la_SOURCES) $(test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LDFLAGS = @GSL_LDFLAGS@ +GSL_LIBADD = @GSL_LIBADD@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslfilter.la +pkginclude_HEADERS = gsl_filter.h +AM_CPPFLAGS = -I$(top_srcdir) +libgslfilter_la_SOURCES = gaussian.c impulse.c median.c rmedian.c +noinst_HEADERS = ringbuf.c test_impulse.c test_gaussian.c test_median.c test_rmedian.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslfilter.la ../movstat/libgslmovstat.la ../statistics/libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../err/libgslerr.la ../test/libgsltest.la ../vector/libgslvector.la ../block/libgslblock.la ../poly/libgslpoly.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu filter/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu filter/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgslfilter.la: $(libgslfilter_la_OBJECTS) $(libgslfilter_la_DEPENDENCIES) $(EXTRA_libgslfilter_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libgslfilter_la_OBJECTS) $(libgslfilter_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaussian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impulse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/median.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmedian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test.log: test$(EXEEXT) + @p='test$(EXEEXT)'; \ + b='test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am \ + uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gsl-2.4+dfsg/filter/median.c gsl-2.5+dfsg/filter/median.c --- gsl-2.4+dfsg/filter/median.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/median.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,77 @@ +/* filter/median.c + * + * Contains routines related to the standard median filter + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include + +#include +#include +#include +#include + +gsl_filter_median_workspace * +gsl_filter_median_alloc(const size_t K) +{ + gsl_filter_median_workspace *w; + size_t H = K / 2; + + w = calloc(1, sizeof(gsl_filter_median_workspace)); + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->movstat_workspace_p = gsl_movstat_alloc(2*H + 1); + if (w->movstat_workspace_p == NULL) + { + gsl_filter_median_free(w); + GSL_ERROR_NULL ("failed to allocate space for movstat workspace", GSL_ENOMEM); + } + + return w; +} + +void +gsl_filter_median_free(gsl_filter_median_workspace * w) +{ + if (w->movstat_workspace_p) + gsl_movstat_free(w->movstat_workspace_p); + + free(w); +} + +/* +gsl_filter_median() + Standard median filter + +Inputs: endtype - end point handling + x - input vector + y - output vector + w - workspace +*/ + +int +gsl_filter_median(const gsl_filter_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_filter_median_workspace * w) +{ + int status = gsl_movstat_median(endtype, x, y, w->movstat_workspace_p); + return status; +} diff -Nru gsl-2.4+dfsg/filter/ringbuf.c gsl-2.5+dfsg/filter/ringbuf.c --- gsl-2.4+dfsg/filter/ringbuf.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/ringbuf.c 2018-05-12 23:48:47.000000000 +0000 @@ -0,0 +1,212 @@ +/* movstat/ringbuf.c + * + * Ring buffer module + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#ifndef __GSL_RINGBUF_C__ +#define __GSL_RINGBUF_C__ + +/*typedef int ringbuf_type;*/ + +typedef struct +{ + ringbuf_type_t *array; + int head; + int tail; + int size; /* total elements allocated */ +} ringbuf; + +static size_t ringbuf_size(const size_t n); +static int ringbuf_empty(ringbuf * d); +static int ringbuf_is_empty(const ringbuf * d); +static int ringbuf_is_full(const ringbuf * d); +static int ringbuf_insert(const ringbuf_type_t x, ringbuf * d); +static int ringbuf_pop_back(ringbuf * b); +static ringbuf_type_t ringbuf_peek(const int i, const ringbuf * b); +static ringbuf_type_t ringbuf_peek_front(const ringbuf * d); +static ringbuf_type_t ringbuf_peek_back(const ringbuf * d); +static size_t ringbuf_copy(double * dest, const ringbuf * b); + +static size_t +ringbuf_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(ringbuf); + size += n * sizeof(ringbuf_type_t); /* b->array */ + + return size; +} + +static int +ringbuf_init(const size_t n, ringbuf * b) +{ + b->array = (ringbuf_type_t *) ((char *) b + sizeof(ringbuf)); + b->head = -1; + b->tail = 0; + b->size = (int) n; + return GSL_SUCCESS; +} + +/* empty the buffer */ +static int +ringbuf_empty(ringbuf * b) +{ + b->head = -1; + b->tail = 0; + return GSL_SUCCESS; +} + +/* check if buffer is empty */ +static int +ringbuf_is_empty(const ringbuf * b) +{ + return (b->head == -1); +} + +/* check if buffer is full */ +static int +ringbuf_is_full(const ringbuf * b) +{ + return ((b->head == 0 && b->tail == b->size - 1) || + (b->head == b->tail + 1)); +} + +/* insert element into buffer, overwriting oldest element if necessary */ +static int +ringbuf_insert(const ringbuf_type_t x, ringbuf * b) +{ + if (b->head == -1) /* buffer is empty */ + { + b->head = 0; + b->tail = 0; + } + else if (b->head == 0) /* head is in first position, wrap to end */ + { + b->head = b->size - 1; + + if (b->tail == b->head && b->size > 1) + --(b->tail); /* buffer is full so decrease tail */ + } + else /* decrement head */ + { + --(b->head); + + if (b->tail == b->head) + { + /* buffer is full so update tail */ + if (b->tail == 0) + b->tail = b->size - 1; + else + --(b->tail); + } + } + + /* insert element */ + b->array[b->head] = x; + + return GSL_SUCCESS; +} + +static int +ringbuf_pop_back(ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + if (b->head == b->tail) /* buffer has only one element */ + { + b->head = -1; + b->tail = -1; + } + else if (b->tail == 0) /* tail is in first position, wrap to end */ + { + b->tail = b->size - 1; + } + else /* decrement tail */ + { + --(b->tail); + } + + return GSL_SUCCESS; + } +} + +static ringbuf_type_t +ringbuf_peek(const int i, const ringbuf * b) +{ + if (ringbuf_is_empty(b)) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[(b->head + i) % b->size]; + } +} + +static ringbuf_type_t +ringbuf_peek_front(const ringbuf * b) +{ + if (ringbuf_is_empty(b)) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[b->head]; + } +} + +static ringbuf_type_t +ringbuf_peek_back(const ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[b->tail]; + } +} + +static size_t +ringbuf_copy(double * dest, const ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + return 0; + } + else + { + const int n = (b->head > b->tail) ? (b->size - b->head + b->tail + 1) : (b->tail - b->head + 1); + int i; + + for (i = 0; i < n; ++i) + dest[n - i - 1] = b->array[(b->head + i) % b->size]; + + return (size_t) n; + } +} + +#endif /* __GSL_RINGBUF_C__ */ diff -Nru gsl-2.4+dfsg/filter/rmedian.c gsl-2.5+dfsg/filter/rmedian.c --- gsl-2.4+dfsg/filter/rmedian.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/rmedian.c 2018-06-01 03:11:02.000000000 +0000 @@ -0,0 +1,226 @@ +/* filter/rmedian.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +/* + * This module contains routines related to the recursive median filter. The + * algorithm is based on this paper, + * + * [1] S-J Ko, Y. H. Lee, and A. T. Fam, Efficient Implementation of One-Dimensional + * Recursive Median Filters, IEEE Transactions on Circuits and Systems, Vol 37, + * No 11, 1990. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +typedef struct +{ + const gsl_movstat_accum * minmax_acc; /* minimum/maximum accumulator */ + void *minmax_state; /* minimum/maximum accumulator workspace */ +} rmedian_state_t; + +static size_t rmedian_size(const size_t n); +static int rmedian_init(const size_t n, void * vstate); +static int rmedian_insert(const double x, void * vstate); +static int rmedian_delete(void * vstate); +static int rmedian_get(void * params, double * result, const void * vstate); + +static const gsl_movstat_accum rmedian_accum_type; + +gsl_filter_rmedian_workspace * +gsl_filter_rmedian_alloc(const size_t K) +{ + gsl_filter_rmedian_workspace *w; + size_t state_size; + + w = calloc(1, sizeof(gsl_filter_rmedian_workspace)); + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->H = K / 2; + w->K = 2*w->H + 1; + w->minmaxacc = gsl_movstat_accum_minmax; + + w->window = malloc(w->K * sizeof(double)); + if (w->window == NULL) + { + gsl_filter_rmedian_free(w); + GSL_ERROR_NULL ("failed to allocate space for window", GSL_ENOMEM); + } + + state_size = rmedian_size(w->H + 1); + + w->state = malloc(state_size); + if (w->state == NULL) + { + gsl_filter_rmedian_free(w); + GSL_ERROR_NULL ("failed to allocate space for min/max state", GSL_ENOMEM); + } + + w->movstat_workspace_p = gsl_movstat_alloc_with_size(state_size, 0, w->H); + if (!w->movstat_workspace_p) + { + gsl_filter_rmedian_free(w); + GSL_ERROR_NULL ("failed to allocate space for movstat workspace", GSL_ENOMEM); + } + + return w; +} + +void +gsl_filter_rmedian_free(gsl_filter_rmedian_workspace * w) +{ + if (w->state) + free(w->state); + + if (w->window) + free(w->window); + + if (w->movstat_workspace_p) + gsl_movstat_free(w->movstat_workspace_p); + + free(w); +} + +/* +gsl_filter_rmedian() + Recursive median filter + +Inputs: endtype - end point handling + x - input vector + y - output vector + w - workspace +*/ + +int +gsl_filter_rmedian(const gsl_filter_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_filter_rmedian_workspace * w) +{ + if (x->size != y->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else + { + int status = GSL_SUCCESS; + const size_t n = x->size; + const int H = (int) w->H; + double yprev; + int wsize; + + /* find median of first window to initialize filter */ + wsize = gsl_movstat_fill(endtype, x, 0, H, H, w->window); + yprev = gsl_stats_median(w->window, 1, wsize); + gsl_vector_set(y, 0, yprev); + + if (x->size > 1) + { + gsl_vector_const_view xv = gsl_vector_const_subvector(x, 1, n - 1); + gsl_vector_view yv = gsl_vector_subvector(y, 1, n - 1); + + /* apply recursive median filter to x[2:end] */ + status = gsl_movstat_apply_accum(endtype, &xv.vector, &rmedian_accum_type, (void *) &yprev, &yv.vector, + NULL, w->movstat_workspace_p); + } + + return status; + } +} + +static size_t +rmedian_size(const size_t n) +{ + size_t size = 0; + const gsl_movstat_accum * acc = gsl_movstat_accum_minmax; + + size += sizeof(rmedian_state_t); + size += (acc->size)(n); + + return size; +} + +static int +rmedian_init(const size_t n, void * vstate) +{ + rmedian_state_t * state = (rmedian_state_t *) vstate; + + state->minmax_acc = gsl_movstat_accum_minmax; + state->minmax_state = (void *) ((unsigned char *) vstate + sizeof(rmedian_state_t)); + + (state->minmax_acc->init)(n, state->minmax_state); + + return GSL_SUCCESS; +} + +static int +rmedian_insert(const double x, void * vstate) +{ + rmedian_state_t * state = (rmedian_state_t *) vstate; + return (state->minmax_acc->insert)(x, state->minmax_state); +} + +static int +rmedian_delete(void * vstate) +{ + rmedian_state_t * state = (rmedian_state_t *) vstate; + return (state->minmax_acc->delete)(state->minmax_state); +} + +static int +rmedian_get(void * params, double * result, const void * vstate) +{ + const rmedian_state_t * state = (const rmedian_state_t *) vstate; + double *yprev = (double *) params; /* previous filter output */ + double y; /* new filter output */ + double xminmax[2]; + + /* get minimum/maximum values of {x_i,...,x_{i+H}} */ + (state->minmax_acc->get)(NULL, xminmax, state->minmax_state); + + /* y = median [ yprev, xmin, xmax ] */ + if (*yprev <= xminmax[0]) + y = xminmax[0]; + else if (*yprev <= xminmax[1]) + y = *yprev; + else + y = xminmax[1]; + + *result = y; + *yprev = y; + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum rmedian_accum_type = +{ + rmedian_size, + rmedian_init, + rmedian_insert, + rmedian_delete, + rmedian_get +}; diff -Nru gsl-2.4+dfsg/filter/test.c gsl-2.5+dfsg/filter/test.c --- gsl-2.4+dfsg/filter/test.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/test.c 2018-06-01 03:03:53.000000000 +0000 @@ -0,0 +1,82 @@ +/* filter/test.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* compare two vectors */ +static void +compare_vectors(const double tol, const gsl_vector * v, const gsl_vector * expected, + const char * desc) +{ + const size_t n = v->size; + size_t i; + + for (i = 0; i < n; ++i) + { + double vi = gsl_vector_get(v, i); + double ui = gsl_vector_get(expected, i); + + gsl_test_rel(vi, ui, tol, "%s i=%zu", desc, i); + } +} + +/* generate random vector with elements in [-1,1] */ +static void +random_vector(gsl_vector * v, gsl_rng * r) +{ + size_t i; + + for (i = 0; i < v->size; ++i) + { + double vi = 2.0 * gsl_rng_uniform(r) - 1.0; /* in [-1,1] */ + gsl_vector_set(v, i, vi); + } +} + +#include "test_impulse.c" +#include "test_gaussian.c" +#include "test_median.c" +#include "test_rmedian.c" + +int +main() +{ + gsl_rng * r = gsl_rng_alloc(gsl_rng_default); + + test_gaussian(r); + + test_impulse(r); + test_median(r); + test_rmedian(r); + + gsl_rng_free(r); + + exit (gsl_test_summary()); +} diff -Nru gsl-2.4+dfsg/filter/test_gaussian.c gsl-2.5+dfsg/filter/test_gaussian.c --- gsl-2.4+dfsg/filter/test_gaussian.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/test_gaussian.c 2018-05-13 04:38:35.000000000 +0000 @@ -0,0 +1,215 @@ +/* filter/test_gaussian.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* compute Gaussian filter by explicitely constructing window and computing weighted sum */ +int +slow_gaussian(const gsl_filter_end_t etype, const double alpha, const size_t order, const gsl_vector * x, + gsl_vector * y, const size_t K) +{ + const size_t n = x->size; + const size_t H = K / 2; + double *window = malloc(K * sizeof(double)); + double *kernel = malloc(K * sizeof(double)); + gsl_vector_view k = gsl_vector_view_array(kernel, K); + size_t i; + + gsl_filter_gaussian_kernel(alpha, order, 1, &k.vector); + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, H, window); + double sum = 0.0; + size_t j; + + for (j = 0; j < wsize; ++j) + sum += window[j] * kernel[wsize - j - 1]; + + gsl_vector_set(y, i, sum); + } + + free(window); + free(kernel); + + return GSL_SUCCESS; +} + +static void +fdiff(const gsl_vector * x, gsl_vector * dx) +{ + const size_t N = x->size; + size_t i; + + for (i = 1; i < N - 1; ++i) + { + double xm1 = gsl_vector_get(x, i - 1); + double xp1 = gsl_vector_get(x, i + 1); + gsl_vector_set(dx, i, 0.5 * (xp1 - xm1)); + } + + gsl_vector_set(dx, 0, gsl_vector_get(x, 1) - gsl_vector_get(x, 0)); + gsl_vector_set(dx, N - 1, gsl_vector_get(x, N - 1) - gsl_vector_get(x, N - 2)); +} + +static void +test_gaussian_kernel(const double alpha, const size_t K) +{ + const size_t max_order = 3; + gsl_vector * kernel = gsl_vector_alloc(K); + gsl_vector * deriv = gsl_vector_alloc(K); + gsl_vector * deriv_fd = gsl_vector_alloc(K); + char buf[2048]; + size_t order; + + gsl_filter_gaussian_kernel(alpha, 0, 0, kernel); + + for (order = 1; order <= max_order; ++order) + { + gsl_filter_gaussian_kernel(alpha, order, 0, deriv); + fdiff(kernel, deriv_fd); + + sprintf(buf, "gaussian kernel order=%zu alpha=%g K=%zu", order, alpha, K); + compare_vectors(1.0e-2, deriv_fd, deriv, buf); + + gsl_vector_memcpy(kernel, deriv); + } + + gsl_vector_free(kernel); + gsl_vector_free(deriv); + gsl_vector_free(deriv_fd); +} + +static void +test_gaussian_proc(const double tol, const double alpha, const size_t order, const size_t n, const size_t K, + const gsl_filter_end_t etype, gsl_rng * rng_p) +{ + gsl_filter_gaussian_workspace * w = gsl_filter_gaussian_alloc(K); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + char buf[2048]; + + random_vector(x, rng_p); + + /* y = filter(x) with slow brute force method */ + slow_gaussian(etype, alpha, order, x, y, K); + + /* y = filter(x) with fast method */ + gsl_filter_gaussian(etype, alpha, order, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu K=%zu endtype=%u alpha=%g order=%zu gaussian random", n, K, etype, alpha, order); + compare_vectors(tol, z, y, buf); + + /* z = filter(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_filter_gaussian(etype, alpha, order, z, z, w); + + sprintf(buf, "n=%zu K=%zu endtype=%u alpha=%g order=%zu gaussian random in-place", n, K, etype, alpha, order); + compare_vectors(tol, z, y, buf); + + gsl_filter_gaussian_free(w); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +static void +test_gaussian_deriv(const double alpha, const size_t n, const size_t K) +{ +#if 0 + const double f_low = 1.0; + const double f_high = 50.0; + const double gamma = 2.0 * M_PI / (n - 1.0); + const double dt = 1.0 / (n - 1.0); + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *dx = gsl_vector_alloc(n); + gsl_vector *y1 = gsl_vector_alloc(n); + gsl_vector *y2 = gsl_vector_alloc(n); + gsl_filter_gaussian_workspace *w = gsl_filter_gaussian_alloc(K); + size_t i; + + /* make input signal composed of two sine waves at different frequencies */ + for (i = 0; i < n; ++i) + { + double xi = sin(gamma * f_low * i) + sin(gamma * f_high * i); + double dxi = gamma * f_low * cos(gamma * f_low * i) + + gamma * f_high * cos(gamma * f_high * i); + + gsl_vector_set(x, i, xi); + gsl_vector_set(dx, i, dxi); + } + + /* compute y1 = G * dx(t)/dt */ + gsl_filter_gaussian(alpha, 0, dx, y1, w); + + /* compute y2 = dG/dt * x(t) */ + gsl_filter_gaussian(alpha, 1, x, y2, w); + + for (i = 0; i < n; ++i) + { + printf("%zu %.12e %.12e %.12e %.12e\n", + i, + gsl_vector_get(x, i), + gsl_vector_get(dx, i), + gsl_vector_get(y1, i), + gsl_vector_get(y2, i)); + } + + gsl_vector_free(x); + gsl_vector_free(dx); + gsl_vector_free(y1); + gsl_vector_free(y2); + gsl_filter_gaussian_free(w); +#endif +} + +static void +test_gaussian(gsl_rng * r) +{ + const double tol = 1.0e-10; + size_t order; + + test_gaussian_kernel(3.0, 2001); + + for (order = 0; order <= 3; ++order) + { + test_gaussian_proc(tol, 2.5, order, 1000, 21, GSL_FILTER_END_PADZERO, r); + test_gaussian_proc(tol, 3.0, order, 500, 11, GSL_FILTER_END_PADZERO, r); + test_gaussian_proc(tol, 1.0, order, 50, 101, GSL_FILTER_END_PADZERO, r); + test_gaussian_proc(tol, 2.0, order, 50, 11, GSL_FILTER_END_PADZERO, r); + + test_gaussian_proc(tol, 2.5, order, 1000, 21, GSL_FILTER_END_PADVALUE, r); + test_gaussian_proc(tol, 3.0, order, 500, 11, GSL_FILTER_END_PADVALUE, r); + test_gaussian_proc(tol, 1.0, order, 50, 101, GSL_FILTER_END_PADVALUE, r); + test_gaussian_proc(tol, 2.0, order, 50, 11, GSL_FILTER_END_PADVALUE, r); + + test_gaussian_proc(tol, 2.5, order, 1000, 21, GSL_FILTER_END_TRUNCATE, r); + test_gaussian_proc(tol, 3.0, order, 500, 11, GSL_FILTER_END_TRUNCATE, r); + test_gaussian_proc(tol, 1.0, order, 50, 101, GSL_FILTER_END_TRUNCATE, r); + test_gaussian_proc(tol, 2.0, order, 50, 11, GSL_FILTER_END_TRUNCATE, r); + } +} diff -Nru gsl-2.4+dfsg/filter/test_impulse.c gsl-2.5+dfsg/filter/test_impulse.c --- gsl-2.4+dfsg/filter/test_impulse.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/test_impulse.c 2018-05-26 23:57:00.000000000 +0000 @@ -0,0 +1,156 @@ +/* filter/test_impulse.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +static int +vector_sum(const gsl_vector_int * v) +{ + size_t i; + int sum = 0; + + for (i = 0; i < v->size; ++i) + { + int vi = gsl_vector_int_get(v, i); + sum += vi; + } + + return sum; +} + +static void +test_impulse_proc(const double tol, const size_t n, const size_t K, const double nsigma, + const gsl_filter_end_t etype, const gsl_filter_scale_t stype, + const double outlier_percentage, gsl_rng * r) +{ + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + gsl_vector * y_med = gsl_vector_alloc(n); + gsl_vector * xmedian = gsl_vector_alloc(n); + gsl_vector * xsigma = gsl_vector_alloc(n); + size_t noutlier; + gsl_vector_int * ioutlier = gsl_vector_int_alloc(n); + gsl_vector_int * ioutlier_exact = gsl_vector_int_alloc(n); + size_t i; + gsl_filter_impulse_workspace *impulse_p = gsl_filter_impulse_alloc(K); + gsl_filter_median_workspace *median_p = gsl_filter_median_alloc(K); + size_t noutlier_exact = 0; + char buf[1024]; + + gsl_vector_int_set_zero(ioutlier_exact); + + for (i = 0; i < n; ++i) + { + double xi = gsl_ran_gaussian(r, 1.0); + double vi = gsl_rng_uniform(r); + + if (vi <= outlier_percentage) + { + xi += 15.0 * GSL_SIGN(xi); + ++noutlier_exact; + gsl_vector_int_set(ioutlier_exact, i, 1); + } + + gsl_vector_set(x, i, xi); + } + + /* first test that median filter is equal to impulse filter with nsigma = 0 */ + + gsl_filter_median(etype, x, y_med, median_p); + gsl_filter_impulse(etype, stype, 0.0, x, y, xmedian, xsigma, &noutlier, ioutlier, impulse_p); + + sprintf(buf, "impulse nsigma=0 smf comparison, etype=%u stype=%u", etype, stype); + compare_vectors(tol, y, y_med, buf); + + /* second test: filter y = impulse(x) with given nsigma */ + + gsl_filter_impulse(etype, stype, nsigma, x, y, xmedian, xsigma, &noutlier, ioutlier, impulse_p); + + /* test correct number of outliers detected */ + gsl_test(noutlier != noutlier_exact, "impulse [n=%zu,K=%zu,nsigma=%g,outlier_percentage=%g] noutlier=%zu exact=%zu", + n, K, nsigma, outlier_percentage, noutlier, noutlier_exact); + +#if 0 + { + for (i = 0; i < n; ++i) + { + printf("%.12e %.12e %d %.12e %.12e\n", + gsl_vector_get(x, i), + gsl_vector_get(y, i), + gsl_vector_int_get(ioutlier, i), + gsl_vector_get(xmedian, i) + nsigma * gsl_vector_get(xsigma, i), + gsl_vector_get(xmedian, i) - nsigma * gsl_vector_get(xsigma, i)); + } + } +#endif + + /* test outliers found in correct locations */ + for (i = 0; i < n; ++i) + { + int val = gsl_vector_int_get(ioutlier, i); + int val_exact = gsl_vector_int_get(ioutlier_exact, i); + + gsl_test(val != val_exact, "test_impulse: outlier mismatch [i=%zu,K=%zu,nsigma=%g,outlier_percentage=%g] ioutlier=%d ioutlier_exact=%d", + i, K, nsigma, outlier_percentage, val, val_exact); + } + + /* test noutlier = sum(ioutlier) */ + { + size_t iout_sum = vector_sum(ioutlier); + gsl_test(noutlier != iout_sum, "impulse [K=%zu,nsigma=%g,outlier_percentage=%g] noutlier=%zu sum(ioutlier)=%zu", + K, nsigma, outlier_percentage, noutlier, iout_sum); + } + + /* third test: test in-place filter z = impulse(z) */ + + gsl_vector_memcpy(z, x); + gsl_filter_impulse(etype, stype, nsigma, z, z, xmedian, xsigma, &noutlier, ioutlier, impulse_p); + + sprintf(buf, "impulse in-place nsigma=%g,n=%zu,K=%zu,etype=%u stype=%u", nsigma, n, K, etype, stype); + compare_vectors(GSL_DBL_EPSILON, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_vector_free(y_med); + gsl_vector_free(xmedian); + gsl_vector_free(xsigma); + gsl_vector_int_free(ioutlier); + gsl_vector_int_free(ioutlier_exact); + gsl_filter_impulse_free(impulse_p); + gsl_filter_median_free(median_p); +} + +static void +test_impulse(gsl_rng * r) +{ + const double tol = 1.0e-10; + + test_impulse_proc(tol, 1000, 21, 6.0, GSL_FILTER_END_TRUNCATE, GSL_FILTER_SCALE_QN, 0.05, r); + test_impulse_proc(tol, 1000, 21, 6.0, GSL_FILTER_END_TRUNCATE, GSL_FILTER_SCALE_SN, 0.05, r); + test_impulse_proc(tol, 1000, 21, 6.0, GSL_FILTER_END_TRUNCATE, GSL_FILTER_SCALE_MAD, 0.05, r); + test_impulse_proc(tol, 1000, 21, 6.0, GSL_FILTER_END_TRUNCATE, GSL_FILTER_SCALE_IQR, 0.05, r); +} diff -Nru gsl-2.4+dfsg/filter/test_median.c gsl-2.5+dfsg/filter/test_median.c --- gsl-2.4+dfsg/filter/test_median.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/test_median.c 2018-05-16 03:14:54.000000000 +0000 @@ -0,0 +1,115 @@ +/* filter/test_median.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* compute filtered data by explicitely constructing window, sorting it and finding median */ +int +slow_movmedian(const gsl_filter_end_t etype, const gsl_vector * x, gsl_vector * y, const int K) +{ + const size_t H = K / 2; + const size_t n = x->size; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, H, window); + double yi = gsl_stats_median(window, 1, wsize); + + gsl_vector_set(y, i, yi); + } + + free(window); + + return GSL_SUCCESS; +} + +static void +test_median_proc(const double tol, const size_t n, const size_t K, + const gsl_filter_end_t etype, gsl_rng *rng_p) +{ + gsl_filter_median_workspace *w = gsl_filter_median_alloc(K); + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + char buf[2048]; + + /* test moving median with random input */ + random_vector(x, rng_p); + + /* y = median(x) with slow brute force algorithm */ + slow_movmedian(etype, x, y, K); + + /* z = median(x) */ + gsl_filter_median(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu K=%zu endtype=%u median random", n, K, etype); + compare_vectors(tol, z, y, buf); + + /* z = median(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_filter_median(etype, z, z, w); + + sprintf(buf, "n=%zu K=%zu endtype=%u median random in-place", n, K, etype); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_filter_median_free(w); +} + +static void +test_median(gsl_rng * rng_p) +{ + test_median_proc(GSL_DBL_EPSILON, 1000, 1, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 3, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 301, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 17, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 9, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 901, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 201, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_median_proc(GSL_DBL_EPSILON, 1000, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 301, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 17, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 9, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 901, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 201, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_median_proc(GSL_DBL_EPSILON, 1000, 1, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 301, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 17, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 9, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 901, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 201, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/filter/test_rmedian.c gsl-2.5+dfsg/filter/test_rmedian.c --- gsl-2.4+dfsg/filter/test_rmedian.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/test_rmedian.c 2018-06-01 03:08:10.000000000 +0000 @@ -0,0 +1,159 @@ +/* filter/test_rmedian.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include + +/* slow/dumb rmedian which constructs actual window for each sample, sorts + * it and finds median */ +static int +slow_rmedian(const gsl_filter_end_t endtype, const gsl_vector * x, gsl_vector * y, const int K) +{ + const int n = (int) x->size; + const int H = K / 2; + double *window = malloc(K * sizeof(double)); + int i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(endtype, x, i, H, H, window); + double yi; + int j; + + /* fill first half of window with previous filter output values */ + for (j = i - H; j < i; ++j) + { + if (j < 0) + { + if (endtype == GSL_FILTER_END_PADVALUE) + window[j - i + H] = gsl_vector_get(x, 0); + else if (endtype == GSL_FILTER_END_PADZERO) + window[j - i + H] = 0.0; + } + else + { + window[j - i + H] = gsl_vector_get(y, j); + } + } + + yi = gsl_stats_median(window, 1, wsize); + gsl_vector_set(y, i, yi); + } + + free(window); + + return GSL_SUCCESS; +} + +/* test square wave input (root signal) */ +static void +test_rmedian_root(const gsl_filter_end_t etype, const size_t n, const size_t k) +{ + const double tol = 1.0e-12; + gsl_filter_rmedian_workspace *w = gsl_filter_rmedian_alloc(k); + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + char buf[2048]; + size_t i; + + /* test a root sequence (square input): x = [zero one zero] */ + gsl_vector_set_all(x, 0.0); + + for (i = n / 3; i <= n / 2; ++i) + gsl_vector_set(x, i, 1.0); + + /* compute y = rmedian(x) and test y = x */ + gsl_filter_rmedian(etype, x, y, w); + + sprintf(buf, "n=%zu k=%zu RMF square wave root sequence", n, k); + compare_vectors(tol, y, x, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_filter_rmedian_free(w); +} + +/* test random input and in-place */ +static void +test_rmedian_random(const gsl_filter_end_t etype, const size_t n, const int K, gsl_rng * r) +{ + const double tol = 1.0e-12; + gsl_filter_rmedian_workspace *w = gsl_filter_rmedian_alloc(K); + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + char buf[2048]; + + /* test filter with random input against slow algorithm */ + random_vector(x, r); + + /* y = rmedian(x) */ + gsl_filter_rmedian(etype, x, y, w); + + /* y = rmedian(x) with slow algorithm */ + slow_rmedian(etype, x, z, K); + + /* test y = z */ + sprintf(buf, "n=%zu K=%d RMF symmetric random slow test", n, K); + compare_vectors(tol, y, z, buf); + + /* test in-place filter */ + + /* z = rmedian(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_filter_rmedian(etype, z, z, w); + + sprintf(buf, "n=%zu K=%d RMF symmetric random in-place", n, K); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_filter_rmedian_free(w); +} + +void +test_rmedian(gsl_rng * rng_p) +{ + /* test root sequences */ + + test_rmedian_root(GSL_FILTER_END_PADZERO, 1000, 3); + test_rmedian_root(GSL_FILTER_END_PADZERO, 2000, 101); + + test_rmedian_root(GSL_FILTER_END_PADVALUE, 1000, 3); + test_rmedian_root(GSL_FILTER_END_PADVALUE, 2000, 101); + + /* test random input */ + + test_rmedian_random(GSL_FILTER_END_PADZERO, 10, 1, rng_p); + test_rmedian_random(GSL_FILTER_END_PADZERO, 100, 3, rng_p); + test_rmedian_random(GSL_FILTER_END_PADZERO, 1000, 3, rng_p); + test_rmedian_random(GSL_FILTER_END_PADZERO, 100, 1001, rng_p); + test_rmedian_random(GSL_FILTER_END_PADZERO, 5, 7, rng_p); + + test_rmedian_random(GSL_FILTER_END_PADVALUE, 10, 1, rng_p); + test_rmedian_random(GSL_FILTER_END_PADVALUE, 100, 3, rng_p); + test_rmedian_random(GSL_FILTER_END_PADVALUE, 1000, 3, rng_p); + test_rmedian_random(GSL_FILTER_END_PADVALUE, 100, 1001, rng_p); + test_rmedian_random(GSL_FILTER_END_PADVALUE, 5, 7, rng_p); +} diff -Nru gsl-2.4+dfsg/filter/TODO gsl-2.5+dfsg/filter/TODO --- gsl-2.4+dfsg/filter/TODO 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/filter/TODO 2018-06-02 20:42:13.000000000 +0000 @@ -0,0 +1,5 @@ +gaussian +- tests (derivative test) + +docs +- document gsl_filter_end_t diff -Nru gsl-2.4+dfsg/gsl_version.h gsl-2.5+dfsg/gsl_version.h --- gsl-2.4+dfsg/gsl_version.h 2017-06-19 12:55:57.000000000 +0000 +++ gsl-2.5+dfsg/gsl_version.h 2018-06-13 20:31:26.000000000 +0000 @@ -15,9 +15,9 @@ __BEGIN_DECLS -#define GSL_VERSION "2.4" +#define GSL_VERSION "2.5" #define GSL_MAJOR_VERSION 2 -#define GSL_MINOR_VERSION 4 +#define GSL_MINOR_VERSION 5 GSL_VAR const char * gsl_version; diff -Nru gsl-2.4+dfsg/ieee-utils/env.c gsl-2.5+dfsg/ieee-utils/env.c --- gsl-2.4+dfsg/ieee-utils/env.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ieee-utils/env.c 2017-07-23 14:03:11.000000000 +0000 @@ -34,7 +34,8 @@ #if defined( _MSC_VER ) extern const char *fp_env_string; - p = fp_env_string; + if(p == 0 || *p == '\0') + p = fp_env_string; #else diff -Nru gsl-2.4+dfsg/integration/fixed.c gsl-2.5+dfsg/integration/fixed.c --- gsl-2.4+dfsg/integration/fixed.c 2017-05-22 11:26:12.000000000 +0000 +++ gsl-2.5+dfsg/integration/fixed.c 2018-05-02 20:45:20.000000000 +0000 @@ -20,7 +20,8 @@ /* the code in this module performs fixed-point quadrature calculations for * integrands and is based on IQPACK */ -#include +#include +#include #include #include #include diff -Nru gsl-2.4+dfsg/integration/gsl_integration.h gsl-2.5+dfsg/integration/gsl_integration.h --- gsl-2.4+dfsg/integration/gsl_integration.h 2017-05-22 11:26:28.000000000 +0000 +++ gsl-2.5+dfsg/integration/gsl_integration.h 2018-05-02 20:45:20.000000000 +0000 @@ -259,29 +259,25 @@ gsl_integration_glfixed_table; -gsl_integration_glfixed_table * - gsl_integration_glfixed_table_alloc (size_t n); +gsl_integration_glfixed_table * gsl_integration_glfixed_table_alloc (size_t n); -void - gsl_integration_glfixed_table_free (gsl_integration_glfixed_table * t); +void gsl_integration_glfixed_table_free (gsl_integration_glfixed_table * t); /* Routine for fixed-order Gauss-Legendre integration */ -double - gsl_integration_glfixed (const gsl_function *f, - double a, - double b, - const gsl_integration_glfixed_table * t); +double gsl_integration_glfixed (const gsl_function *f, + double a, + double b, + const gsl_integration_glfixed_table * t); /* Routine to retrieve the i-th Gauss-Legendre point and weight from t */ -int - gsl_integration_glfixed_point (double a, - double b, - size_t i, - double *xi, - double *wi, - const gsl_integration_glfixed_table * t); +int gsl_integration_glfixed_point (double a, + double b, + size_t i, + double *xi, + double *wi, + const gsl_integration_glfixed_table * t); /* Cquad integration - Pedro Gonnet */ @@ -317,6 +313,21 @@ gsl_integration_cquad_workspace * ws, double *result, double *abserr, size_t * nevals); +/* Romberg integration workspace and routines */ + +typedef struct +{ + size_t n; /* maximum number of steps */ + double *work1; /* workspace for a row of R matrix, size n */ + double *work2; /* workspace for a row of R matrix, size n */ +} gsl_integration_romberg_workspace; + +gsl_integration_romberg_workspace *gsl_integration_romberg_alloc(const size_t n); +void gsl_integration_romberg_free(gsl_integration_romberg_workspace * w); +int gsl_integration_romberg(const gsl_function * f, const double a, const double b, + const double epsabs, const double epsrel, double * result, + size_t * neval, gsl_integration_romberg_workspace * w); + /* IQPACK related structures and routines */ typedef struct diff -Nru gsl-2.4+dfsg/integration/Makefile.am gsl-2.5+dfsg/integration/Makefile.am --- gsl-2.4+dfsg/integration/Makefile.am 2017-05-24 08:15:53.000000000 +0000 +++ gsl-2.5+dfsg/integration/Makefile.am 2018-05-02 20:45:20.000000000 +0000 @@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c fixed.c chebyshev.c chebyshev2.c legendre.c hermite.c laguerre.c gegenbauer.c jacobi.c exponential.c rational.c +libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c fixed.c chebyshev.c chebyshev2.c legendre.c hermite.c laguerre.c gegenbauer.c jacobi.c exponential.c rational.c romberg.c pkginclude_HEADERS = gsl_integration.h noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c cquad_const.c diff -Nru gsl-2.4+dfsg/integration/Makefile.in gsl-2.5+dfsg/integration/Makefile.in --- gsl-2.4+dfsg/integration/Makefile.in 2017-06-19 12:55:39.000000000 +0000 +++ gsl-2.5+dfsg/integration/Makefile.in 2018-06-13 20:31:03.000000000 +0000 @@ -100,7 +100,7 @@ workspace.lo qcheb.lo qawc.lo qmomo.lo qaws.lo qmomof.lo \ qawo.lo qawf.lo glfixed.lo cquad.lo fixed.lo chebyshev.lo \ chebyshev2.lo legendre.lo hermite.lo laguerre.lo gegenbauer.lo \ - jacobi.lo exponential.lo rational.lo + jacobi.lo exponential.lo rational.lo romberg.lo libgslintegration_la_OBJECTS = $(am_libgslintegration_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -526,7 +526,7 @@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslintegration.la AM_CPPFLAGS = -I$(top_srcdir) -libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c fixed.c chebyshev.c chebyshev2.c legendre.c hermite.c laguerre.c gegenbauer.c jacobi.c exponential.c rational.c +libgslintegration_la_SOURCES = qk15.c qk21.c qk31.c qk41.c qk51.c qk61.c qk.c qng.c qng.h qag.c qags.c qagp.c workspace.c qcheb.c qawc.c qmomo.c qaws.c qmomof.c qawo.c qawf.c glfixed.c cquad.c fixed.c chebyshev.c chebyshev2.c legendre.c hermite.c laguerre.c gegenbauer.c jacobi.c exponential.c rational.c romberg.c pkginclude_HEADERS = gsl_integration.h noinst_HEADERS = qpsrt.c qpsrt2.c qelg.c qc25c.c qc25s.c qc25f.c ptsort.c util.c err.c positivity.c append.c initialise.c set_initial.c reset.c cquad_const.c TESTS = $(check_PROGRAMS) @@ -630,6 +630,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmomof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qng.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rational.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/romberg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/workspace.Plo@am__quote@ diff -Nru gsl-2.4+dfsg/integration/qawo.c gsl-2.5+dfsg/integration/qawo.c --- gsl-2.4+dfsg/integration/qawo.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/integration/qawo.c 2018-01-15 18:25:17.000000000 +0000 @@ -101,7 +101,7 @@ *result = result0; *abserr = abserr0; - GSL_ERROR ("cannot reach tolerance because of roundoff error" + GSL_ERROR ("cannot reach tolerance because of roundoff error " "on first attempt", GSL_EROUND); } else if ((abserr0 <= tolerance && abserr0 != resasc0) || abserr0 == 0.0) diff -Nru gsl-2.4+dfsg/integration/romberg.c gsl-2.5+dfsg/integration/romberg.c --- gsl-2.4+dfsg/integration/romberg.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/integration/romberg.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,164 @@ +/* integration/romberg.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +/* the code in this module performs Romberg integration */ + +#include +#include +#include +#include +#include + +#define ROMBERG_PRINT_ROW(i, r) \ + do { \ + size_t jj; \ + fprintf(stderr, "R[%zu] = ", i); \ + for (jj = 0; jj <= i; ++jj) \ + fprintf(stderr, "%.8e ", r[jj]); \ + fprintf(stderr, "\n"); \ + } while (0) + +gsl_integration_romberg_workspace * +gsl_integration_romberg_alloc(const size_t n) +{ + gsl_integration_romberg_workspace *w; + + /* check inputs */ + if (n < 1) + { + GSL_ERROR_VAL ("workspace size n must be at least 1", GSL_EDOM, 0); + } + + w = calloc(1, sizeof(gsl_integration_romberg_workspace)); + if (w == NULL) + { + GSL_ERROR_VAL ("unable to allocate workspace", GSL_ENOMEM, 0); + } + + /* ceiling on n, since the number of points is 2^n + 1 */ + w->n = GSL_MIN(n, 30); + + w->work1 = malloc(w->n * sizeof(double)); + if (w->work1 == NULL) + { + gsl_integration_romberg_free(w); + GSL_ERROR_VAL ("unable to allocate previous row", GSL_ENOMEM, 0); + } + + w->work2 = malloc(w->n * sizeof(double)); + if (w->work2 == NULL) + { + gsl_integration_romberg_free(w); + GSL_ERROR_VAL ("unable to allocate current row", GSL_ENOMEM, 0); + } + + return w; +} + +void +gsl_integration_romberg_free(gsl_integration_romberg_workspace * w) +{ + if (w->work1) + free(w->work1); + + if (w->work2) + free(w->work2); + + free(w); +} + +int +gsl_integration_romberg(const gsl_function * f, const double a, const double b, + const double epsabs, const double epsrel, double * result, + size_t * neval, gsl_integration_romberg_workspace * w) +{ + if (epsabs < 0.0) + { + GSL_ERROR("epsabs must be non-negative", GSL_EDOM); + } + else if (epsrel < 0.0) + { + GSL_ERROR("epsrel must be non-negative", GSL_EDOM); + } + else + { + const size_t n = w->n; + double *Rp = &(w->work1[0]); /* previous row */ + double *Rc = &(w->work2[0]); /* current row */ + double *Rtmp; + double h = 0.5 * (b - a); /* step size */ + size_t i; + + /* R(0,0) */ + Rp[0] = h * (GSL_FN_EVAL(f, a) + GSL_FN_EVAL(f, b)); + *neval = 2; + + /*ROMBERG_PRINT_ROW((size_t) 0, Rp);*/ + + for (i = 1; i < n; ++i) + { + size_t j; + double sum = 0.0; + double err; + double four_j; /* 4^j */ + size_t two_i = 1 << i; /* 2^i */ + + for (j = 1; j < two_i; j += 2) + { + sum += GSL_FN_EVAL(f, a + j * h); + ++(*neval); + } + + /* R(i,0) */ + Rc[0] = sum * h + 0.5 * Rp[0]; + + four_j = 4.0; + for (j = 1; j <= i; ++j) + { + Rc[j] = (four_j * Rc[j - 1] - Rp[j - 1]) / (four_j - 1.0); + four_j *= 4.0; + } + + /*ROMBERG_PRINT_ROW(i, Rc);*/ + + /* + * compute difference between current and previous result and + * check for convergence + */ + err = fabs(Rc[i] - Rp[i - 1]); + if ((err < epsabs) || (err < epsrel * fabs(Rc[i]))) + { + *result = Rc[i]; + return GSL_SUCCESS; + } + + /* swap Rp and Rc */ + Rtmp = Rp; + Rp = Rc; + Rc = Rtmp; + + h *= 0.5; + } + + /* did not converge - return best guess */ + *result = Rp[n - 1]; + + return GSL_EMAXITER; + } +} diff -Nru gsl-2.4+dfsg/integration/test.c gsl-2.5+dfsg/integration/test.c --- gsl-2.4+dfsg/integration/test.c 2017-05-24 08:22:16.000000000 +0000 +++ gsl-2.5+dfsg/integration/test.c 2018-05-02 20:45:20.000000000 +0000 @@ -1,7 +1,8 @@ /* integration/test.c * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough - * Copyright (C) 2017 Patrick Alken, Konrad Griessinger + * Copyright (C) 2017, 2018 Patrick Alken + * Copyright (C) 2017 Konrad Griessinger * * 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 @@ -2126,6 +2127,42 @@ } + /* test Romberg integration */ + { + int status = 0, i; + double result; + size_t neval; + double exp_result; + int exp_ier = 0; + + gsl_function f; + gsl_integration_romberg_workspace * w = gsl_integration_romberg_alloc (20); + + f = make_function(&f_sin, NULL); + exp_result = 1.0; + + status = gsl_integration_romberg(&f, 0.0, M_PI_2, 0.0, 1e-10, &result, &neval, w); + gsl_test_int(status, exp_ier, "romberg(f_sin) status") ; + gsl_test_rel(result, exp_result, 1e-15, "romberg(f_sin) result") ; + + status = gsl_integration_romberg(&f, M_PI_2, 0.0, 0.0, 1e-10, &result, &neval, w); + gsl_test_int(status, exp_ier, "romberg(f_sin) reverse status") ; + gsl_test_rel(result, -exp_result, 1e-15, "romberg(f_sin) reverse result") ; + + f = make_function(&cqf11, NULL); + exp_result = 5.0; + + status = gsl_integration_romberg(&f, -5.0, 5.0, 0.0, 1e-10, &result, &neval, w); + gsl_test_int(status, exp_ier, "romberg(cqf11) status") ; + gsl_test_rel(result, exp_result, 1e-15, "romberg(cqf11) result") ; + + status = gsl_integration_romberg(&f, 5.0, -5.0, 0.0, 1e-10, &result, &neval, w); + gsl_test_int(status, exp_ier, "romberg(cqf11) reverse status") ; + gsl_test_rel(result, -exp_result, 1e-15, "romberg(cqf11) reverse result") ; + + gsl_integration_romberg_free(w); + } + /* Sanity check monomial test function for fixed Gauss-Legendre rules */ { struct monomial_params params; diff -Nru gsl-2.4+dfsg/linalg/cholesky.c gsl-2.5+dfsg/linalg/cholesky.c --- gsl-2.4+dfsg/linalg/cholesky.c 2017-05-22 09:59:49.000000000 +0000 +++ gsl-2.5+dfsg/linalg/cholesky.c 2018-05-18 03:26:50.000000000 +0000 @@ -184,6 +184,62 @@ } } +int +gsl_linalg_cholesky_solve_mat (const gsl_matrix * LLT, + const gsl_matrix * B, + gsl_matrix * X) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (LLT->size1 != B->size1) + { + GSL_ERROR ("matrix size must match B size", GSL_EBADLEN); + } + else if (LLT->size2 != X->size1) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + int status; + + /* copy X <- B */ + gsl_matrix_memcpy (X, B); + + status = gsl_linalg_cholesky_svx_mat(LLT, X); + + return status; + } +} + +int +gsl_linalg_cholesky_svx_mat (const gsl_matrix * LLT, + gsl_matrix * X) +{ + if (LLT->size1 != LLT->size2) + { + GSL_ERROR ("cholesky matrix must be square", GSL_ENOTSQR); + } + else if (LLT->size2 != X->size1) + { + GSL_ERROR ("matrix size must match solution size", GSL_EBADLEN); + } + else + { + /* solve for C using forward-substitution, L C = B */ + gsl_blas_dtrsm (CblasLeft, CblasLower, CblasNoTrans, CblasNonUnit, 1.0, + LLT, X); + + /* perform back-substitution, L^T X = C */ + gsl_blas_dtrsm (CblasLeft, CblasLower, CblasTrans, CblasNonUnit, 1.0, + LLT, X); + + return GSL_SUCCESS; + } +} + /* gsl_linalg_cholesky_invert() Compute the inverse of a symmetric positive definite matrix in diff -Nru gsl-2.4+dfsg/linalg/gsl_linalg.h gsl-2.5+dfsg/linalg/gsl_linalg.h --- gsl-2.4+dfsg/linalg/gsl_linalg.h 2017-02-18 15:55:33.000000000 +0000 +++ gsl-2.5+dfsg/linalg/gsl_linalg.h 2018-05-18 03:26:50.000000000 +0000 @@ -474,9 +474,14 @@ int gsl_linalg_cholesky_solve (const gsl_matrix * cholesky, const gsl_vector * b, gsl_vector * x); +int gsl_linalg_cholesky_solve_mat (const gsl_matrix * cholesky, + const gsl_matrix * B, + gsl_matrix * X); int gsl_linalg_cholesky_svx (const gsl_matrix * cholesky, gsl_vector * x); +int gsl_linalg_cholesky_svx_mat (const gsl_matrix * cholesky, + gsl_matrix * X); int gsl_linalg_cholesky_invert(gsl_matrix * cholesky); diff -Nru gsl-2.4+dfsg/Makefile.am gsl-2.5+dfsg/Makefile.am --- gsl-2.4+dfsg/Makefile.am 2016-07-07 20:36:10.000000000 +0000 +++ gsl-2.5+dfsg/Makefile.am 2018-05-02 20:45:20.000000000 +0000 @@ -2,9 +2,9 @@ # AUTOMAKE_OPTIONS = readme-alpha -SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit multifit_nlinear multilarge multilarge_nlinear rstat statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline spblas spmatrix splinalg doc +SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit multifit_nlinear multilarge multilarge_nlinear filter movstat rstat statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline spblas spmatrix splinalg doc -SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multifit_nlinear/libgslmultifit_nlinear.la multilarge/libgslmultilarge.la multilarge_nlinear/libgslmultilarge_nlinear.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la rstat/libgslrstat.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la spmatrix/libgslspmatrix.la spblas/libgslspblas.la splinalg/libgslsplinalg.la +SUBLIBS = block/libgslblock.la blas/libgslblas.la bspline/libgslbspline.la complex/libgslcomplex.la cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la fft/libgslfft.la filter/libgslfilter.la fit/libgslfit.la histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la integration/libgslintegration.la interpolation/libgslinterpolation.la linalg/libgsllinalg.la matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la multifit/libgslmultifit.la multifit_nlinear/libgslmultifit_nlinear.la multilarge/libgslmultilarge.la multilarge_nlinear/libgslmultilarge_nlinear.la multimin/libgslmultimin.la multiroots/libgslmultiroots.la ntuple/libgslntuple.la ode-initval/libgslodeiv.la ode-initval2/libgslodeiv2.la permutation/libgslpermutation.la combination/libgslcombination.la multiset/libgslmultiset.la poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la sort/libgslsort.la specfunc/libgslspecfunc.la movstat/libgslmovstat.la rstat/libgslrstat.la statistics/libgslstatistics.la sum/libgslsum.la sys/libgslsys.la test/libgsltest.la utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la wavelet/libgslwavelet.la spmatrix/libgslspmatrix.la spblas/libgslspblas.la splinalg/libgslsplinalg.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h diff -Nru gsl-2.4+dfsg/Makefile.in gsl-2.5+dfsg/Makefile.in --- gsl-2.4+dfsg/Makefile.in 2017-06-19 12:55:38.000000000 +0000 +++ gsl-2.5+dfsg/Makefile.in 2018-06-13 20:31:02.000000000 +0000 @@ -598,13 +598,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit multifit_nlinear multilarge multilarge_nlinear rstat statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline spblas spmatrix splinalg doc +SUBDIRS = gsl utils sys test err const complex cheb block vector matrix permutation combination multiset sort ieee-utils cblas blas linalg eigen specfunc dht qrng rng randist fft poly fit multifit multifit_nlinear multilarge multilarge_nlinear filter movstat rstat statistics siman sum integration interpolation histogram ode-initval ode-initval2 roots multiroots min multimin monte ntuple diff deriv cdf wavelet bspline spblas spmatrix splinalg doc SUBLIBS = block/libgslblock.la blas/libgslblas.la \ bspline/libgslbspline.la complex/libgslcomplex.la \ cheb/libgslcheb.la dht/libgsldht.la diff/libgsldiff.la \ deriv/libgslderiv.la eigen/libgsleigen.la err/libgslerr.la \ - fft/libgslfft.la fit/libgslfit.la histogram/libgslhistogram.la \ - ieee-utils/libgslieeeutils.la integration/libgslintegration.la \ + fft/libgslfft.la filter/libgslfilter.la fit/libgslfit.la \ + histogram/libgslhistogram.la ieee-utils/libgslieeeutils.la \ + integration/libgslintegration.la \ interpolation/libgslinterpolation.la linalg/libgsllinalg.la \ matrix/libgslmatrix.la min/libgslmin.la monte/libgslmonte.la \ multifit/libgslmultifit.la \ @@ -618,9 +619,10 @@ poly/libgslpoly.la qrng/libgslqrng.la randist/libgslrandist.la \ rng/libgslrng.la roots/libgslroots.la siman/libgslsiman.la \ sort/libgslsort.la specfunc/libgslspecfunc.la \ - rstat/libgslrstat.la statistics/libgslstatistics.la \ - sum/libgslsum.la sys/libgslsys.la test/libgsltest.la \ - utils/libutils.la vector/libgslvector.la cdf/libgslcdf.la \ + movstat/libgslmovstat.la rstat/libgslrstat.la \ + statistics/libgslstatistics.la sum/libgslsum.la \ + sys/libgslsys.la test/libgsltest.la utils/libutils.la \ + vector/libgslvector.la cdf/libgslcdf.la \ wavelet/libgslwavelet.la spmatrix/libgslspmatrix.la \ spblas/libgslspblas.la splinalg/libgslsplinalg.la pkginclude_HEADERS = gsl_math.h gsl_pow_int.h gsl_nan.h gsl_machine.h gsl_mode.h gsl_precision.h gsl_types.h gsl_version.h gsl_minmax.h gsl_inline.h diff -Nru gsl-2.4+dfsg/matrix/Makefile.am gsl-2.5+dfsg/matrix/Makefile.am --- gsl-2.4+dfsg/matrix/Makefile.am 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/matrix/Makefile.am 2018-06-03 00:44:09.000000000 +0000 @@ -15,7 +15,7 @@ test_static_SOURCES = test_static.c -CLEANFILES = test.txt test.dat +CLEANFILES = test.txt test.dat test_static.dat noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c diff -Nru gsl-2.4+dfsg/matrix/Makefile.in gsl-2.5+dfsg/matrix/Makefile.in --- gsl-2.4+dfsg/matrix/Makefile.in 2017-06-19 12:55:39.000000000 +0000 +++ gsl-2.5+dfsg/matrix/Makefile.in 2018-06-13 20:31:03.000000000 +0000 @@ -536,7 +536,7 @@ test_static_LDADD = libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c test_static_SOURCES = test_static.c -CLEANFILES = test.txt test.dat +CLEANFILES = test.txt test.dat test_static.dat noinst_HEADERS = init_source.c file_source.c rowcol_source.c swap_source.c copy_source.c test_complex_source.c test_source.c minmax_source.c prop_source.c oper_source.c getset_source.c view_source.c submatrix_source.c oper_complex_source.c libgslmatrix_la_SOURCES = init.c matrix.c file.c rowcol.c swap.c copy.c minmax.c prop.c oper.c getset.c view.c submatrix.c view.h all: all-am diff -Nru gsl-2.4+dfsg/matrix/test_complex_source.c gsl-2.5+dfsg/matrix/test_complex_source.c --- gsl-2.4+dfsg/matrix/test_complex_source.c 2017-06-14 14:07:50.000000000 +0000 +++ gsl-2.5+dfsg/matrix/test_complex_source.c 2017-07-23 14:03:11.000000000 +0000 @@ -246,36 +246,44 @@ { TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); - size_t i, j; - int k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif /* write file */ + { + FILE *f = fopen(filename, "w"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - BASE z; - k++; - GSL_REAL (z) = (ATOMIC) k; - GSL_IMAG (z) = (ATOMIC) (k + 1000); - FUNCTION (gsl_matrix, set) (m, i, j, z); - } - } - - FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } - /* read file */ + FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); - rewind(f); + fclose(f); + } + /* read file */ { + FILE *f = fopen(filename, "r"); TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); status = 0; FUNCTION (gsl_matrix, fscanf) (f, mm); + k = 0; for (i = 0; i < M; i++) { @@ -291,9 +299,10 @@ gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); FUNCTION (gsl_matrix, free) (mm); + + fclose (f); } - fclose (f); FUNCTION (gsl_matrix, free) (m); } #endif @@ -303,36 +312,44 @@ { TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); - size_t i, j; - int k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif /* write file */ + { + FILE *f = fopen(filename, "wb"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - BASE z = ZERO; - k++; - GSL_REAL (z) = (ATOMIC) k; - GSL_IMAG (z) = (ATOMIC) (k + 1000); - FUNCTION (gsl_matrix, set) (m, i, j, z); - } - } - - FUNCTION (gsl_matrix, fwrite) (f, m); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (m, i, j, z); + } + } - /* read file */ + FUNCTION (gsl_matrix, fwrite) (f, m); - rewind(f); + fclose(f); + } + /* read file */ { + FILE *f = fopen(filename, "rb"); TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); status = 0; FUNCTION (gsl_matrix, fread) (f, mm); + k = 0; for (i = 0; i < M; i++) { @@ -348,9 +365,9 @@ gsl_test (status, NAME (gsl_matrix) "_write and read"); FUNCTION (gsl_matrix, free) (mm); - } - fclose (f); + fclose (f); + } FUNCTION (gsl_matrix, free) (m); } @@ -361,37 +378,45 @@ TYPE (gsl_matrix) * l = FUNCTION (gsl_matrix, calloc) (M+1, N+1); VIEW (gsl_matrix, view) m = FUNCTION (gsl_matrix, submatrix) (l, 0, 0, M, N); - size_t i, j; - int k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif /* write file */ + { + FILE *f = fopen(filename, "wb"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - BASE z = ZERO; - k++; - GSL_REAL (z) = (ATOMIC) k; - GSL_IMAG (z) = (ATOMIC) (k + 1000); - FUNCTION (gsl_matrix, set) (&m.matrix, i, j, z); - } - } - - FUNCTION (gsl_matrix, fwrite) (f, &m.matrix); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + BASE z = ZERO; + k++; + GSL_REAL (z) = (ATOMIC) k; + GSL_IMAG (z) = (ATOMIC) (k + 1000); + FUNCTION (gsl_matrix, set) (&m.matrix, i, j, z); + } + } - /* read file */ + FUNCTION (gsl_matrix, fwrite) (f, &m.matrix); - rewind(f); + fclose(f); + } + /* read file */ { + FILE *f = fopen(filename, "rb"); TYPE (gsl_matrix) * ll = FUNCTION (gsl_matrix, alloc) (M+1, N+1); VIEW (gsl_matrix, view) mm = FUNCTION (gsl_matrix, submatrix) (ll, 0, 0, M, N); status = 0; FUNCTION (gsl_matrix, fread) (f, &mm.matrix); + k = 0; for (i = 0; i < M; i++) { @@ -407,9 +432,10 @@ gsl_test (status, NAME (gsl_matrix) "_write and read (noncontiguous)"); FUNCTION (gsl_matrix, free) (ll); + + fclose (f); } - fclose (f); FUNCTION (gsl_matrix, free) (l); } diff -Nru gsl-2.4+dfsg/matrix/test_source.c gsl-2.5+dfsg/matrix/test_source.c --- gsl-2.4+dfsg/matrix/test_source.c 2017-06-14 14:08:44.000000000 +0000 +++ gsl-2.5+dfsg/matrix/test_source.c 2017-07-23 14:03:11.000000000 +0000 @@ -619,33 +619,42 @@ { TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, alloc) (M, N); - size_t i, j; - int k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif - /* write file */ + { + /* write file */ + FILE *f = fopen(filename, "w"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - k++; - FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); - } - } + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } - FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); + FUNCTION (gsl_matrix, fprintf) (f, m, OUT_FORMAT); - /* read file */ + fclose(f); + } - rewind(f); + /* read file */ { + FILE *f = fopen(filename, "r"); TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); status = 0; FUNCTION (gsl_matrix, fscanf) (f, mm); + k = 0; for (i = 0; i < M; i++) { @@ -660,9 +669,9 @@ gsl_test (status, NAME (gsl_matrix) "_fprintf and fscanf"); FUNCTION (gsl_matrix, free) (mm); - } - fclose (f); + fclose (f); + } FUNCTION (gsl_matrix, free) (m); } @@ -673,33 +682,41 @@ { TYPE (gsl_matrix) * m = FUNCTION (gsl_matrix, calloc) (M, N); - size_t i, j; - size_t k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif /* write file */ + { + FILE *f = fopen(filename, "wb"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - k++; - FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); - } - } - - FUNCTION (gsl_matrix, fwrite) (f, m); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (m, i, j, (BASE) k); + } + } - /* read file */ + FUNCTION (gsl_matrix, fwrite) (f, m); - rewind(f); + fclose(f); + } + /* read file */ { + FILE *f = fopen(filename, "rb"); TYPE (gsl_matrix) * mm = FUNCTION (gsl_matrix, alloc) (M, N); status = 0; FUNCTION (gsl_matrix, fread) (f, mm); + k = 0; for (i = 0; i < M; i++) { @@ -714,9 +731,9 @@ gsl_test (status, NAME (gsl_matrix) "_write and read"); FUNCTION (gsl_matrix, free) (mm); - } - fclose (f); + fclose (f); + } FUNCTION (gsl_matrix, free) (m); } @@ -727,34 +744,42 @@ TYPE (gsl_matrix) * l = FUNCTION (gsl_matrix, calloc) (M+1, N+1); VIEW (gsl_matrix, view) m = FUNCTION (gsl_matrix, submatrix) (l, 0, 0, M, N); - size_t i, j; - size_t k = 0; + size_t i, j, k; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif /* write file */ + { + FILE *f = fopen(filename, "wb"); - for (i = 0; i < M; i++) - { - for (j = 0; j < N; j++) - { - k++; - FUNCTION (gsl_matrix, set) (&m.matrix, i, j, (BASE) k); - } - } - - FUNCTION (gsl_matrix, fwrite) (f, &m.matrix); + k = 0; + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + k++; + FUNCTION (gsl_matrix, set) (&m.matrix, i, j, (BASE) k); + } + } - /* read file */ + FUNCTION (gsl_matrix, fwrite) (f, &m.matrix); - rewind(f); + fclose(f); + } + /* read file */ { + FILE *f = fopen(filename, "rb"); TYPE (gsl_matrix) * ll = FUNCTION (gsl_matrix, alloc) (M+1, N+1); VIEW (gsl_matrix, view) mm = FUNCTION (gsl_matrix, submatrix) (ll, 0, 0, M, N); status = 0; FUNCTION (gsl_matrix, fread) (f, &mm.matrix); + k = 0; for (i = 0; i < M; i++) { @@ -769,9 +794,9 @@ gsl_test (status, NAME (gsl_matrix) "_write and read (noncontiguous)"); FUNCTION (gsl_matrix, free) (ll); - } - fclose (f); + fclose (f); + } FUNCTION (gsl_matrix, free) (l); } diff -Nru gsl-2.4+dfsg/movstat/alloc.c gsl-2.5+dfsg/movstat/alloc.c --- gsl-2.4+dfsg/movstat/alloc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/alloc.c 2018-05-23 16:01:41.000000000 +0000 @@ -0,0 +1,154 @@ +/* movstat/alloc.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_alloc() + Allocate a workspace for moving window statistics. +The window around sample x_i is defined as: + +W_i^{H,J} = {x_{i-H},...,x_i,...x_{i+J}} + +The total window size is: + +K = H + J + 1 + +Inputs: K - total samples in window (H = J = K / 2) + +Return: pointer to workspace + +Notes: +1) If K is even, it is rounded up to the next odd +*/ + +gsl_movstat_workspace * +gsl_movstat_alloc(const size_t K) +{ + const size_t H = K / 2; + return gsl_movstat_alloc_with_size(0, H, H); +} + +/* +gsl_movstat_alloc2() + Allocate a workspace for moving window statistics. +The window around sample x_i is defined as: + +W_i^{H,J} = {x_{i-H},...,x_i,...x_{i+J}} + +The total window size is: + +K = H + J + 1 + +Inputs: H - number of samples before current sample + J - number of samples after current sample + +Return: pointer to workspace +*/ + +gsl_movstat_workspace * +gsl_movstat_alloc2(const size_t H, const size_t J) +{ + return gsl_movstat_alloc_with_size(0, H, J); +} + +/* +gsl_movstat_alloc_with_size() + Allocate a workspace for moving window statistics with predefined workspace +size for accumulators. The window around sample x_i is defined as: + +W_i^{H,J} = {x_{i-H},...,x_i,...x_{i+J}} + +The total window size is: + +K = H + J + 1 + +Inputs: accum_state_size - state size for accumulator (set to zero to use default value) + H - number of samples before current sample + J - number of samples after current sample + +Return: pointer to workspace +*/ + +gsl_movstat_workspace * +gsl_movstat_alloc_with_size(const size_t accum_state_size, const size_t H, const size_t J) +{ + gsl_movstat_workspace *w; + size_t state_size = accum_state_size; + + w = calloc(1, sizeof(gsl_movstat_workspace)); + if (w == 0) + { + GSL_ERROR_NULL ("failed to allocate space for workspace", GSL_ENOMEM); + } + + w->H = H; + w->J = J; + w->K = H + J + 1; + + if (state_size == 0) + { + /* + * determine maximum number of bytes needed for the various accumulators; + * the accumulators will all share the same workspace + */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_mad->size)(w->K)); /* MAD accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_mean->size)(w->K)); /* mean/variance/sd accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_min->size)(w->K)); /* min/max accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_sum->size)(w->K)); /* sum accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_median->size)(w->K)); /* median accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_Qn->size)(w->K)); /* Q_n accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_qqr->size)(w->K)); /* QQR accumulator */ + state_size = GSL_MAX(state_size, (gsl_movstat_accum_Sn->size)(w->K)); /* S_n accumulator */ + } + + w->state = malloc(state_size); + if (w->state == 0) + { + gsl_movstat_free(w); + GSL_ERROR_NULL ("failed to allocate space for accumulator state", GSL_ENOMEM); + } + + w->work = malloc(w->K * sizeof(double)); + if (w->work == 0) + { + gsl_movstat_free(w); + GSL_ERROR_NULL ("failed to allocate space for work", GSL_ENOMEM); + } + + w->state_size = state_size; + + return w; +} + +void +gsl_movstat_free(gsl_movstat_workspace * w) +{ + if (w->work) + free(w->work); + + if (w->state) + free(w->state); + + free(w); +} diff -Nru gsl-2.4+dfsg/movstat/apply.c gsl-2.5+dfsg/movstat/apply.c --- gsl-2.4+dfsg/movstat/apply.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/apply.c 2018-05-03 16:12:22.000000000 +0000 @@ -0,0 +1,210 @@ +/* movstat/apply.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_apply_accum() + Apply moving window statistic to input vector. This is a generalized +routine to handle window endpoints and apply a given accumulator to +the input vector. + +Inputs: endtype - end point handling criteria + x - input vector, size n + accum - accumulator to apply moving window statistic + accum_params - parameters to pass to accumulator + y - output vector, size n + z - second output vector (i.e. minmax), size n; can be NULL + w - workspace + +Notes: +1) It is allowed to have x = y for in-place moving statistics +*/ + +int +gsl_movstat_apply_accum(const gsl_movstat_end_t endtype, + const gsl_vector * x, + const gsl_movstat_accum * accum, + void * accum_params, + gsl_vector * y, + gsl_vector * z, + gsl_movstat_workspace * w) +{ + if (x->size != y->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else if (z != NULL && x->size != z->size) + { + GSL_ERROR("input and output vectors must have same length", GSL_EBADLEN); + } + else + { + const int n = (int) x->size; + const int H = w->H; /* number of samples to left of current sample */ + const int J = w->J; /* number of samples to right of current sample */ + int i; + double x1 = 0.0; /* pad values for data edges */ + double xN = 0.0; + double result[2]; + + /* initialize accumulator */ + (accum->init)(w->K, w->state); + + /* pad initial window if necessary */ + if (endtype != GSL_MOVSTAT_END_TRUNCATE) + { + if (endtype == GSL_MOVSTAT_END_PADZERO) + { + x1 = 0.0; + xN = 0.0; + } + else if (endtype == GSL_MOVSTAT_END_PADVALUE) + { + x1 = gsl_vector_get(x, 0); + xN = gsl_vector_get(x, n - 1); + } + + /* pad initial windows with H values */ + for (i = 0; i < H; ++i) + (accum->insert)(x1, w->state); + } + else if (accum->delete == NULL) /* FIXME XXX */ + { + /* save last K - 1 samples of x for later (needed for in-place input/output) */ + int idx1 = GSL_MAX(n - J - H, 0); + int idx2 = n - 1; + + for (i = idx1; i <= idx2; ++i) + w->work[i - idx1] = gsl_vector_get(x, i); + } + + /* process input vector and fill y(0:n - J - 1) */ + for (i = 0; i < n; ++i) + { + double xi = gsl_vector_get(x, i); + int idx = i - J; + + (accum->insert)(xi, w->state); + + if (idx >= 0) + { + (accum->get)(accum_params, result, w->state); + gsl_vector_set(y, idx, result[0]); + + if (z != NULL) + gsl_vector_set(z, idx, result[1]); + } + } + + if (endtype == GSL_MOVSTAT_END_TRUNCATE) + { + /* need to fill y(n-J:n-1) using shrinking windows */ + int idx1 = GSL_MAX(n - J, 0); + int idx2 = n - 1; + + if (accum->delete == NULL) + { + int wsize = n - GSL_MAX(n - J - H, 0); /* size of work array */ + + for (i = idx1; i <= idx2; ++i) + { + int nsamp = n - GSL_MAX(i - H, 0); /* number of samples in this window */ + int j; + + (accum->init)(w->K, w->state); + + for (j = wsize - nsamp; j < wsize; ++j) + (accum->insert)(w->work[j], w->state); + + /* yi = acc_get [ work(i:K-2) ] */ + (accum->get)(accum_params, result, w->state); + gsl_vector_set(y, i, result[0]); + + if (z != NULL) + gsl_vector_set(z, i, result[1]); + } + } + else + { + for (i = idx1; i <= idx2; ++i) + { + if (i - H > 0) + { + /* delete oldest window sample as we move closer to edge */ + (accum->delete)(w->state); + } + + /* yi = acc_get [ work(i:K-2) ] */ + (accum->get)(accum_params, result, w->state); + gsl_vector_set(y, i, result[0]); + + if (z != NULL) + gsl_vector_set(z, i, result[1]); + } + } + } + else + { + /* pad final windows and fill y(n-J:n-1) */ + for (i = 0; i < J; ++i) + { + int idx = n - J + i; + + (accum->insert)(xN, w->state); + + if (idx >= 0) + { + (accum->get)(accum_params, result, w->state); + gsl_vector_set(y, idx, result[0]); + + if (z != NULL) + gsl_vector_set(z, idx, result[1]); + } + } + } + + return GSL_SUCCESS; + } +} + +/* +gsl_movstat_apply() + Apply user-defined moving window function to input vector + +Inputs: endtype - end point handling criteria + F - user-defined function + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_apply(const gsl_movstat_end_t endtype, const gsl_movstat_function * F, + const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_userfunc, (void *) F, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/deque.c gsl-2.5+dfsg/movstat/deque.c --- gsl-2.4+dfsg/movstat/deque.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/deque.c 2018-05-03 16:08:38.000000000 +0000 @@ -0,0 +1,228 @@ +/* movstat/deque.c + * + * Double-ended queue based on a circular buffer + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +typedef int deque_type_t; + +typedef struct +{ + int head; + int tail; + int size; /* total elements allocated */ + deque_type_t *array; +} deque; + +static size_t deque_size(const size_t n); +static int deque_init(const size_t n, deque * d); +static int deque_empty(deque * d); +static int deque_is_empty(const deque * d); +static int deque_is_full(const deque * d); +static int deque_push_front(const deque_type_t x, deque * d); +static int deque_push_back(const deque_type_t x, deque * d); +static int deque_pop_front(deque * d); +static int deque_pop_back(deque * d); +static deque_type_t deque_peek_front(const deque * d); +static deque_type_t deque_peek_back(const deque * d); + +static size_t +deque_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(deque); + size += n * sizeof(deque_type_t); /* array */ + + return size; +} + +static int +deque_init(const size_t n, deque * d) +{ + d->head = -1; + d->tail = 0; + d->size = (int) n; + d->array = (deque_type_t *) ((unsigned char *) d + sizeof(deque)); + + return GSL_SUCCESS; +} + +/* empty the queue */ +static int +deque_empty(deque * d) +{ + d->head = -1; + d->tail = 0; + return GSL_SUCCESS; +} + +/* check if queue is empty */ +static int +deque_is_empty(const deque * d) +{ + return (d->head == -1); +} + +/* check if queue is full */ +static int +deque_is_full(const deque * d) +{ + return ((d->head == 0 && d->tail == d->size - 1) || + (d->head == d->tail + 1)); +} + +static int +deque_push_front(const deque_type_t x, deque * d) +{ + if (deque_is_full(d)) + { + GSL_ERROR("deque is full", GSL_EOVRFLW); + } + else + { + if (d->head == -1) /* queue is empty */ + { + d->head = 0; + d->tail = 0; + } + else if (d->head == 0) /* head is in first position, wrap to end */ + { + d->head = d->size - 1; + } + else /* decrement head */ + { + --(d->head); + } + + /* insert element */ + d->array[d->head] = x; + + return GSL_SUCCESS; + } +} + +static int +deque_push_back(const deque_type_t x, deque * d) +{ + if (deque_is_full(d)) + { + GSL_ERROR("deque is full", GSL_EOVRFLW); + } + else + { + if (d->head == -1) /* queue is empty */ + { + d->head = 0; + d->tail = 0; + } + else if (d->tail == d->size - 1) /* tail is in last position, wrap to 0 */ + { + d->tail = 0; + } + else /* increment tail */ + { + ++(d->tail); + } + + /* insert element */ + d->array[d->tail] = x; + + return GSL_SUCCESS; + } +} + +static int +deque_pop_front(deque * d) +{ + if (deque_is_empty(d)) + { + GSL_ERROR("cannot pop element from empty queue", GSL_EOVRFLW); + } + else + { + if (d->head == d->tail) /* queue has only one element */ + { + d->head = -1; + d->tail = -1; + } + else if (d->head == d->size - 1) /* head is in last position, wrap to 0 */ + { + d->head = 0; + } + else /* increment head */ + { + ++(d->head); + } + + return GSL_SUCCESS; + } +} + +static int +deque_pop_back(deque * d) +{ + if (deque_is_empty(d)) + { + GSL_ERROR("cannot pop element from empty queue", GSL_EOVRFLW); + } + else + { + if (d->head == d->tail) /* queue has only one element */ + { + d->head = -1; + d->tail = -1; + } + else if (d->tail == 0) /* tail is in first position, wrap to end */ + { + d->tail = d->size - 1; + } + else /* decrement tail */ + { + --(d->tail); + } + + return GSL_SUCCESS; + } +} + +static deque_type_t +deque_peek_front(const deque * d) +{ + if (deque_is_empty(d)) + { + GSL_ERROR("queue is empty", GSL_EBADLEN); + } + else + { + return d->array[d->head]; + } +} + +static deque_type_t +deque_peek_back(const deque * d) +{ + if (deque_is_empty(d) || d->tail < 0) + { + GSL_ERROR("queue is empty", GSL_EBADLEN); + } + else + { + return d->array[d->tail]; + } +} diff -Nru gsl-2.4+dfsg/movstat/fill.c gsl-2.5+dfsg/movstat/fill.c --- gsl-2.4+dfsg/movstat/fill.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/fill.c 2018-05-02 20:45:20.000000000 +0000 @@ -0,0 +1,101 @@ +/* movstat/fill.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_fill() + Fill window for sample 'idx' from x using given end conditions + +Inputs: endtype - how to handle end points + x - input vector, length n + idx - index of center sample in window in [0,n-1] + H - number of samples left of center to include + J - number of samples right of center to include + window - (output) window of samples centered on x_{idx}, + W_{idx}^{H,J}, length H + J + 1 + +Return: size of filled window (<= H + J + 1) +*/ + +size_t +gsl_movstat_fill(const gsl_movstat_end_t endtype, const gsl_vector * x, const size_t idx, + const size_t H, const size_t J, double * window) +{ + if (idx >= x->size) + { + GSL_ERROR_VAL ("window center index must be between 0 and n - 1", GSL_EDOM, 0); + } + else + { + const int n = (int) x->size; + const int iidx = (int) idx; + const int iH = (int) H; + const int iJ = (int) J; + int idx1, idx2, j; + size_t window_size; + + if (endtype == GSL_MOVSTAT_END_TRUNCATE) + { + idx1 = GSL_MAX(iidx - iH, 0); + idx2 = GSL_MIN(iidx + iJ, n - 1); + } + else + { + idx1 = iidx - iH; + idx2 = iidx + iJ; + } + + window_size = (size_t) (idx2 - idx1 + 1); + + /* fill sliding window */ + for (j = idx1; j <= idx2; ++j) + { + int widx = j - idx1; + + if (j < 0) + { + /* initial condition */ + if (endtype == GSL_MOVSTAT_END_PADZERO) + window[widx] = 0.0; + else if (endtype == GSL_MOVSTAT_END_PADVALUE) + window[widx] = gsl_vector_get(x, 0); + } + else if (j >= n) + { + if (endtype == GSL_MOVSTAT_END_PADZERO) + window[widx] = 0.0; + else if (endtype == GSL_MOVSTAT_END_PADVALUE) + window[widx] = gsl_vector_get(x, n - 1); + } + else + { + window[widx] = gsl_vector_get(x, j); + } + } + + return window_size; + } +} diff -Nru gsl-2.4+dfsg/movstat/funcacc.c gsl-2.5+dfsg/movstat/funcacc.c --- gsl-2.4+dfsg/movstat/funcacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/funcacc.c 2018-05-03 16:12:16.000000000 +0000 @@ -0,0 +1,109 @@ +/* movstat/funcacc.c + * + * Moving window accumulator for arbitrary user-defined function + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef double funcacc_type_t; +typedef funcacc_type_t ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + funcacc_type_t *window; /* linear array for current window */ + ringbuf *rbuf; /* ring buffer storing current window */ +} funcacc_state_t; + +static size_t +funcacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(funcacc_state_t); + size += n * sizeof(funcacc_type_t); + size += ringbuf_size(n); + + return size; +} + +static int +funcacc_init(const size_t n, void * vstate) +{ + funcacc_state_t * state = (funcacc_state_t *) vstate; + + state->window = (funcacc_type_t *) ((unsigned char *) vstate + sizeof(funcacc_state_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->window + n * sizeof(funcacc_type_t)); + + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +funcacc_insert(const funcacc_type_t x, void * vstate) +{ + funcacc_state_t * state = (funcacc_state_t *) vstate; + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +funcacc_delete(void * vstate) +{ + funcacc_state_t * state = (funcacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +static int +funcacc_get(void * params, funcacc_type_t * result, const void * vstate) +{ + const funcacc_state_t * state = (const funcacc_state_t *) vstate; + gsl_movstat_function *f = (gsl_movstat_function *) params; + size_t n = ringbuf_copy(state->window, state->rbuf); + + *result = GSL_MOVSTAT_FN_EVAL(f, n, state->window); + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum func_accum_type = +{ + funcacc_size, + funcacc_init, + funcacc_insert, + funcacc_delete, + funcacc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_userfunc = &func_accum_type; diff -Nru gsl-2.4+dfsg/movstat/gsl_movstat.h gsl-2.5+dfsg/movstat/gsl_movstat.h --- gsl-2.4+dfsg/movstat/gsl_movstat.h 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/gsl_movstat.h 2018-05-23 15:34:31.000000000 +0000 @@ -0,0 +1,138 @@ +/* movstat/gsl_movstat.h + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#ifndef __GSL_MOVSTAT_H__ +#define __GSL_MOVSTAT_H__ + +#include +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + +typedef enum +{ + GSL_MOVSTAT_END_PADZERO, + GSL_MOVSTAT_END_PADVALUE, + GSL_MOVSTAT_END_TRUNCATE +} gsl_movstat_end_t; + +/* accumulator struct + * size - return number of bytes needed for accumulator with maximum of n elements + * init - initialize accumulator state + * insert - insert a single sample into accumulator; if there are already n + * samples in accumulator, oldest sample is overwritten + * delete - delete oldest sample from accumulator + * get - return accumulated value + */ +typedef struct +{ + size_t (*size) (const size_t n); + int (*init) (const size_t n, void * vstate); + int (*insert) (const double x, void * vstate); + int (*delete) (void * vstate); + int (*get) (void * params, double * result, const void * vstate); +} gsl_movstat_accum; + +typedef struct +{ + double (* function) (const size_t n, double x[], void * params); + void * params; +} gsl_movstat_function; + +#define GSL_MOVSTAT_FN_EVAL(F,n,x) (*((F)->function))((n),(x),(F)->params) + +/* workspace for moving window statistics */ + +typedef struct +{ + size_t H; /* number of previous samples in window */ + size_t J; /* number of after samples in window */ + size_t K; /* window size K = H + J + 1 */ + double *work; /* workspace, size K */ + void *state; /* state workspace for various accumulators */ + size_t state_size; /* bytes allocated for 'state' */ +} gsl_movstat_workspace; + +/* alloc.c */ + +gsl_movstat_workspace *gsl_movstat_alloc(const size_t K); +gsl_movstat_workspace *gsl_movstat_alloc2(const size_t H, const size_t J); +gsl_movstat_workspace *gsl_movstat_alloc_with_size(const size_t accum_state_size, const size_t H, const size_t J); +void gsl_movstat_free(gsl_movstat_workspace * w); + +/* apply.c */ +int gsl_movstat_apply_accum(const gsl_movstat_end_t endtype, const gsl_vector * x, + const gsl_movstat_accum * accum, void * accum_params, + gsl_vector * y, gsl_vector * z, + gsl_movstat_workspace * w); +int gsl_movstat_apply(const gsl_movstat_end_t endtype, const gsl_movstat_function * F, + const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); + +/* fill.c */ +size_t gsl_movstat_fill(const gsl_movstat_end_t endtype, const gsl_vector * x, const size_t idx, + const size_t H, const size_t J, double * window); + +int gsl_movstat_mean(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_variance(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_sd(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_median(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_min(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_max(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); +int gsl_movstat_minmax(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y_min, gsl_vector * y_max, gsl_movstat_workspace * w); +int gsl_movstat_mad0(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * xmedian, + gsl_vector * xmad, gsl_movstat_workspace * w); +int gsl_movstat_mad(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * xmedian, + gsl_vector * xmad, gsl_movstat_workspace * w); +int gsl_movstat_qqr(const gsl_movstat_end_t endtype, const gsl_vector * x, const double q, + gsl_vector * xqqr, gsl_movstat_workspace * w); +int gsl_movstat_Sn(const gsl_movstat_end_t endtype, const gsl_vector * x, + gsl_vector * xscale, gsl_movstat_workspace * w); +int gsl_movstat_Qn(const gsl_movstat_end_t endtype, const gsl_vector * x, + gsl_vector * xscale, gsl_movstat_workspace * w); +int gsl_movstat_sum(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w); + +/* accumulator variables */ + +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_mad; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_max; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_mean; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_median; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_min; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_minmax; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_sd; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_Sn; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_sum; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_Qn; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_qqr; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_userfunc; +GSL_VAR const gsl_movstat_accum * gsl_movstat_accum_variance; + +__END_DECLS + +#endif /* __GSL_MOVSTAT_H__ */ diff -Nru gsl-2.4+dfsg/movstat/madacc.c gsl-2.5+dfsg/movstat/madacc.c --- gsl-2.4+dfsg/movstat/madacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/madacc.c 2018-05-23 17:08:54.000000000 +0000 @@ -0,0 +1,158 @@ +/* movstat/madacc.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +/* + * This module contains routines for computing the median absolute deviation (MAD) + * of a moving fixed-sized window. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef double madacc_type_t; +typedef madacc_type_t ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + size_t n; /* window size */ + const gsl_movstat_accum *medacc; /* median accumulator */ + void *median_state; /* median accumulator workspace */ + ringbuf *rbuf; /* ring buffer storing current window, size n */ + madacc_type_t *work; /* workspace, size n */ +} madacc_state_t; + +static size_t madacc_size(const size_t n); +static int madacc_init(const size_t n, void * vstate); +static int madacc_insert(const madacc_type_t x, void * vstate); +static int madacc_delete(void * vstate); +static int madacc_medmad(void * params, madacc_type_t * result, const void * vstate); + +static size_t +madacc_size(const size_t n) +{ + size_t size = 0; + const gsl_movstat_accum * acc = gsl_movstat_accum_median; + + size += sizeof(madacc_state_t); + size += (acc->size)(n); /* median accumulator */ + size += ringbuf_size(n); /* rbuf */ + size += n * sizeof(madacc_type_t); /* work */ + + return size; +} + +static int +madacc_init(const size_t n, void * vstate) +{ + madacc_state_t * state = (madacc_state_t *) vstate; + + state->n = n; + state->medacc = gsl_movstat_accum_median; + + state->median_state = (void *) ((unsigned char *) vstate + sizeof(madacc_state_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->median_state + (state->medacc->size)(n)); + state->work = (madacc_type_t *) ((unsigned char *) state->rbuf + ringbuf_size(n)); + + (state->medacc->init)(n, state->median_state); + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +madacc_insert(const madacc_type_t x, void * vstate) +{ + madacc_state_t * state = (madacc_state_t *) vstate; + + /* insert element into median accumulator */ + (state->medacc->insert)(x, state->median_state); + + /* insert element into ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +madacc_delete(void * vstate) +{ + madacc_state_t * state = (madacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +static int +madacc_medmad(void * params, madacc_type_t * result, const void * vstate) +{ + const madacc_state_t * state = (const madacc_state_t *) vstate; + + if (ringbuf_is_empty(state->rbuf)) + { + GSL_ERROR("no samples yet added to workspace", GSL_EINVAL); + } + else + { + int status; + const double scale = *(double *) params; + const int n = ringbuf_n(state->rbuf); + int i; + double median, mad; + + /* compute median of current window */ + status = (state->medacc->get)(NULL, &median, state->median_state); + if (status) + return status; + + /* compute current window absolute deviations from median */ + for (i = 0; i < n; ++i) + { + double xi = state->rbuf->array[(state->rbuf->head + i) % state->rbuf->size]; + state->work[i] = fabs(xi - median); + } + + /* compute MAD of current window */ + mad = gsl_stats_median(state->work, 1, n); + + result[0] = median; + result[1] = scale * mad; + + return GSL_SUCCESS; + } +} + +static const gsl_movstat_accum mad_accum_type = +{ + madacc_size, + madacc_init, + madacc_insert, + NULL, /*XXX*/ + madacc_medmad +}; + +const gsl_movstat_accum *gsl_movstat_accum_mad = &mad_accum_type; diff -Nru gsl-2.4+dfsg/movstat/Makefile.am gsl-2.5+dfsg/movstat/Makefile.am --- gsl-2.4+dfsg/movstat/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/Makefile.am 2018-06-02 20:54:50.000000000 +0000 @@ -0,0 +1,36 @@ +noinst_LTLIBRARIES = libgslmovstat.la + +pkginclude_HEADERS = gsl_movstat.h + +AM_CPPFLAGS = -I$(top_srcdir) + +libgslmovstat_la_SOURCES = \ + alloc.c \ + apply.c \ + fill.c \ + funcacc.c \ + madacc.c \ + medacc.c \ + mmacc.c \ + movmad.c \ + movmean.c \ + movmedian.c \ + movminmax.c \ + movsum.c \ + movSn.c \ + movQn.c \ + movqqr.c \ + movvariance.c \ + mvacc.c \ + qnacc.c \ + qqracc.c \ + snacc.c \ + sumacc.c + +noinst_HEADERS = deque.c ringbuf.c test_mad.c test_mean.c test_median.c test_minmax.c test_Qn.c test_qqr.c test_Sn.c test_sum.c test_variance.c + +check_PROGRAMS = test +TESTS = $(check_PROGRAMS) + +test_SOURCES = test.c +test_LDADD = libgslmovstat.la ../statistics/libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../err/libgslerr.la ../test/libgsltest.la ../vector/libgslvector.la ../block/libgslblock.la ../sys/libgslsys.la ../utils/libutils.la diff -Nru gsl-2.4+dfsg/movstat/Makefile.in gsl-2.5+dfsg/movstat/Makefile.in --- gsl-2.4+dfsg/movstat/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/Makefile.in 2018-06-13 20:31:03.000000000 +0000 @@ -0,0 +1,1075 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = test$(EXEEXT) +subdir = movstat +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ + $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(top_srcdir)/test-driver TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +libgslmovstat_la_LIBADD = +am_libgslmovstat_la_OBJECTS = alloc.lo apply.lo fill.lo funcacc.lo \ + madacc.lo medacc.lo mmacc.lo movmad.lo movmean.lo movmedian.lo \ + movminmax.lo movsum.lo movSn.lo movQn.lo movqqr.lo \ + movvariance.lo mvacc.lo qnacc.lo qqracc.lo snacc.lo sumacc.lo +libgslmovstat_la_OBJECTS = $(am_libgslmovstat_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +am_test_OBJECTS = test.$(OBJEXT) +test_OBJECTS = $(am_test_OBJECTS) +test_DEPENDENCIES = libgslmovstat.la ../statistics/libgslstatistics.la \ + ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la \ + ../randist/libgslrandist.la ../rng/libgslrng.la \ + ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la \ + ../err/libgslerr.la ../test/libgsltest.la \ + ../vector/libgslvector.la ../block/libgslblock.la \ + ../sys/libgslsys.la ../utils/libutils.la +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libgslmovstat_la_SOURCES) $(test_SOURCES) +DIST_SOURCES = $(libgslmovstat_la_SOURCES) $(test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgincludedir)" +HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GSLCBLAS_LDFLAGS = @GSLCBLAS_LDFLAGS@ +GSL_CFLAGS = @GSL_CFLAGS@ +GSL_LDFLAGS = @GSL_LDFLAGS@ +GSL_LIBADD = @GSL_LIBADD@ +GSL_LIBM = @GSL_LIBM@ +GSL_LIBS = @GSL_LIBS@ +GSL_LT_CBLAS_VERSION = @GSL_LT_CBLAS_VERSION@ +GSL_LT_VERSION = @GSL_LT_VERSION@ +GSL_MAJOR_VERSION = @GSL_MAJOR_VERSION@ +GSL_MINOR_VERSION = @GSL_MINOR_VERSION@ +HAVE_AIX_IEEE_INTERFACE = @HAVE_AIX_IEEE_INTERFACE@ +HAVE_DARWIN86_IEEE_INTERFACE = @HAVE_DARWIN86_IEEE_INTERFACE@ +HAVE_DARWIN_IEEE_INTERFACE = @HAVE_DARWIN_IEEE_INTERFACE@ +HAVE_FREEBSD_IEEE_INTERFACE = @HAVE_FREEBSD_IEEE_INTERFACE@ +HAVE_GNUM68K_IEEE_INTERFACE = @HAVE_GNUM68K_IEEE_INTERFACE@ +HAVE_GNUPPC_IEEE_INTERFACE = @HAVE_GNUPPC_IEEE_INTERFACE@ +HAVE_GNUSPARC_IEEE_INTERFACE = @HAVE_GNUSPARC_IEEE_INTERFACE@ +HAVE_GNUX86_IEEE_INTERFACE = @HAVE_GNUX86_IEEE_INTERFACE@ +HAVE_HPUX11_IEEE_INTERFACE = @HAVE_HPUX11_IEEE_INTERFACE@ +HAVE_HPUX_IEEE_INTERFACE = @HAVE_HPUX_IEEE_INTERFACE@ +HAVE_IRIX_IEEE_INTERFACE = @HAVE_IRIX_IEEE_INTERFACE@ +HAVE_NETBSD_IEEE_INTERFACE = @HAVE_NETBSD_IEEE_INTERFACE@ +HAVE_OPENBSD_IEEE_INTERFACE = @HAVE_OPENBSD_IEEE_INTERFACE@ +HAVE_OS2EMX_IEEE_INTERFACE = @HAVE_OS2EMX_IEEE_INTERFACE@ +HAVE_SOLARIS_IEEE_INTERFACE = @HAVE_SOLARIS_IEEE_INTERFACE@ +HAVE_SUNOS4_IEEE_INTERFACE = @HAVE_SUNOS4_IEEE_INTERFACE@ +HAVE_TRU64_IEEE_INTERFACE = @HAVE_TRU64_IEEE_INTERFACE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +noinst_LTLIBRARIES = libgslmovstat.la +pkginclude_HEADERS = gsl_movstat.h +AM_CPPFLAGS = -I$(top_srcdir) +libgslmovstat_la_SOURCES = \ + alloc.c \ + apply.c \ + fill.c \ + funcacc.c \ + madacc.c \ + medacc.c \ + mmacc.c \ + movmad.c \ + movmean.c \ + movmedian.c \ + movminmax.c \ + movsum.c \ + movSn.c \ + movQn.c \ + movqqr.c \ + movvariance.c \ + mvacc.c \ + qnacc.c \ + qqracc.c \ + snacc.c \ + sumacc.c + +noinst_HEADERS = deque.c ringbuf.c test_mad.c test_mean.c test_median.c test_minmax.c test_Qn.c test_qqr.c test_Sn.c test_sum.c test_variance.c +TESTS = $(check_PROGRAMS) +test_SOURCES = test.c +test_LDADD = libgslmovstat.la ../statistics/libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../randist/libgslrandist.la ../rng/libgslrng.la ../specfunc/libgslspecfunc.la ../complex/libgslcomplex.la ../err/libgslerr.la ../test/libgsltest.la ../vector/libgslvector.la ../block/libgslblock.la ../sys/libgslsys.la ../utils/libutils.la +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu movstat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu movstat/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgslmovstat.la: $(libgslmovstat_la_OBJECTS) $(libgslmovstat_la_DEPENDENCIES) $(EXTRA_libgslmovstat_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) $(libgslmovstat_la_OBJECTS) $(libgslmovstat_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES) + @rm -f test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/apply.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fill.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/madacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/medacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movQn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movSn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movmad.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movmean.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movmedian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movminmax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movqqr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movsum.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movvariance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qnacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qqracc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sumacc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-pkgincludeHEADERS: $(pkginclude_HEADERS) + @$(NORMAL_INSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ + done + +uninstall-pkgincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test.log: test$(EXEEXT) + @p='test$(EXEEXT)'; \ + b='test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-pkgincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkgincludeHEADERS + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkgincludeHEADERS \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + recheck tags tags-am uninstall uninstall-am \ + uninstall-pkgincludeHEADERS + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru gsl-2.4+dfsg/movstat/medacc.c gsl-2.5+dfsg/movstat/medacc.c --- gsl-2.4+dfsg/movstat/medacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/medacc.c 2018-05-03 16:11:05.000000000 +0000 @@ -0,0 +1,267 @@ +/* movstat/medacc.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + * + * Original copyright notice: + * Copyright (c) 2011 ashelly.myopenid.com under + */ + +#include +#include +#include +#include +#include +#include + +#define ItemLess(a,b) ((a)<(b)) +#define ItemMean(a,b) (((a)+(b))/2) + +#define minCt(m) (((m)->ct-1)/2) /* count of items in minheap */ +#define maxCt(m) (((m)->ct)/2) /* count of items in maxheap */ + +typedef double medacc_type_t; + +typedef struct +{ + int n; /* window size */ + int idx; /* position in circular queue */ + int ct; /* count of items in queue */ + medacc_type_t *data; /* circular queue of values, size k */ + int *pos; /* index into `heap` for each value, size 2*k */ + int *heap; /* max/median/min heap holding indices into `data` */ +} medacc_state_t; + +static size_t medacc_size(const size_t n); +static int medacc_init(const size_t n, void * vstate); +static int medacc_insert(const medacc_type_t x, void * vstate); +static int medacc_delete(void * vstate); +static int medacc_get(void * params, medacc_type_t * result, const void * vstate); + +static int mmless(const medacc_state_t * state, const int i, const int j); +static int mmexchange(medacc_state_t * state, const int i, const int j); +static int mmCmpExch(medacc_state_t * state, const int i, const int j); +static void minSortDown(medacc_state_t * state, int i); +static void maxSortDown(medacc_state_t * state, int i); +static int minSortUp(medacc_state_t * state, int i); +static int maxSortUp(medacc_state_t * state, int i); + +static size_t +medacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(medacc_state_t); + size += n * sizeof(medacc_type_t); + size += 2 * n * sizeof(int); + + return size; +} + +static int +medacc_init(const size_t n, void * vstate) +{ + medacc_state_t * state = (medacc_state_t *) vstate; + int k = (int) n; + + state->n = n; + state->ct = 0; + state->idx = 0; + + state->data = (medacc_type_t *) ((unsigned char *) vstate + sizeof(medacc_state_t)); + state->pos = (int *) ((unsigned char *) state->data + n * sizeof(medacc_type_t)); + state->heap = state->pos + n + (n/2); /* points to middle of storage */ + + /* set up initial heap fill pattern: median,max,min,max,... */ + while (k--) + { + state->pos[k] = ((k + 1)/2) * ((k & 1) ? -1 : 1); + state->heap[state->pos[k]] = k; + } + + return GSL_SUCCESS; +} + +static int +medacc_insert(const medacc_type_t x, void * vstate) +{ + medacc_state_t * state = (medacc_state_t *) vstate; + int isNew = (state->ct < (int) state->n); + int p = state->pos[state->idx]; + medacc_type_t old = state->data[state->idx]; + + state->data[state->idx] = x; + state->idx = (state->idx + 1) % state->n; + state->ct += isNew; + + if (p > 0) /* new item is in minHeap */ + { + if (!isNew && ItemLess(old, x)) + minSortDown(state, p * 2); + else if (minSortUp(state, p)) + maxSortDown(state, -1); + } + else if (p < 0) /* new item is in maxHeap */ + { + if (!isNew && ItemLess(x, old)) + maxSortDown(state, p * 2); + else if (maxSortUp(state, p)) + minSortDown(state, 1); + } + else /* new item is at median */ + { + if (maxCt(state)) + maxSortDown(state, -1); + + if (minCt(state)) + minSortDown(state, 1); + } + + return GSL_SUCCESS; +} + +static int +medacc_delete(void * vstate) +{ + medacc_state_t * state = (medacc_state_t *) vstate; + + if (state->ct > 0) + { + int p = state->pos[(state->idx - state->ct + state->n) % state->n]; + + if (p > 0) /* oldest item is in minHeap */ + { + mmexchange(state, p, minCt(state)); + --(state->ct); + minSortDown(state, 2 * p); + } + else if (p < 0) /* oldest item is in maxHeap */ + { + mmexchange(state, p, maxCt(state)); + --(state->ct); + maxSortDown(state, 2 * p); + } + else if (p == 0) /* oldest item is at median */ + { + } + } + + return GSL_SUCCESS; +} + +/* returns median (or average of 2 when item count is even) */ +static int +medacc_get(void * params, medacc_type_t * result, const void * vstate) +{ + const medacc_state_t * state = (const medacc_state_t *) vstate; + medacc_type_t median = state->data[state->heap[0]]; + + (void) params; + + if ((state->ct & 1) == 0) + median = ItemMean(median, state->data[state->heap[-1]]); + + *result = median; + + return GSL_SUCCESS; +} + +/* returns 1 if heap[i] < heap[j] */ +static int +mmless(const medacc_state_t * state, const int i, const int j) +{ + return ItemLess(state->data[state->heap[i]], state->data[state->heap[j]]); +} + +/* swaps items i and j in heap, maintains indexes */ +static int +mmexchange(medacc_state_t * state, const int i, const int j) +{ + int t = state->heap[i]; + state->heap[i] = state->heap[j]; + state->heap[j] = t; + state->pos[state->heap[i]] = i; + state->pos[state->heap[j]] = j; + return 1; +} + +/* swaps items i and j if i < j; returns true if swapped */ +static int +mmCmpExch(medacc_state_t * state, const int i, const int j) +{ + return (mmless(state, i, j) && mmexchange(state , i, j)); +} + +/* maintains minheap property for all items below i/2. */ +static void +minSortDown(medacc_state_t * state, int i) +{ + for (; i <= minCt(state); i *= 2) + { + if (i > 1 && i < minCt(state) && mmless(state, i + 1, i)) + ++i; + + if (!mmCmpExch(state, i, i / 2)) + break; + } +} + +/* maintains maxheap property for all items below i/2. (negative indexes) */ +static void +maxSortDown(medacc_state_t * state, int i) +{ + for (; i >= -maxCt(state); i *= 2) + { + if (i < -1 && i > -maxCt(state) && mmless(state, i, i - 1)) + --i; + + if (!mmCmpExch(state, i / 2, i)) + break; + } +} + +/* maintains minheap property for all items above i, including median + returns true if median changed */ +static int +minSortUp(medacc_state_t * state, int i) +{ + while (i > 0 && mmCmpExch(state, i, i / 2)) + i /= 2; + + return (i == 0); +} + +/* maintains maxheap property for all items above i, including median + returns true if median changed */ +static int +maxSortUp(medacc_state_t * state, int i) +{ + while (i<0 && mmCmpExch(state, i / 2, i)) + i /= 2; + + return (i == 0); +} + +static const gsl_movstat_accum median_accum_type = +{ + medacc_size, + medacc_init, + medacc_insert, + NULL, /* XXX FIXME */ + medacc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_median = &median_accum_type; diff -Nru gsl-2.4+dfsg/movstat/mmacc.c gsl-2.5+dfsg/movstat/mmacc.c --- gsl-2.4+dfsg/movstat/mmacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/mmacc.c 2018-05-03 16:09:49.000000000 +0000 @@ -0,0 +1,277 @@ +/* movstat/mmacc.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +/* + * This module contains routines for tracking minimum/maximum values of a + * moving fixed-sized window. It is based on the algorithm of: + * + * [1] Daniel Lemire, Streaming Maximum-Minimum Filter Using No More than Three Comparisons per Element, + * Nordic Journal of Computing, Volume 13, Number 4, pages 328-339, 2006 + * + * Also available as a preprint here: https://arxiv.org/abs/cs/0610046 + */ + +#include +#include +#include +#include +#include +#include + +typedef double mmacc_type_t; +typedef mmacc_type_t ringbuf_type_t; + +#include "deque.c" +#include "ringbuf.c" + +typedef struct +{ + size_t n; /* window size */ + size_t k; /* number of samples in current window */ + mmacc_type_t xprev; /* previous sample added to window */ + ringbuf *rbuf; /* ring buffer storing current window, size n */ + deque *minque; /* double-ended queue of min values (L) */ + deque *maxque; /* double-ended queue of max values (U) */ +} mmacc_state_t; + +static size_t mmacc_size(const size_t n); +static int mmacc_init(const size_t n, void * vstate); +static int mmacc_insert(const mmacc_type_t x, void * vstate); +static int mmacc_delete(void * vstate); +static int mmacc_min(void * params, mmacc_type_t * result, const void * vstate); +static int mmacc_max(void * params, mmacc_type_t * result, const void * vstate); +static int mmacc_minmax(void * params, mmacc_type_t * result, const void * vstate); + +static size_t +mmacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(mmacc_state_t); + size += ringbuf_size(n); /* rbuf */ + size += 2 * deque_size(n + 1); /* minque/maxque */ + + return size; +} + +static int +mmacc_init(const size_t n, void * vstate) +{ + mmacc_state_t * state = (mmacc_state_t *) vstate; + + state->n = n; + state->k = 0; + state->xprev = 0.0; + + state->rbuf = (ringbuf *) ((unsigned char *) vstate + sizeof(mmacc_state_t)); + state->minque = (deque *) ((unsigned char *) state->rbuf + ringbuf_size(n)); + state->maxque = (deque *) ((unsigned char *) state->minque + deque_size(n + 1)); + + ringbuf_init(n, state->rbuf); + deque_init(n + 1, state->minque); + deque_init(n + 1, state->maxque); + + return GSL_SUCCESS; +} + +static int +mmacc_insert(const mmacc_type_t x, void * vstate) +{ + mmacc_state_t * state = (mmacc_state_t *) vstate; + int head, tail; + + if (state->k == 0) + { + /* first sample */ + ringbuf_insert(x, state->rbuf); + head = state->rbuf->head; + deque_push_back(head, state->maxque); + deque_push_back(head, state->minque); + } + else + { + if (x > state->xprev) + { + deque_pop_back(state->maxque); + + while (!deque_is_empty(state->maxque)) + { + if (x <= state->rbuf->array[deque_peek_back(state->maxque)]) + break; + + deque_pop_back(state->maxque); + } + } + else + { + deque_pop_back(state->minque); + + while (!deque_is_empty(state->minque)) + { + if (x >= state->rbuf->array[deque_peek_back(state->minque)]) + break; + + deque_pop_back(state->minque); + } + } + + /* store new sample into ring buffer */ + tail = state->rbuf->tail; + ringbuf_insert(x, state->rbuf); + head = state->rbuf->head; + + deque_push_back(head, state->maxque); + deque_push_back(head, state->minque); + + if (state->k == state->n) + { + /* + * window is full - check if oldest window element is a global minimum/maximum + * of current window - if so pop it from U/L queues; + * the check head != tail ensures there is more than 1 element in the + * queue, do not pop if queue has only 1 element, since this element would + * be the newest sample + */ + if (state->maxque->head != state->maxque->tail && tail == deque_peek_front(state->maxque)) + deque_pop_front(state->maxque); + else if (state->minque->head != state->minque->tail && tail == deque_peek_front(state->minque)) + deque_pop_front(state->minque); + } + } + + if (state->k < state->n) + ++(state->k); + + state->xprev = x; + + return GSL_SUCCESS; +} + +static int +mmacc_delete(void * vstate) +{ + mmacc_state_t * state = (mmacc_state_t *) vstate; + + if (state->k > 0) + { + /* + * check if oldest window element is a global minimum/maximum; if so + * pop it from U/L queues + */ + if (state->rbuf->tail == deque_peek_front(state->maxque)) + deque_pop_front(state->maxque); + else if (state->rbuf->tail == deque_peek_front(state->minque)) + deque_pop_front(state->minque); + + /* remove oldest element from ring buffer */ + ringbuf_pop_back(state->rbuf); + + --(state->k); + } + + return GSL_SUCCESS; +} + +static int +mmacc_min(void * params, mmacc_type_t * result, const void * vstate) +{ + const mmacc_state_t * state = (const mmacc_state_t *) vstate; + + (void) params; + + if (state->k == 0) + { + GSL_ERROR ("no samples yet added to workspace", GSL_EINVAL); + } + else + { + *result = state->rbuf->array[deque_peek_front(state->minque)]; + return GSL_SUCCESS; + } +} + +static int +mmacc_max(void * params, mmacc_type_t * result, const void * vstate) +{ + const mmacc_state_t * state = (const mmacc_state_t *) vstate; + + (void) params; + + if (state->k == 0) + { + GSL_ERROR ("no samples yet added to workspace", GSL_EINVAL); + } + else + { + *result = state->rbuf->array[deque_peek_front(state->maxque)]; + return GSL_SUCCESS; + } +} + +static int +mmacc_minmax(void * params, mmacc_type_t * result, const void * vstate) +{ + const mmacc_state_t * state = (const mmacc_state_t *) vstate; + + (void) params; + + if (state->k == 0) + { + GSL_ERROR ("no samples yet added to workspace", GSL_EINVAL); + } + else + { + result[0] = state->rbuf->array[deque_peek_front(state->minque)]; + result[1] = state->rbuf->array[deque_peek_front(state->maxque)]; + return GSL_SUCCESS; + } +} + +static const gsl_movstat_accum min_accum_type = +{ + mmacc_size, + mmacc_init, + mmacc_insert, + mmacc_delete, + mmacc_min +}; + +const gsl_movstat_accum *gsl_movstat_accum_min = &min_accum_type; + +static const gsl_movstat_accum max_accum_type = +{ + mmacc_size, + mmacc_init, + mmacc_insert, + mmacc_delete, + mmacc_max +}; + +const gsl_movstat_accum *gsl_movstat_accum_max = &max_accum_type; + +static const gsl_movstat_accum minmax_accum_type = +{ + mmacc_size, + mmacc_init, + mmacc_insert, + mmacc_delete, + mmacc_minmax +}; + +const gsl_movstat_accum *gsl_movstat_accum_minmax = &minmax_accum_type; diff -Nru gsl-2.4+dfsg/movstat/movmad.c gsl-2.5+dfsg/movstat/movmad.c --- gsl-2.4+dfsg/movstat/movmad.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movmad.c 2018-05-23 17:15:52.000000000 +0000 @@ -0,0 +1,96 @@ +/* movstat/movmad.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_mad() + Apply a moving MAD to an input vector (with scale factor to make an +unbiased estimate of sigma) + +Inputs: endtype - how to handle end points + x - input vector, size n + xmedian - (output) vector of median values of x, size n + xmedian_i = median of window centered on x_i + xmad - (output) vector of estimated standard deviations of x, size n + xmad_i = MAD of i-th window: 1.4826 * median(|x_i - xmedian_i|) + w - workspace +*/ + +int +gsl_movstat_mad(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * xmedian, gsl_vector * xmad, + gsl_movstat_workspace * w) +{ + if (x->size != xmedian->size) + { + GSL_ERROR("x and xmedian vectors must have same length", GSL_EBADLEN); + } + else if (x->size != xmad->size) + { + GSL_ERROR("x and xmad vectors must have same length", GSL_EBADLEN); + } + else + { + double scale = 1.482602218505602; + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_mad, &scale, xmedian, xmad, w); + return status; + } +} + +/* +gsl_movstat_mad0() + Apply a moving MAD to an input vector (without scale factor to make an +unbiased estimate of sigma) + +Inputs: endtype - how to handle end points + x - input vector, size n + xmedian - (output) vector of median values of x, size n + xmedian_i = median of window centered on x_i + xmad - (output) vector of estimated standard deviations of x, size n + xmad_i = MAD of i-th window: median(|x_i - xmedian_i|) + w - workspace +*/ + +int +gsl_movstat_mad0(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * xmedian, gsl_vector * xmad, + gsl_movstat_workspace * w) +{ + if (x->size != xmedian->size) + { + GSL_ERROR("x and xmedian vectors must have same length", GSL_EBADLEN); + } + else if (x->size != xmad->size) + { + GSL_ERROR("x and xmad vectors must have same length", GSL_EBADLEN); + } + else + { + double scale = 1.0; + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_mad, &scale, xmedian, xmad, w); + return status; + } +} diff -Nru gsl-2.4+dfsg/movstat/movmean.c gsl-2.5+dfsg/movstat/movmean.c --- gsl-2.4+dfsg/movstat/movmean.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movmean.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,43 @@ +/* movstat/movmean.c + * + * Routines related to a moving window mean + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_mean() + Apply moving mean to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_mean(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_mean, NULL, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movmedian.c gsl-2.5+dfsg/movstat/movmedian.c --- gsl-2.4+dfsg/movstat/movmedian.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movmedian.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,43 @@ +/* movstat/movmedian.c + * + * Routines related to a moving window median + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_median() + Apply median filter to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_median(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_median, NULL, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movminmax.c gsl-2.5+dfsg/movstat/movminmax.c --- gsl-2.4+dfsg/movstat/movminmax.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movminmax.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,78 @@ +/* movstat/movminmax.c + * + * Routines related to a moving window min/max + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_minmax() + Apply minmax filter to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y_min - output vector of minimum values, size n + y_max - output vector of maximum values, size n + w - workspace +*/ + +int +gsl_movstat_minmax(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y_min, gsl_vector * y_max, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_minmax, NULL, y_min, y_max, w); + return status; +} + +/* +gsl_movstat_min() + Apply minimum filter to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector of minimum values, size n + w - workspace +*/ + +int +gsl_movstat_min(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_min, NULL, y, NULL, w); + return status; +} + +/* +gsl_movstat_max() + Apply maximum filter to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector of maximum values, size n + w - workspace +*/ + +int +gsl_movstat_max(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_max, NULL, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movQn.c gsl-2.5+dfsg/movstat/movQn.c --- gsl-2.4+dfsg/movstat/movQn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movQn.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,49 @@ +/* movstat/movQn.c + * + * Compute moving "Q_n" statistic from Croux and Rousseeuw, 1992 + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_Qn() + Calculate moving Q_n statistic for input vector + +Inputs: endtype - how to handle end points + x - input vector, size n + xscale - (output) vector of "Q_n" statistics, size n + xscale_i = (Q_n)_i for i-th window: + w - workspace +*/ + +int +gsl_movstat_Qn(const gsl_movstat_end_t endtype, const gsl_vector * x, + gsl_vector * xscale, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_Qn, NULL, xscale, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movqqr.c gsl-2.5+dfsg/movstat/movqqr.c --- gsl-2.4+dfsg/movstat/movqqr.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movqqr.c 2018-05-03 16:07:50.000000000 +0000 @@ -0,0 +1,62 @@ +/* movstat/movqqr.c + * + * Compute moving q-quantile range + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_qqr() + Apply a moving q-quantile range to an input vector + +Inputs: endtype - how to handle end points + x - input vector, size n + q - quantile \in [0,0.5] + xqqr - (output) vector of q-quantile ranges of x, size n + xqqr_i = q-quantile range of i-th window: + w - workspace +*/ + +int +gsl_movstat_qqr(const gsl_movstat_end_t endtype, const gsl_vector * x, const double q, + gsl_vector * xqqr, gsl_movstat_workspace * w) +{ + if (x->size != xqqr->size) + { + GSL_ERROR("x and xqqr vectors must have same length", GSL_EBADLEN); + } + else if (q < 0.0 || q > 0.5) + { + GSL_ERROR("q must be between 0 and 0.5", GSL_EDOM); + } + else + { + double qq = q; + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_qqr, (void *) &qq, xqqr, NULL, w); + return status; + } +} diff -Nru gsl-2.4+dfsg/movstat/movSn.c gsl-2.5+dfsg/movstat/movSn.c --- gsl-2.4+dfsg/movstat/movSn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movSn.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,49 @@ +/* movstat/movSn.c + * + * Compute moving "S_n" statistic from Croux and Rousseeuw, 1992 + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* +gsl_movstat_Sn() + Calculate moving S_n statistic for input vector + +Inputs: endtype - how to handle end points + x - input vector, size n + xscale - (output) vector of "S_n" statistics, size n + xscale_i = (S_n)_i for i-th window: + w - workspace +*/ + +int +gsl_movstat_Sn(const gsl_movstat_end_t endtype, const gsl_vector * x, + gsl_vector * xscale, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_Sn, NULL, xscale, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movsum.c gsl-2.5+dfsg/movstat/movsum.c --- gsl-2.4+dfsg/movstat/movsum.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movsum.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,43 @@ +/* movstat/movsum.c + * + * Routines related to a moving window sum + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_sum() + Apply moving sum to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_sum(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_sum, NULL, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/movvariance.c gsl-2.5+dfsg/movstat/movvariance.c --- gsl-2.4+dfsg/movstat/movvariance.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/movvariance.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,60 @@ +/* movstat/movvar.c + * + * Routines related to a moving window variance + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* +gsl_movstat_variance() + Apply moving variance to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_variance(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_variance, NULL, y, NULL, w); + return status; +} + +/* +gsl_movstat_sd() + Apply moving standard deviation to input vector + +Inputs: endtype - end point handling criteria + x - input vector, size n + y - output vector, size n + w - workspace +*/ + +int +gsl_movstat_sd(const gsl_movstat_end_t endtype, const gsl_vector * x, gsl_vector * y, gsl_movstat_workspace * w) +{ + int status = gsl_movstat_apply_accum(endtype, x, gsl_movstat_accum_sd, NULL, y, NULL, w); + return status; +} diff -Nru gsl-2.4+dfsg/movstat/mvacc.c gsl-2.5+dfsg/movstat/mvacc.c --- gsl-2.4+dfsg/movstat/mvacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/mvacc.c 2018-05-03 16:00:40.000000000 +0000 @@ -0,0 +1,205 @@ +/* movstat/mvacc.c + * + * Moving window mean/variance accumulator - based on a modification + * to Welford's algorithm, discussed here: + * + * https://stackoverflow.com/a/6664212 + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +typedef double ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + size_t n; /* window size */ + size_t k; /* number of samples currently in window */ + double mean; /* current window mean */ + double M2; /* current window M2 */ + ringbuf *rbuf; /* ring buffer storing current window */ +} mvacc_state_t; + +static size_t +mvacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(mvacc_state_t); + size += ringbuf_size(n); + + return size; +} + +static int +mvacc_init(const size_t n, void * vstate) +{ + mvacc_state_t * state = (mvacc_state_t *) vstate; + + state->n = n; + state->k = 0; + state->mean = 0.0; + state->M2 = 0.0; + + state->rbuf = (ringbuf *) ((unsigned char *) vstate + sizeof(mvacc_state_t)); + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +mvacc_insert(const double x, void * vstate) +{ + mvacc_state_t * state = (mvacc_state_t *) vstate; + + if (ringbuf_is_full(state->rbuf)) + { + /* remove oldest window element and add new one */ + double old = ringbuf_peek_back(state->rbuf); + double prev_mean = state->mean; + + state->mean += (x - old) / (double) state->n; + state->M2 += ((old - prev_mean) + (x - state->mean)) * (x - old); + } + else + { + double delta = x - state->mean; + + /* + * Welford algorithm: + * + * mu_new = mu_old + (x - mu_old) / n + * M2_new = M2_old + (x - mu_old) * (x - mu_new) + */ + + ++(state->k); + state->mean += delta / (double) state->k; + state->M2 += delta * (x - state->mean); + } + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +mvacc_delete(void * vstate) +{ + mvacc_state_t * state = (mvacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + { + if (state->k > 1) + { + /* + * mu_new = mu_old + (mu_old - x_old) / (n - 1) + * M2_new = M2_old - (mu_old - x_old) * (mu_new - x_old) + */ + + double old = ringbuf_peek_back(state->rbuf); + double prev_mean = state->mean; + double delta = prev_mean - old; + + state->mean += delta / (state->k - 1.0); + state->M2 -= delta * (state->mean - old); + } + else if (state->k == 1) + { + state->mean = 0.0; + state->M2 = 0.0; + } + + ringbuf_pop_back(state->rbuf); + --(state->k); + } + + return GSL_SUCCESS; +} + +static int +mvacc_mean(void * params, double * result, const void * vstate) +{ + const mvacc_state_t * state = (const mvacc_state_t *) vstate; + (void) params; + *result = state->mean; + return GSL_SUCCESS; +} + +static int +mvacc_variance(void * params, double * result, const void * vstate) +{ + const mvacc_state_t * state = (const mvacc_state_t *) vstate; + + (void) params; + + if (state->k < 2) + *result = 0.0; + else + *result = state->M2 / (state->k - 1.0); + + return GSL_SUCCESS; +} + +static int +mvacc_sd(void * params, double * result, const void * vstate) +{ + double variance; + int status = mvacc_variance(params, &variance, vstate); + *result = sqrt(variance); + return status; +} + +static const gsl_movstat_accum mean_accum_type = +{ + mvacc_size, + mvacc_init, + mvacc_insert, + mvacc_delete, + mvacc_mean +}; + +const gsl_movstat_accum *gsl_movstat_accum_mean = &mean_accum_type; + +static const gsl_movstat_accum variance_accum_type = +{ + mvacc_size, + mvacc_init, + mvacc_insert, + mvacc_delete, + mvacc_variance +}; + +const gsl_movstat_accum *gsl_movstat_accum_variance = &variance_accum_type; + +static const gsl_movstat_accum sd_accum_type = +{ + mvacc_size, + mvacc_init, + mvacc_insert, + mvacc_delete, + mvacc_sd +}; + +const gsl_movstat_accum *gsl_movstat_accum_sd = &sd_accum_type; diff -Nru gsl-2.4+dfsg/movstat/qnacc.c gsl-2.5+dfsg/movstat/qnacc.c --- gsl-2.4+dfsg/movstat/qnacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/qnacc.c 2018-05-03 16:04:14.000000000 +0000 @@ -0,0 +1,118 @@ +/* movstat/qnacc.c + * + * Moving window Q_n accumulator + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef double qnacc_type_t; +typedef qnacc_type_t ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + qnacc_type_t *window; /* linear array for current window */ + qnacc_type_t *work; /* workspace, length 3*n */ + int *work_int; /* integer workspace, length 5*n */ + ringbuf *rbuf; /* ring buffer storing current window */ +} qnacc_state_t; + +static size_t +qnacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(qnacc_state_t); + size += n * sizeof(qnacc_type_t); /* window */ + size += 3 * n * sizeof(qnacc_type_t); /* work */ + size += 5 * n * sizeof(int); /* work_int */ + size += ringbuf_size(n); + + return size; +} + +static int +qnacc_init(const size_t n, void * vstate) +{ + qnacc_state_t * state = (qnacc_state_t *) vstate; + + state->window = (qnacc_type_t *) ((unsigned char *) vstate + sizeof(qnacc_state_t)); + state->work = (qnacc_type_t *) ((unsigned char *) state->window + n * sizeof(qnacc_type_t)); + state->work_int = (int *) ((unsigned char *) state->work + 3 * n * sizeof(qnacc_type_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->work_int + 5 * n * sizeof(int)); + + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +qnacc_insert(const qnacc_type_t x, void * vstate) +{ + qnacc_state_t * state = (qnacc_state_t *) vstate; + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +qnacc_delete(void * vstate) +{ + qnacc_state_t * state = (qnacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +/* FIXME XXX: this is inefficient - could be improved by maintaining a sorted ring buffer */ +static int +qnacc_get(void * params, qnacc_type_t * result, const void * vstate) +{ + const qnacc_state_t * state = (const qnacc_state_t *) vstate; + size_t n = ringbuf_copy(state->window, state->rbuf); + + (void) params; + + gsl_sort(state->window, 1, n); + *result = gsl_stats_Qn_from_sorted_data(state->window, 1, n, state->work, state->work_int); + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum qn_accum_type = +{ + qnacc_size, + qnacc_init, + qnacc_insert, + qnacc_delete, + qnacc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_Qn = &qn_accum_type; diff -Nru gsl-2.4+dfsg/movstat/qqracc.c gsl-2.5+dfsg/movstat/qqracc.c --- gsl-2.4+dfsg/movstat/qqracc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/qqracc.c 2018-05-03 16:06:50.000000000 +0000 @@ -0,0 +1,118 @@ +/* movstat/qqracc.c + * + * Moving window QQR accumulator + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef double qqracc_type_t; +typedef qqracc_type_t ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + qqracc_type_t *window; /* linear array for current window */ + ringbuf *rbuf; /* ring buffer storing current window */ +} qqracc_state_t; + +static size_t +qqracc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(qqracc_state_t); + size += n * sizeof(qqracc_type_t); + size += ringbuf_size(n); + + return size; +} + +static int +qqracc_init(const size_t n, void * vstate) +{ + qqracc_state_t * state = (qqracc_state_t *) vstate; + + state->window = (qqracc_type_t *) ((unsigned char *) vstate + sizeof(qqracc_state_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->window + n * sizeof(qqracc_type_t)); + + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +qqracc_insert(const qqracc_type_t x, void * vstate) +{ + qqracc_state_t * state = (qqracc_state_t *) vstate; + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +qqracc_delete(void * vstate) +{ + qqracc_state_t * state = (qqracc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +/* FIXME XXX: this is inefficient - could be improved by maintaining a sorted ring buffer */ +static int +qqracc_get(void * params, qqracc_type_t * result, const void * vstate) +{ + const qqracc_state_t * state = (const qqracc_state_t *) vstate; + double q = *(double *) params; + size_t n = ringbuf_copy(state->window, state->rbuf); + double quant1, quant2; + + gsl_sort(state->window, 1, n); + + /* compute q-quantile and (1-q)-quantile */ + quant1 = gsl_stats_quantile_from_sorted_data(state->window, 1, n, q); + quant2 = gsl_stats_quantile_from_sorted_data(state->window, 1, n, 1.0 - q); + + /* compute q-quantile range */ + *result = quant2 - quant1; + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum qqr_accum_type = +{ + qqracc_size, + qqracc_init, + qqracc_insert, + qqracc_delete, + qqracc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_qqr = &qqr_accum_type; diff -Nru gsl-2.4+dfsg/movstat/ringbuf.c gsl-2.5+dfsg/movstat/ringbuf.c --- gsl-2.4+dfsg/movstat/ringbuf.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/ringbuf.c 2018-05-23 15:52:19.000000000 +0000 @@ -0,0 +1,220 @@ +/* movstat/ringbuf.c + * + * Ring buffer module + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#ifndef __GSL_RINGBUF_C__ +#define __GSL_RINGBUF_C__ + +/*typedef int ringbuf_type;*/ + +typedef struct +{ + ringbuf_type_t *array; + int head; + int tail; + int size; /* total elements allocated */ +} ringbuf; + +static size_t ringbuf_size(const size_t n); +static int ringbuf_empty(ringbuf * d); +static int ringbuf_is_empty(const ringbuf * d); +static int ringbuf_is_full(const ringbuf * d); +static int ringbuf_insert(const ringbuf_type_t x, ringbuf * d); +static int ringbuf_pop_back(ringbuf * b); +static ringbuf_type_t ringbuf_peek(const int i, const ringbuf * b); +static ringbuf_type_t ringbuf_peek_front(const ringbuf * d); +static ringbuf_type_t ringbuf_peek_back(const ringbuf * d); +static size_t ringbuf_copy(double * dest, const ringbuf * b); +static int ringbuf_n(const ringbuf * b); + +static size_t +ringbuf_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(ringbuf); + size += n * sizeof(ringbuf_type_t); /* b->array */ + + return size; +} + +static int +ringbuf_init(const size_t n, ringbuf * b) +{ + b->array = (ringbuf_type_t *) ((char *) b + sizeof(ringbuf)); + b->head = -1; + b->tail = 0; + b->size = (int) n; + return GSL_SUCCESS; +} + +/* empty the buffer */ +static int +ringbuf_empty(ringbuf * b) +{ + b->head = -1; + b->tail = 0; + return GSL_SUCCESS; +} + +/* check if buffer is empty */ +static int +ringbuf_is_empty(const ringbuf * b) +{ + return (b->head == -1); +} + +/* check if buffer is full */ +static int +ringbuf_is_full(const ringbuf * b) +{ + return ((b->head == 0 && b->tail == b->size - 1) || + (b->head == b->tail + 1)); +} + +/* insert element into buffer, overwriting oldest element if necessary */ +static int +ringbuf_insert(const ringbuf_type_t x, ringbuf * b) +{ + if (b->head == -1) /* buffer is empty */ + { + b->head = 0; + b->tail = 0; + } + else if (b->head == 0) /* head is in first position, wrap to end */ + { + b->head = b->size - 1; + + if (b->tail == b->head && b->size > 1) + --(b->tail); /* buffer is full so decrease tail */ + } + else /* decrement head */ + { + --(b->head); + + if (b->tail == b->head) + { + /* buffer is full so update tail */ + if (b->tail == 0) + b->tail = b->size - 1; + else + --(b->tail); + } + } + + /* insert element */ + b->array[b->head] = x; + + return GSL_SUCCESS; +} + +static int +ringbuf_pop_back(ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + if (b->head == b->tail) /* buffer has only one element */ + { + b->head = -1; + b->tail = -1; + } + else if (b->tail == 0) /* tail is in first position, wrap to end */ + { + b->tail = b->size - 1; + } + else /* decrement tail */ + { + --(b->tail); + } + + return GSL_SUCCESS; + } +} + +static ringbuf_type_t +ringbuf_peek(const int i, const ringbuf * b) +{ + if (ringbuf_is_empty(b)) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[(b->head + i) % b->size]; + } +} + +static ringbuf_type_t +ringbuf_peek_front(const ringbuf * b) +{ + if (ringbuf_is_empty(b)) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[b->head]; + } +} + +static ringbuf_type_t +ringbuf_peek_back(const ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + GSL_ERROR("buffer is empty", GSL_EBADLEN); + } + else + { + return b->array[b->tail]; + } +} + +static size_t +ringbuf_copy(double * dest, const ringbuf * b) +{ + if (ringbuf_is_empty(b) || b->tail < 0) + { + return 0; + } + else + { + const int n = ringbuf_n(b); + int i; + + for (i = 0; i < n; ++i) + dest[i] = b->array[(b->head + i) % b->size]; + + return (size_t) n; + } +} + +static int +ringbuf_n(const ringbuf * b) +{ + const int n = (b->head > b->tail) ? (b->size - b->head + b->tail + 1) : (b->tail - b->head + 1); + return n; +} + +#endif /* __GSL_RINGBUF_C__ */ diff -Nru gsl-2.4+dfsg/movstat/snacc.c gsl-2.5+dfsg/movstat/snacc.c --- gsl-2.4+dfsg/movstat/snacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/snacc.c 2018-05-03 16:02:46.000000000 +0000 @@ -0,0 +1,114 @@ +/* movstat/snacc.c + * + * Moving window S_n accumulator + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include + +typedef double snacc_type_t; +typedef snacc_type_t ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + snacc_type_t *window; /* linear array for current window */ + snacc_type_t *work; /* workspace */ + ringbuf *rbuf; /* ring buffer storing current window */ +} snacc_state_t; + +static size_t +snacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(snacc_state_t); + size += 2 * n * sizeof(snacc_type_t); + size += ringbuf_size(n); + + return size; +} + +static int +snacc_init(const size_t n, void * vstate) +{ + snacc_state_t * state = (snacc_state_t *) vstate; + + state->window = (snacc_type_t *) ((unsigned char *) vstate + sizeof(snacc_state_t)); + state->work = (snacc_type_t *) ((unsigned char *) state->window + n * sizeof(snacc_type_t)); + state->rbuf = (ringbuf *) ((unsigned char *) state->work + n * sizeof(snacc_type_t)); + + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +snacc_insert(const snacc_type_t x, void * vstate) +{ + snacc_state_t * state = (snacc_state_t *) vstate; + + /* add new element to ring buffer */ + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +snacc_delete(void * vstate) +{ + snacc_state_t * state = (snacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + ringbuf_pop_back(state->rbuf); + + return GSL_SUCCESS; +} + +/* FIXME XXX: this is inefficient - could be improved by maintaining a sorted ring buffer */ +static int +snacc_get(void * params, snacc_type_t * result, const void * vstate) +{ + const snacc_state_t * state = (const snacc_state_t *) vstate; + size_t n = ringbuf_copy(state->window, state->rbuf); + + (void) params; + + gsl_sort(state->window, 1, n); + *result = gsl_stats_Sn_from_sorted_data(state->window, 1, n, state->work); + + return GSL_SUCCESS; +} + +static const gsl_movstat_accum sn_accum_type = +{ + snacc_size, + snacc_init, + snacc_insert, + snacc_delete, + snacc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_Sn = &sn_accum_type; diff -Nru gsl-2.4+dfsg/movstat/sumacc.c gsl-2.5+dfsg/movstat/sumacc.c --- gsl-2.4+dfsg/movstat/sumacc.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/sumacc.c 2018-05-03 15:59:50.000000000 +0000 @@ -0,0 +1,112 @@ +/* movstat/sumacc.c + * + * Moving window sum accumulator + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +typedef double ringbuf_type_t; + +#include "ringbuf.c" + +typedef struct +{ + double sum; /* current window sum */ + ringbuf *rbuf; /* ring buffer storing current window */ +} sumacc_state_t; + +static size_t +sumacc_size(const size_t n) +{ + size_t size = 0; + + size += sizeof(sumacc_state_t); + size += ringbuf_size(n); + + return size; +} + +static int +sumacc_init(const size_t n, void * vstate) +{ + sumacc_state_t * state = (sumacc_state_t *) vstate; + + state->sum = 0.0; + + state->rbuf = (ringbuf *) ((unsigned char *) vstate + sizeof(sumacc_state_t)); + ringbuf_init(n, state->rbuf); + + return GSL_SUCCESS; +} + +static int +sumacc_insert(const double x, void * vstate) +{ + sumacc_state_t * state = (sumacc_state_t *) vstate; + + if (ringbuf_is_full(state->rbuf)) + { + /* subtract oldest element from sum */ + state->sum -= ringbuf_peek_back(state->rbuf); + } + + /* add new element to sum and ring buffer */ + state->sum += x; + ringbuf_insert(x, state->rbuf); + + return GSL_SUCCESS; +} + +static int +sumacc_delete(void * vstate) +{ + sumacc_state_t * state = (sumacc_state_t *) vstate; + + if (!ringbuf_is_empty(state->rbuf)) + { + state->sum -= ringbuf_peek_back(state->rbuf); + ringbuf_pop_back(state->rbuf); + } + + return GSL_SUCCESS; +} + +static int +sumacc_get(void * params, double * result, const void * vstate) +{ + const sumacc_state_t * state = (const sumacc_state_t *) vstate; + (void) params; + *result = state->sum; + return GSL_SUCCESS; +} + +static const gsl_movstat_accum sum_accum_type = +{ + sumacc_size, + sumacc_init, + sumacc_insert, + sumacc_delete, + sumacc_get +}; + +const gsl_movstat_accum *gsl_movstat_accum_sum = &sum_accum_type; diff -Nru gsl-2.4+dfsg/movstat/test.c gsl-2.5+dfsg/movstat/test.c --- gsl-2.4+dfsg/movstat/test.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test.c 2018-05-16 03:22:39.000000000 +0000 @@ -0,0 +1,109 @@ +/* movstat/test.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* compare two vectors */ +static void +compare_vectors(const double tol, const gsl_vector * v, const gsl_vector * expected, + const char * desc) +{ + const size_t n = v->size; + size_t i; + + for (i = 0; i < n; ++i) + { + double vi = gsl_vector_get(v, i); + double ui = gsl_vector_get(expected, i); + + gsl_test_rel(vi, ui, tol, "%s i=%zu", desc, i); + } +} + +/* generate random vector with elements in [-1,1] */ +static void +random_vector(gsl_vector * v, gsl_rng * r) +{ + size_t i; + + for (i = 0; i < v->size; ++i) + { + double vi = 2.0 * gsl_rng_uniform(r) - 1.0; /* in [-1,1] */ + gsl_vector_set(v, i, vi); + } +} + +static int +test_noisy_sine(const double sigma, gsl_vector * x, gsl_rng * r) +{ + const size_t n = x->size; + size_t i; + + for (i = 0; i < n; ++i) + { + double ti = (double) i / (n - 1.0); + double xi = sin(2.0 * M_PI * ti) + + sin(2.0 * M_PI * 40.0 * ti); + double ei = gsl_ran_gaussian(r, sigma); + + gsl_vector_set(x, i, xi + ei); + } + + return GSL_SUCCESS; +} + +#include "test_mad.c" +#include "test_mean.c" +#include "test_median.c" +#include "test_minmax.c" +#include "test_Qn.c" +#include "test_qqr.c" +#include "test_sum.c" +#include "test_Sn.c" +#include "test_variance.c" + +int +main() +{ + gsl_rng *r = gsl_rng_alloc(gsl_rng_default); + + test_mean(r); + test_median(r); + test_minmax(r); + test_mad(r); + test_Qn(r); + test_qqr(r); + test_sum(r); + test_Sn(r); + test_variance(r); + + gsl_rng_free(r); + + exit (gsl_test_summary()); +} diff -Nru gsl-2.4+dfsg/movstat/test_mad.c gsl-2.5+dfsg/movstat/test_mad.c --- gsl-2.4+dfsg/movstat/test_mad.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_mad.c 2018-05-23 17:15:13.000000000 +0000 @@ -0,0 +1,178 @@ +/* movstat/test_mad.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute filtered data by explicitely constructing window and finding MAD */ +int +slow_movmad(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double median = gsl_stats_median(window, 1, wsize); + double mad; + size_t j; + + for (j = 0; j < wsize; ++j) + window[j] = fabs(window[j] - median); + + mad = gsl_stats_median(window, 1, wsize); + + gsl_vector_set(y, i, mad); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_mad(const size_t n, double x[], void * params) +{ + double *work = malloc(n * sizeof(double)); + double mad; + + (void) params; + + mad = gsl_stats_mad0(x, 1, n, work); + + free(work); + + return mad; +} + +static void +test_mad_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng *rng_p) +{ + const double scale = 1.482602218505602; + gsl_movstat_workspace *w; + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + gsl_vector *med1 = gsl_vector_alloc(n); + gsl_vector *med2 = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_mad; + F.params = NULL; + + if (H == J) + w = gsl_movstat_alloc(2*H + 1); + else + w = gsl_movstat_alloc2(H, J); + + /* test moving MAD with random input */ + random_vector(x, rng_p); + + /* y = MAD(x) with slow brute force algorithm */ + slow_movmad(etype, x, y, H, J); + + /* z = MAD(x) */ + gsl_movstat_mad0(etype, x, med1, z, w); + + /* med2 = median(x) */ + gsl_movstat_median(etype, x, med2, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u MAD0 random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* test med1 = med2 */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u MAD0 random median test", n, H, J, etype); + compare_vectors(tol, med1, med2, buf); + + /* z = MAD(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_mad0(etype, z, med1, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u MAD0 random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = MAD(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u MAD0 user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* test scaled MAD function */ + + /* z = MAD(x) */ + gsl_movstat_mad(etype, x, med1, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u MAD random", n, H, J, etype); + gsl_vector_scale(y, scale); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_vector_free(med1); + gsl_vector_free(med2); + gsl_movstat_free(w); +} + +static void +test_mad(gsl_rng * rng_p) +{ + test_mad_proc(GSL_DBL_EPSILON, 100, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_mad_proc(GSL_DBL_EPSILON, 100, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_mad_proc(GSL_DBL_EPSILON, 100, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mad_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_mean.c gsl-2.5+dfsg/movstat/test_mean.c --- gsl-2.4+dfsg/movstat/test_mean.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_mean.c 2018-05-16 03:19:30.000000000 +0000 @@ -0,0 +1,135 @@ +/* movstat/test_mean.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute moving mean by explicitely constructing window and computing mean */ +int +slow_movmean(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double mean = gsl_stats_mean(window, 1, wsize); + + gsl_vector_set(y, i, mean); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_mean(const size_t n, double x[], void * params) +{ + (void) params; + return gsl_stats_mean(x, 1, n); +} + +static void +test_mean_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng * rng_p) +{ + gsl_movstat_workspace * w = gsl_movstat_alloc2(H, J); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_mean; + F.params = NULL; + + random_vector(x, rng_p); + + /* y = mean(x) with slow brute force method */ + slow_movmean(etype, x, y, H, J); + + /* y = mean(x) with fast method */ + gsl_movstat_mean(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u mean random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = mean(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_mean(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u mean random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = mean(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u mean user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_movstat_free(w); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +static void +test_mean(gsl_rng * rng_p) +{ + const double eps = 1.0e-10; + + test_mean_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 1000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 1000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_mean_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_mean_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 1000, 0, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 1000, 5, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_mean_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_mean_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 1000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 1000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_mean_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_median.c gsl-2.5+dfsg/movstat/test_median.c --- gsl-2.4+dfsg/movstat/test_median.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_median.c 2018-05-22 16:51:24.000000000 +0000 @@ -0,0 +1,177 @@ +/* movstat/test_median.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include + +/* compute filtered data by explicitely constructing window, sorting it and finding median */ +int +slow_movmedian(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double yi = gsl_stats_median(window, 1, wsize); + + gsl_vector_set(y, i, yi); + } + + free(window); + + return GSL_SUCCESS; +} + +/* test root sequence */ +static void +test_median_root(const double tol, const size_t n, const size_t K, const gsl_movstat_end_t etype) +{ + gsl_movstat_workspace *w = gsl_movstat_alloc(K); + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + char buf[2048]; + size_t i; + + /* test a root sequence (square input): x = [zero one zero] */ + gsl_vector_set_all(x, 0.0); + + for (i = n / 3; i <= n / 2; ++i) + gsl_vector_set(x, i, 1.0); + + /* compute y = median(x) and test y = x */ + gsl_movstat_median(etype, x, y, w); + + sprintf(buf, "n=%zu K=%zu endtype=%u SMF root sequence", n, K, etype); + compare_vectors(tol, y, x, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_movstat_free(w); +} + +static double +func_median(const size_t n, double x[], void * params) +{ + (void) params; + return gsl_stats_median(x, 1, n); +} + +static void +test_median_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng *rng_p) +{ + gsl_movstat_workspace *w; + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_median; + F.params = NULL; + + if (H == J) + w = gsl_movstat_alloc(2*H + 1); + else + w = gsl_movstat_alloc2(H, J); + + /* test moving median with random input */ + random_vector(x, rng_p); + + /* y = median(x) with slow brute force algorithm */ + slow_movmedian(etype, x, y, H, J); + + /* z = median(x) */ + gsl_movstat_median(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u median random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = median(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_median(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u median random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = median(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u median user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_movstat_free(w); +} + +static void +test_median(gsl_rng * rng_p) +{ + test_median_root(GSL_DBL_EPSILON, 1000, 3, GSL_MOVSTAT_END_PADZERO); + test_median_root(GSL_DBL_EPSILON, 200, 15, GSL_MOVSTAT_END_PADVALUE); + test_median_root(GSL_DBL_EPSILON, 100, 5, GSL_MOVSTAT_END_TRUNCATE); + + test_median_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 150, 150, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_PADZERO, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_median_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 150, 150, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_median_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 1000, 1, 1, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 100, 150, 150, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 8, 8, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 15, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 5000, 10, 15, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 150, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 150, 100, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_median_proc(GSL_DBL_EPSILON, 50, 100, 100, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_minmax.c gsl-2.5+dfsg/movstat/test_minmax.c --- gsl-2.4+dfsg/movstat/test_minmax.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_minmax.c 2018-05-22 17:01:20.000000000 +0000 @@ -0,0 +1,262 @@ +/* movstat/test_minmax.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute filtered data by explicitely constructing window and finding min/max */ +int +slow_minmax(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y_min, gsl_vector * y_max, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + gsl_vector_view v = gsl_vector_view_array(window, wsize); + double min, max; + + gsl_vector_minmax(&v.vector, &min, &max); + gsl_vector_set(y_min, i, min); + gsl_vector_set(y_max, i, max); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_min(const size_t n, double x[], void * params) +{ + gsl_vector_view v = gsl_vector_view_array(x, n); + (void) params; + return gsl_vector_min(&v.vector); +} + +static double +func_max(const size_t n, double x[], void * params) +{ + gsl_vector_view v = gsl_vector_view_array(x, n); + (void) params; + return gsl_vector_max(&v.vector); +} + +static void +test_minmax_x(const double tol, const gsl_vector * x, const int H, const int J, + const gsl_movstat_end_t endtype, const char * desc) +{ + const size_t n = x->size; + gsl_vector * u_min = gsl_vector_alloc(n); + gsl_vector * y_min = gsl_vector_alloc(n); + gsl_vector * z_min = gsl_vector_alloc(n); + gsl_vector * u_max = gsl_vector_alloc(n); + gsl_vector * y_max = gsl_vector_alloc(n); + gsl_vector * z_max = gsl_vector_alloc(n); + gsl_movstat_workspace * w = gsl_movstat_alloc2(H, J); + gsl_movstat_function F1, F2; + char buf[2048]; + + F1.function = func_min; + F1.params = NULL; + + F2.function = func_max; + F2.params = NULL; + + /* compute moving min/max */ + gsl_movstat_min(endtype, x, u_min, w); + gsl_movstat_max(endtype, x, u_max, w); + gsl_movstat_minmax(endtype, x, y_min, y_max, w); + + /* compute moving min/max with slow brute force method */ + slow_minmax(endtype, x, z_min, z_max, H, J); + + sprintf(buf, "test_minmax: %s min endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, u_min, z_min, buf); + + sprintf(buf, "test_minmax: %s max endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, u_max, z_max, buf); + + sprintf(buf, "test_minmax: %s minmax(minimum) endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, y_min, z_min, buf); + + sprintf(buf, "test_minmax: %s minmax(maximum) endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, y_max, z_max, buf); + + /* in-place tests */ + + gsl_vector_memcpy(u_min, x); + gsl_vector_memcpy(u_max, x); + + gsl_movstat_min(endtype, u_min, u_min, w); + gsl_movstat_max(endtype, u_max, u_max, w); + + sprintf(buf, "test_minmax: %s in-place min endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, u_min, z_min, buf); + + sprintf(buf, "test_minmax: %s in-place max endtype=%d n=%zu H=%d J=%d", desc, endtype, n, H, J); + compare_vectors(tol, u_max, z_max, buf); + + /* user-defined function tests */ + + gsl_movstat_apply(endtype, &F1, x, z_min, w); + sprintf(buf, "n=%zu H=%d J=%d endtype=%u min user", n, H, J, endtype); + compare_vectors(tol, z_min, y_min, buf); + + gsl_movstat_apply(endtype, &F2, x, z_max, w); + sprintf(buf, "n=%zu H=%d J=%d endtype=%u max user", n, H, J, endtype); + compare_vectors(tol, z_max, y_max, buf); + + gsl_vector_free(u_min); + gsl_vector_free(y_min); + gsl_vector_free(z_min); + gsl_vector_free(u_max); + gsl_vector_free(y_max); + gsl_vector_free(z_max); + gsl_movstat_free(w); +} + +/* test alternating sequence [a,b,a,b,...] input */ +static void +test_minmax_alt(const double tol, const size_t n, const int H, const int J, + const gsl_movstat_end_t endtype) +{ + const double a = 5.0; + const double b = -5.0; + gsl_vector * x = gsl_vector_alloc(n); + size_t i; + + for (i = 0; i < n; ++i) + { + if (i % 2 == 0) + gsl_vector_set(x, i, a); + else + gsl_vector_set(x, i, b); + } + + test_minmax_x(tol, x, H, J, endtype, "alternating"); + + gsl_vector_free(x); +} + +/* test noisy sine wave input */ +static void +test_minmax_sine(const double tol, const size_t n, const int H, const int J, + const gsl_movstat_end_t endtype, gsl_rng * rng_p) +{ + gsl_vector * x = gsl_vector_alloc(n); + + /* construct noisy sine signal */ + test_noisy_sine(0.5, x, rng_p); + + test_minmax_x(tol, x, H, J, endtype, "noisy_sine"); + + gsl_vector_free(x); +} + +/* test random input */ +static void +test_minmax_random(const double tol, const size_t n, const int H, const int J, + const gsl_movstat_end_t endtype, gsl_rng * rng_p) +{ + gsl_vector * x = gsl_vector_alloc(n); + + /* construct random input signal */ + random_vector(x, rng_p); + + test_minmax_x(tol, x, H, J, endtype, "random"); + + gsl_vector_free(x); +} + +static void +test_minmax(gsl_rng * rng_p) +{ + /* alternating input */ + + test_minmax_alt(GSL_DBL_EPSILON, 1000, 7, 7, GSL_MOVSTAT_END_PADZERO); + test_minmax_alt(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_PADZERO); + test_minmax_alt(GSL_DBL_EPSILON, 500, 1, 3, GSL_MOVSTAT_END_PADZERO); + test_minmax_alt(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADZERO); + test_minmax_alt(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADZERO); + + /* noisy sine wave input */ + + test_minmax_sine(GSL_DBL_EPSILON, 1000, 5, 7, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 2000, 0, 2, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 500, 3, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_minmax_sine(GSL_DBL_EPSILON, 500, 5, 7, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 10, 20, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 3, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_minmax_sine(GSL_DBL_EPSILON, 500, 5, 7, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 10, 20, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 3, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 30, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 1000, 5, 30, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_sine(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + + /* random input */ + + test_minmax_random(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 1000, 5, 7, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 2000, 0, 2, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 3, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 10, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 5, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_minmax_random(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 1000, 5, 7, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 2000, 0, 2, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 3, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 10, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 5, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_minmax_random(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 1000, 5, 7, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 2000, 0, 2, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 3, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 10, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 500, 5, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_minmax_random(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_Qn.c gsl-2.5+dfsg/movstat/test_Qn.c --- gsl-2.4+dfsg/movstat/test_Qn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_Qn.c 2018-05-22 17:07:19.000000000 +0000 @@ -0,0 +1,157 @@ +/* movstat/test_Qn.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include + +/* calculate Q_n statistic for input vector using slow/naive algorithm */ +static int +slow_movQn(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + double *work = malloc(3 * K * sizeof(double)); + int *work_int = malloc(5 * K * sizeof(int)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double Qn; + + gsl_sort(window, 1, wsize); + Qn = gsl_stats_Qn_from_sorted_data(window, 1, wsize, work, work_int); + gsl_vector_set(y, i, Qn); + } + + free(window); + free(work); + free(work_int); + + return GSL_SUCCESS; +} + +static double +func_Qn(const size_t n, double x[], void * params) +{ + double *work = malloc(3 * n * sizeof(double)); + int *work_int = malloc(5 * n * sizeof(int)); + double Qn; + + (void) params; + + gsl_sort(x, 1, n); + Qn = gsl_stats_Qn_from_sorted_data(x, 1, n, work, work_int); + + free(work); + free(work_int); + + return Qn; +} + +static void +test_Qn_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng *rng_p) +{ + gsl_movstat_workspace *w; + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_Qn; + F.params = NULL; + + if (H == J) + w = gsl_movstat_alloc(2*H + 1); + else + w = gsl_movstat_alloc2(H, J); + + /* test moving median with random input */ + random_vector(x, rng_p); + + /* y = Q_n(x) with slow brute force algorithm */ + slow_movQn(etype, x, y, H, J); + + /* z = Q_n(x) */ + gsl_movstat_Qn(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Qn random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = Q_n(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_Qn(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Qn random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = Q_n(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Qn user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_movstat_free(w); +} + +static void +test_Qn(gsl_rng * rng_p) +{ + test_Qn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_Qn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_Qn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Qn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_qqr.c gsl-2.5+dfsg/movstat/test_qqr.c --- gsl-2.4+dfsg/movstat/test_qqr.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_qqr.c 2018-05-22 17:10:13.000000000 +0000 @@ -0,0 +1,147 @@ +/* movstat/test_qqr.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute moving QQR by explicitely constructing window and computing QQR */ +int +slow_movqqr(const gsl_movstat_end_t etype, const double q, const gsl_vector * x, + gsl_vector * y, const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double quant1, quant2; + + gsl_sort(window, 1, wsize); + quant1 = gsl_stats_quantile_from_sorted_data(window, 1, wsize, q); + quant2 = gsl_stats_quantile_from_sorted_data(window, 1, wsize, 1.0 - q); + + gsl_vector_set(y, i, quant2 - quant1); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_qqr(const size_t n, double x[], void * params) +{ + double q = *(double *) params; + double quant1, quant2; + + (void) params; + + gsl_sort(x, 1, n); + quant1 = gsl_stats_quantile_from_sorted_data(x, 1, n, q); + quant2 = gsl_stats_quantile_from_sorted_data(x, 1, n, 1.0 - q); + + return (quant2 - quant1); +} + +static void +test_qqr_proc(const double tol, const double q, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng * rng_p) +{ + gsl_movstat_workspace * w = gsl_movstat_alloc2(H, J); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_qqr; + F.params = (void *) &q; + + random_vector(x, rng_p); + + /* y = QQR(x) with slow brute force method */ + slow_movqqr(etype, q, x, y, H, J); + + /* y = QQR(x) with fast method */ + gsl_movstat_qqr(etype, x, q, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u QQR random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = QQR(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_qqr(etype, z, q, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u QQR random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = QQR(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u QQR user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_movstat_free(w); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +static void +test_qqr(gsl_rng * rng_p) +{ + const double eps = 1.0e-10; + + test_qqr_proc(eps, 0.1, 100, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.1, 1000, 3, 3, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.2, 1000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.3, 1000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.25, 2000, 10, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.4, 2000, 5, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.25, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_qqr_proc(eps, 0.1, 100, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.1, 1000, 3, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.2, 1000, 0, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.3, 1000, 5, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.25, 2000, 10, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.4, 2000, 5, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.25, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_qqr_proc(eps, 0.1, 100, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.1, 1000, 3, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.2, 1000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.3, 1000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.25, 2000, 10, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.4, 2000, 5, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.25, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_qqr_proc(eps, 0.25, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_Sn.c gsl-2.5+dfsg/movstat/test_Sn.c --- gsl-2.4+dfsg/movstat/test_Sn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_Sn.c 2018-05-22 17:04:38.000000000 +0000 @@ -0,0 +1,152 @@ +/* movstat/test_Sn.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* calculate S_n statistic for input vector using slow/naive algorithm */ +static int +slow_movSn(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + double *work = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double Sn; + + gsl_sort(window, 1, wsize); + Sn = gsl_stats_Sn_from_sorted_data(window, 1, wsize, work); + gsl_vector_set(y, i, Sn); + } + + free(window); + free(work); + + return GSL_SUCCESS; +} + +static double +func_Sn(const size_t n, double x[], void * params) +{ + double *work = malloc(n * sizeof(double)); + double Sn; + + (void) params; + + gsl_sort(x, 1, n); + Sn = gsl_stats_Sn_from_sorted_data(x, 1, n, work); + + free(work); + + return Sn; +} + +static void +test_Sn_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng *rng_p) +{ + gsl_movstat_workspace *w; + gsl_vector *x = gsl_vector_alloc(n); + gsl_vector *y = gsl_vector_alloc(n); + gsl_vector *z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_Sn; + F.params = NULL; + + if (H == J) + w = gsl_movstat_alloc(2*H + 1); + else + w = gsl_movstat_alloc2(H, J); + + /* test moving median with random input */ + random_vector(x, rng_p); + + /* y = S_n(x) with slow brute force algorithm */ + slow_movSn(etype, x, y, H, J); + + /* z = S_n(x) */ + gsl_movstat_Sn(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Sn random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = S_n(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_Sn(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Sn random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = S_n(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u Sn user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); + gsl_movstat_free(w); +} + +static void +test_Sn(gsl_rng * rng_p) +{ + test_Sn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_Sn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_Sn_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 5, 2, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 1000, 2, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 50, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 2000, 0, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 1, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_Sn_proc(GSL_DBL_EPSILON, 20, 50, 1, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_sum.c gsl-2.5+dfsg/movstat/test_sum.c --- gsl-2.4+dfsg/movstat/test_sum.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_sum.c 2018-05-22 16:54:48.000000000 +0000 @@ -0,0 +1,144 @@ +/* movstat/test_sum.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute moving sum by explicitely constructing window and summing elements */ +int +slow_movsum(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double sum = 0.0; + size_t j; + + for (j = 0; j < wsize; ++j) + sum += window[j]; + + gsl_vector_set(y, i, sum); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_sum(const size_t n, double x[], void * params) +{ + double sum = 0.0; + size_t i; + + (void) params; + + for (i = 0; i < n; ++i) + sum += x[i]; + + return sum; +} + +static void +test_sum_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng * rng_p) +{ + gsl_movstat_workspace * w = gsl_movstat_alloc2(H, J); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + gsl_movstat_function F; + char buf[2048]; + + F.function = func_sum; + F.params = NULL; + + random_vector(x, rng_p); + + /* y = sum(x) with slow brute force method */ + slow_movsum(etype, x, y, H, J); + + /* y = sum(x) with fast method */ + gsl_movstat_sum(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u sum random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = sum(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_sum(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u sum random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = sum(x) with user-defined function */ + gsl_movstat_apply(etype, &F, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u sum user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_movstat_free(w); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +static void +test_sum(gsl_rng * rng_p) +{ + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 3, 3, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 10, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 5, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 3, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 5, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 10, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 5, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 3, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 1000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 10, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 2000, 5, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_sum_proc(GSL_DBL_EPSILON, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/test_variance.c gsl-2.5+dfsg/movstat/test_variance.c --- gsl-2.4+dfsg/movstat/test_variance.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/test_variance.c 2018-05-16 03:22:25.000000000 +0000 @@ -0,0 +1,201 @@ +/* movstat/test_variance.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include + +/* compute moving variance by explicitely constructing window and computing variance */ +int +slow_movvar(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double variance = (wsize > 1) ? gsl_stats_variance(window, 1, wsize) : 0.0; + + gsl_vector_set(y, i, variance); + } + + free(window); + + return GSL_SUCCESS; +} + +/* compute moving variance by explicitely constructing window and computing variance */ +int +slow_movsd(const gsl_movstat_end_t etype, const gsl_vector * x, gsl_vector * y, + const int H, const int J) +{ + const size_t n = x->size; + const int K = H + J + 1; + double *window = malloc(K * sizeof(double)); + size_t i; + + for (i = 0; i < n; ++i) + { + size_t wsize = gsl_movstat_fill(etype, x, i, H, J, window); + double sd = (wsize > 1) ? gsl_stats_sd(window, 1, wsize) : 0.0; + + gsl_vector_set(y, i, sd); + } + + free(window); + + return GSL_SUCCESS; +} + +static double +func_var(const size_t n, double x[], void * params) +{ + (void) params; + if (n > 1) + return gsl_stats_variance(x, 1, n); + else + return 0.0; +} + +static double +func_sd(const size_t n, double x[], void * params) +{ + (void) params; + if (n > 1) + return gsl_stats_sd(x, 1, n); + else + return 0.0; +} + +static void +test_variance_proc(const double tol, const size_t n, const size_t H, const size_t J, + const gsl_movstat_end_t etype, gsl_rng * rng_p) +{ + gsl_movstat_workspace * w = gsl_movstat_alloc2(H, J); + gsl_vector * x = gsl_vector_alloc(n); + gsl_vector * y = gsl_vector_alloc(n); + gsl_vector * z = gsl_vector_alloc(n); + gsl_movstat_function F1, F2; + char buf[2048]; + + F1.function = func_var; + F1.params = NULL; + + F2.function = func_sd; + F2.params = NULL; + + random_vector(x, rng_p); + + /* test variance */ + + /* y = variance(x) with slow brute force method */ + slow_movvar(etype, x, y, H, J); + + /* y = variance(x) with fast method */ + gsl_movstat_variance(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u variance random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = variance(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_variance(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u variance random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = variance(x) with user-defined function */ + gsl_movstat_apply(etype, &F1, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u variance user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* test standard deviation */ + + /* y = stddev(x) with slow brute force method */ + slow_movsd(etype, x, y, H, J); + + /* y = stddev(x) with fast method */ + gsl_movstat_sd(etype, x, z, w); + + /* test y = z */ + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u stddev random", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = stddev(x) in-place */ + gsl_vector_memcpy(z, x); + gsl_movstat_sd(etype, z, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u stddev random in-place", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + /* z = stddev(x) with user-defined function */ + gsl_movstat_apply(etype, &F2, x, z, w); + + sprintf(buf, "n=%zu H=%zu J=%zu endtype=%u stddev user", n, H, J, etype); + compare_vectors(tol, z, y, buf); + + gsl_movstat_free(w); + gsl_vector_free(x); + gsl_vector_free(y); + gsl_vector_free(z); +} + +static void +test_variance(gsl_rng * rng_p) +{ + const double eps = 1.0e-10; + + test_variance_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 1000, 0, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 1000, 5, 0, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_PADZERO, rng_p); + test_variance_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_PADZERO, rng_p); + + test_variance_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 1000, 1, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 1000, 5, 1, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_PADVALUE, rng_p); + test_variance_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_PADVALUE, rng_p); + + test_variance_proc(eps, 1000, 0, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 1000, 3, 3, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 1000, 0, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 1000, 5, 0, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 2000, 10, 5, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 2000, 5, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 20, 50, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 20, 10, 50, GSL_MOVSTAT_END_TRUNCATE, rng_p); + test_variance_proc(eps, 20, 50, 10, GSL_MOVSTAT_END_TRUNCATE, rng_p); +} diff -Nru gsl-2.4+dfsg/movstat/TODO gsl-2.5+dfsg/movstat/TODO --- gsl-2.4+dfsg/movstat/TODO 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/movstat/TODO 2018-05-23 17:16:13.000000000 +0000 @@ -0,0 +1,2 @@ +1. medacc: add delete function and convert to movstat_apply format +2. remove gsl_math.h / gsl_function_vec -- not used? diff -Nru gsl-2.4+dfsg/multifit/multiwlinear.c gsl-2.5+dfsg/multifit/multiwlinear.c --- gsl-2.4+dfsg/multifit/multiwlinear.c 2016-11-18 19:09:31.000000000 +0000 +++ gsl-2.5+dfsg/multifit/multiwlinear.c 2018-02-10 19:17:57.000000000 +0000 @@ -27,191 +27,6 @@ #include "linear_common.c" -/* General weighted case */ - -static int -multifit_wlinear_svd (const gsl_matrix * X, - const gsl_vector * w, - const gsl_vector * y, - double tol, - int balance, - size_t * rank, - gsl_vector * c, - gsl_matrix * cov, - double *chisq, gsl_multifit_linear_workspace * work) -{ - if (X->size1 != y->size) - { - GSL_ERROR - ("number of observations in y does not match rows of matrix X", - GSL_EBADLEN); - } - else if (X->size2 != c->size) - { - GSL_ERROR ("number of parameters c does not match columns of matrix X", - GSL_EBADLEN); - } - else if (w->size != y->size) - { - GSL_ERROR ("number of weights does not match number of observations", - GSL_EBADLEN); - } - else if (cov->size1 != cov->size2) - { - GSL_ERROR ("covariance matrix is not square", GSL_ENOTSQR); - } - else if (c->size != cov->size1) - { - GSL_ERROR - ("number of parameters does not match size of covariance matrix", - GSL_EBADLEN); - } - else if (X->size1 != work->n || X->size2 != work->p) - { - GSL_ERROR - ("size of workspace does not match size of observation matrix", - GSL_EBADLEN); - } - else - { - const size_t n = X->size1; - const size_t p = X->size2; - - size_t i, j, p_eff; - - gsl_matrix *A = work->A; - gsl_matrix *Q = work->Q; - gsl_matrix *QSI = work->QSI; - gsl_vector *S = work->S; - gsl_vector *t = work->t; - gsl_vector *xt = work->xt; - gsl_vector *D = work->D; - - /* Scale X, A = sqrt(w) X */ - - gsl_matrix_memcpy (A, X); - - for (i = 0; i < n; i++) - { - double wi = gsl_vector_get (w, i); - - if (wi < 0) - wi = 0; - - { - gsl_vector_view row = gsl_matrix_row (A, i); - gsl_vector_scale (&row.vector, sqrt (wi)); - } - } - - /* Balance the columns of the matrix A if requested */ - - if (balance) - { - gsl_linalg_balance_columns (A, D); - } - else - { - gsl_vector_set_all (D, 1.0); - } - - /* Decompose A into U S Q^T */ - - gsl_linalg_SV_decomp_mod (A, QSI, Q, S, xt); - - /* Solve sqrt(w) y = A c for c, by first computing t = sqrt(w) y */ - - for (i = 0; i < n; i++) - { - double wi = gsl_vector_get (w, i); - double yi = gsl_vector_get (y, i); - if (wi < 0) - wi = 0; - gsl_vector_set (t, i, sqrt (wi) * yi); - } - - gsl_blas_dgemv (CblasTrans, 1.0, A, t, 0.0, xt); - - /* Scale the matrix Q, Q' = Q S^-1 */ - - gsl_matrix_memcpy (QSI, Q); - - { - double s0 = gsl_vector_get (S, 0); - p_eff = 0; - - for (j = 0; j < p; j++) - { - gsl_vector_view column = gsl_matrix_column (QSI, j); - double sj = gsl_vector_get (S, j); - double alpha; - - if (sj <= tol * s0) - { - alpha = 0.0; - } - else - { - alpha = 1.0 / sj; - p_eff++; - } - - gsl_vector_scale (&column.vector, alpha); - } - - *rank = p_eff; - } - - gsl_vector_set_zero (c); - - /* solution */ - gsl_blas_dgemv (CblasNoTrans, 1.0, QSI, xt, 0.0, c); - - /* unscale the balancing factors */ - gsl_vector_div (c, D); - - /* compute chisq, from residual r = y - X c */ - { - double r2 = 0; - - for (i = 0; i < n; i++) - { - double yi = gsl_vector_get (y, i); - double wi = gsl_vector_get (w, i); - gsl_vector_const_view row = gsl_matrix_const_row (X, i); - double y_est, ri; - gsl_blas_ddot (&row.vector, c, &y_est); - ri = yi - y_est; - r2 += wi * ri * ri; - } - - *chisq = r2; - - /* Form covariance matrix cov = (X^T W X)^-1 = (Q S^-1) (Q S^-1)^T */ - - for (i = 0; i < p; i++) - { - gsl_vector_view row_i = gsl_matrix_row (QSI, i); - double d_i = gsl_vector_get (D, i); - - for (j = i; j < p; j++) - { - gsl_vector_view row_j = gsl_matrix_row (QSI, j); - double d_j = gsl_vector_get (D, j); - double s; - - gsl_blas_ddot (&row_i.vector, &row_j.vector, &s); - - gsl_matrix_set (cov, i, j, s / (d_i * d_j)); - gsl_matrix_set (cov, j, i, s / (d_i * d_j)); - } - } - } - - return GSL_SUCCESS; - } -} - int gsl_multifit_wlinear (const gsl_matrix * X, const gsl_vector * w, @@ -323,10 +138,8 @@ gsl_matrix * cov, double *chisq, gsl_multifit_linear_workspace * work) { - int status = multifit_wlinear_svd (X, w, y, tol, 1, rank, c, - cov, chisq, work); + int status = gsl_multifit_wlinear_tsvd(X, w, y, tol, c, cov, chisq, rank, work); return status; - } int @@ -339,8 +152,7 @@ gsl_matrix * cov, double *chisq, gsl_multifit_linear_workspace * work) { - int status = multifit_wlinear_svd (X, w, y, tol, 0, rank, c, - cov, chisq, work); + /* FIXME: this call does actually perform balancing, but this function is deprecated anyway */ + int status = gsl_multifit_wlinear_tsvd(X, w, y, tol, c, cov, chisq, rank, work); return status; - } diff -Nru gsl-2.4+dfsg/NEWS gsl-2.5+dfsg/NEWS --- gsl-2.4+dfsg/NEWS 2017-06-14 07:07:57.000000000 +0000 +++ gsl-2.5+dfsg/NEWS 2018-06-14 16:24:49.000000000 +0000 @@ -1,4 +1,63 @@ -* What is new in gsl-2.4: +* What is new in gsl-2.5: + +** doc bug fix in binomial distribution figure (Damien Desfontaines) + +** added Wishart distribution (Timothée Flutre) + +** added new module for digital filtering (gsl_filter); current filters include: + Gaussian filter + median filter + recursive median filter + impulse detection filter + +** added new module for moving window statistics (gsl_movstat) + +** added statistics functions: + gsl_stats_median() + gsl_stats_select() + gsl_stats_mad() + gsl_stats_mad0() + gsl_stats_Sn_from_sorted_data() + gsl_stats_Qn_from_sorted_data() + gsl_stats_gastwirth_from_sorted_data() + gsl_stats_trmean_from_sorted_data() + +** added Romberg integration (gsl_integration_romberg) + +** bug fix in deprecated functions gsl_multifit_wlinear_svd and + gsl_multifit_wlinear_usvd (reported by Vlad Koli) + +** documention corrected to state that gsl_sf_legendre functions do + not include Condon-Shortley phase by default + +** bug fix in exponential fitting example when using larger number + of points (reported by Anna Russo) + +** changed internal workspace inside gsl_spmatrix to a union to + avoid casting (suggested by Manuel Schmitz) + +** bug fixes in ode-initval2 for very rare solver crashing cases: + #52230 in msadams (reported by Michael Kaufman) and + #52336 in msbdf (reported by Andrew Benson). As a fix, + the maximum scaling of controlled step length was decreased + from 5.0 to 4.9. + +** add histogram2d figure to manual (was missing in 2.4) + +** bug fix in gsl_spmatrix_add for duplicate input arguments + (reported by Alfredo Correa) + +** add support for negative arguments nu in gsl_sf_bessel_Jnu and + gsl_sf_bessel_Ynu (Konrad Griessinger) + +** better texinfo documentation for gsl_sf_hyperg functions + +** fix vector and matrix fread/fwrite testing on windows systems + when tmpfile() fails + +** fix for rstat/test.c on PPC64 (reported by Adam Majer) + +* What was new in gsl-2.4: ** migrated documentation to Sphinx software, which has built-in support for latex equations and figures in HTML output diff -Nru gsl-2.4+dfsg/ode-initval2/ChangeLog gsl-2.5+dfsg/ode-initval2/ChangeLog --- gsl-2.4+dfsg/ode-initval2/ChangeLog 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/ChangeLog 2018-05-02 20:44:20.000000000 +0000 @@ -1,3 +1,25 @@ +2018-03-18 Tuomo Keskitalo + + * rk2imp.c and evolve.c: Added debug printouts, run indent -gnu -nut. + Thanks for Dominic Steinitz for the additions! + * test.c: Added identifiers to debug printouts. + +2017-11-04 Tuomo Keskitalo + + * cscal.c: Corrected bug #52336 in cscal.c: Decreased maximum step + length increase coefficient (now named maxscale) from 5.0 to 4.9 + because value of 5.0 hits a singularity in msbdf stepper with + order 3, causing a floating point exception. Thanks to Andrew + Benson for reporting this bug! + +2017-10-22 Tuomo Keskitalo + + * msadams.c: Corrected bug #52230 in msadams_apply, where solver + crashed to order change -2 error. This could happen in a very rare + case when two consecutive failed steps suggest decreasing + order. Fix is to reset solver if that happens. Thanks for Michael + Kaufman for reporting this bug and testing the fix! + 2013-06-08 Tuomo Keskitalo * driver.c: Removed redundant if clause. Thanks to diff -Nru gsl-2.4+dfsg/ode-initval2/cscal.c gsl-2.5+dfsg/ode-initval2/cscal.c --- gsl-2.4+dfsg/ode-initval2/cscal.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/cscal.c 2018-01-04 21:49:12.000000000 +0000 @@ -125,11 +125,12 @@ } else if (rmax < 0.5) { - /* increase step, no more than factor of 5 */ + /* increase step, no more than factor of maxscale */ double r = S / pow (rmax, 1.0 / (ord + 1.0)); + const double maxscale = 4.9; - if (r > 5.0) - r = 5.0; + if (r > maxscale) + r = maxscale; if (r < 1.0) /* don't allow any decrease caused by S<1 */ r = 1.0; diff -Nru gsl-2.4+dfsg/ode-initval2/evolve.c gsl-2.5+dfsg/ode-initval2/evolve.c --- gsl-2.4+dfsg/ode-initval2/evolve.c 2016-08-19 15:23:27.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/evolve.c 2018-05-02 20:44:20.000000000 +0000 @@ -140,22 +140,22 @@ /* Calculate initial dydt once or reuse previous value if the method can benefit. */ - + if (step->type->can_use_dydt_in) { if (e->count == 0) - { - int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); + { + int status = GSL_ODEIV_FN_EVAL (dydt, t0, y, e->dydt_in); - if (status) - { - return status; - } - } + if (status) + { + return status; + } + } else - { - DBL_MEMCPY (e->dydt_in, e->dydt_out, e->dimension); - } + { + DBL_MEMCPY (e->dydt_in, e->dydt_out, e->dimension); + } } try_step: @@ -200,6 +200,10 @@ h0 *= 0.5; +#ifdef DEBUG + printf ("-- gsl_odeiv2_evolve_apply h0=%.5e\n", h0); +#endif + /* Check that an actual decrease in h0 occured and the suggested h0 will change the time by at least 1 ulp */ @@ -209,17 +213,22 @@ if (fabs (h0) < fabs (h_old) && t_next != t_curr) { - + /* Step was decreased. Undo step, and try again with new h0. */ - + DBL_MEMCPY (y, e->y0, dydt->dimension); e->failed_steps++; goto try_step; } else { - *h = h0; /* notify user of step-size which caused the failure */ - *t = t0; /* restore original t value */ +#ifdef DEBUG + printf + ("-- gsl_odeiv2_evolve_apply h0=%.5e, t0=%.5e, step_status=%d\n", + h0, t0, step_status); +#endif + *h = h0; /* notify user of step-size which caused the failure */ + *t = t0; /* restore original t value */ return step_status; } } diff -Nru gsl-2.4+dfsg/ode-initval2/msadams.c gsl-2.5+dfsg/ode-initval2/msadams.c --- gsl-2.4+dfsg/ode-initval2/msadams.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/msadams.c 2018-01-04 21:49:12.000000000 +0000 @@ -850,13 +850,13 @@ #endif } - /* If step is repeatedly rejected, then reset method */ - state->failcount++; { const size_t max_failcount = 3; + /* If step is repeatedly rejected, then reset method */ + if (state->failcount > max_failcount && state->ni > 1) { msadams_reset (vstate, dim); @@ -866,6 +866,19 @@ printf ("-- max_failcount reached, msadams_reset called\n"); #endif } + + /* Attempt to decrease order twice is indicative of system stiffness. + Reset method to enable fast recovery. */ + + else if ((int)state->ordprev - (int)ord >= 2) + { + msadams_reset (vstate, dim); + ord = state->ord; + +#ifdef DEBUG + printf ("-- order decreased by two, msadams_reset called\n"); +#endif + } } } else diff -Nru gsl-2.4+dfsg/ode-initval2/rk2imp.c gsl-2.5+dfsg/ode-initval2/rk2imp.c --- gsl-2.4+dfsg/ode-initval2/rk2imp.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/rk2imp.c 2018-05-02 20:44:20.000000000 +0000 @@ -243,6 +243,20 @@ const modnewton1_state_t *esol = state->esol; +#ifdef DEBUG + { + size_t di; + + printf ("rk2imp_apply: t=%.5e, h=%.5e, y:", t, h); + + for (di = 0; di < dim; di++) + { + printf ("%.5e ", y[di]); + } + printf ("\n"); + } +#endif + /* Runge-Kutta coefficients */ gsl_matrix *A = state->A; const double b[] = { 1.0 }; @@ -284,12 +298,36 @@ /* Evaluate Jacobian for modnewton1 */ { +#ifdef DEBUG + printf ("-- evaluate jacobian\n"); +#endif int s = GSL_ODEIV_JA_EVAL (sys, t, y, dfdy->data, dfdt); if (s != GSL_SUCCESS) { +#ifdef DEBUG + printf ("-- FAIL at jacobian function evaluation\n"); +#endif return s; } +#ifdef DEBUG + size_t M; + size_t N; + size_t i; + size_t j; + + M = dfdy->size1; + N = dfdy->size2; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + double aij = gsl_matrix_get (dfdy, i, j); + printf ("(%3lu,%3lu)[%lu,%lu]: %22.18g\n", M, N, i, j, aij); + } + } +#endif } /* Calculate a single step with size h */ @@ -301,11 +339,45 @@ { return s; } + +#ifdef DEBUG + size_t M; + size_t N; + size_t i; + size_t j; + + printf ("-- modnewton1_init IhAJ:\n"); + + M = esol->IhAJ->size1; + N = esol->IhAJ->size2; + + for (i = 0; i < M; i++) + { + for (j = 0; j < N; j++) + { + double aij = gsl_matrix_get (esol->IhAJ, i, j); + printf ("(%3lu,%3lu)[%lu,%lu]: %22.18g\n", M, N, i, j, aij); + } + } + + printf ("-- modnewton1_init p:\n"); + + M = esol->p->size; + + for (i = 0; i < M; i++) + { + double pi = gsl_permutation_get (esol->p, i); + printf ("(%3lu)[%lu]: %22.18g\n", M, i, pi); + } +#endif } { int s = modnewton1_solve ((void *) esol, A, c, t, h, y, sys, YZ, errlev); +#ifdef DEBUG + printf ("-- modnewton1_solve s=%d\n", s); +#endif if (s != GSL_SUCCESS) { @@ -313,6 +385,20 @@ } } +#ifdef DEBUG + { + size_t di; + + printf ("YZ:"); + + for (di = 0; di < dim * RK2IMP_STAGE; di++) + { + printf ("%.5e ", YZ[di]); + } + printf ("\n"); + } +#endif + { int s = GSL_ODEIV_FN_EVAL (sys, t + c[0] * h, YZ, fYZ); @@ -322,6 +408,20 @@ } } +#ifdef DEBUG + { + size_t di; + + printf ("fYZ:"); + + for (di = 0; di < dim * RK2IMP_STAGE; di++) + { + printf ("%.5e ", fYZ[di]); + } + printf ("\n"); + } +#endif + { int s = rksubs (y_onestep, h, y, fYZ, b, RK2IMP_STAGE, dim); @@ -422,6 +522,18 @@ } } +#ifdef DEBUG + { + size_t i; + printf ("-- error estimates: "); + for (i = 0; i < dim; i++) + { + printf ("%.5e ", yerr[i]); + } + printf ("\n"); + } +#endif + /* Derivatives at output */ if (dydt_out != NULL) diff -Nru gsl-2.4+dfsg/ode-initval2/test.c gsl-2.5+dfsg/ode-initval2/test.c --- gsl-2.4+dfsg/ode-initval2/test.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/ode-initval2/test.c 2018-05-02 20:44:20.000000000 +0000 @@ -1185,7 +1185,7 @@ s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, sys, &t, t1, &h, y); #ifdef DEBUG - printf (" %.5e %.5e %.5e %d\n", t, y[0], y[1], + printf ("test_evolve_system at: %.5e %.5e %.5e %d\n", t, y[0], y[1], gsl_odeiv2_step_order (d->s)); #endif @@ -1270,7 +1270,7 @@ s = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, sys, &t, t1, &h, y); #ifdef DEBUG - printf ("%.5e %.5e %.5e %d\n", t, y[0], y[1], + printf ("sys_driver at: %.5e %.5e %.5e %d\n", t, y[0], y[1], gsl_odeiv2_step_order (d->s)); #endif @@ -1601,7 +1601,8 @@ status = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, 2, &h, &y); #ifdef DEBUG - printf ("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); + printf ("test_stepfn at: i=%d status=%d t=%g h=%g y=%g\n", + i, status, t, h, y); #endif if (status != GSL_SUCCESS) @@ -1648,7 +1649,8 @@ status = gsl_odeiv2_evolve_apply (d->e, d->c, d->s, &sys, &t, 1.0, &h, &y); #ifdef DEBUG - printf ("i=%d status=%d t=%g h=%g y=%g\n", i, status, t, h, y); + printf ("test_stepfn2 at: i=%d status=%d t=%g h=%g y=%g\n", + i, status, t, h, y); #endif if (status != GSL_SUCCESS) break; diff -Nru gsl-2.4+dfsg/randist/gsl_randist.h gsl-2.5+dfsg/randist/gsl_randist.h --- gsl-2.4+dfsg/randist/gsl_randist.h 2016-08-10 21:24:45.000000000 +0000 +++ gsl-2.5+dfsg/randist/gsl_randist.h 2018-05-18 03:26:50.000000000 +0000 @@ -109,6 +109,24 @@ int gsl_ran_multivariate_gaussian_mean (const gsl_matrix * X, gsl_vector * mu_hat); int gsl_ran_multivariate_gaussian_vcov (const gsl_matrix * X, gsl_matrix * sigma_hat); +int gsl_ran_wishart (const gsl_rng * r, + const double df, + const gsl_matrix * L, + gsl_matrix * result, + gsl_matrix * work); +int gsl_ran_wishart_log_pdf (const gsl_matrix * X, + const gsl_matrix * L_X, + const double df, + const gsl_matrix * L, + double * result, + gsl_matrix * work); +int gsl_ran_wishart_pdf (const gsl_matrix * X, + const gsl_matrix * L_X, + const double df, + const gsl_matrix * L, + double * result, + gsl_matrix * work); + double gsl_ran_landau (const gsl_rng * r); double gsl_ran_landau_pdf (const double x); diff -Nru gsl-2.4+dfsg/randist/Makefile.am gsl-2.5+dfsg/randist/Makefile.am --- gsl-2.4+dfsg/randist/Makefile.am 2016-08-10 21:24:45.000000000 +0000 +++ gsl-2.5+dfsg/randist/Makefile.am 2018-05-18 03:26:50.000000000 +0000 @@ -4,7 +4,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -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 gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c mvgauss.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c +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 gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c mvgauss.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c wishart.c TESTS = $(check_PROGRAMS) diff -Nru gsl-2.4+dfsg/randist/Makefile.in gsl-2.5+dfsg/randist/Makefile.in --- gsl-2.4+dfsg/randist/Makefile.in 2017-06-19 12:55:40.000000000 +0000 +++ gsl-2.5+dfsg/randist/Makefile.in 2018-06-13 20:31:03.000000000 +0000 @@ -101,7 +101,7 @@ hyperg.lo laplace.lo levy.lo logarithmic.lo logistic.lo \ lognormal.lo multinomial.lo mvgauss.lo nbinomial.lo pareto.lo \ pascal.lo poisson.lo rayleigh.lo shuffle.lo sphere.lo tdist.lo \ - weibull.lo landau.lo binomial_tpe.lo + weibull.lo landau.lo binomial_tpe.lo wishart.lo libgslrandist_la_OBJECTS = $(am_libgslrandist_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -533,7 +533,7 @@ noinst_LTLIBRARIES = libgslrandist.la pkginclude_HEADERS = gsl_randist.h AM_CPPFLAGS = -I$(top_srcdir) -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 gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c mvgauss.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c +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 gausszig.c gausstail.c geometric.c gumbel.c hyperg.c laplace.c levy.c logarithmic.c logistic.c lognormal.c multinomial.c mvgauss.c nbinomial.c pareto.c pascal.c poisson.c rayleigh.c shuffle.c sphere.c tdist.c weibull.c landau.c binomial_tpe.c wishart.c TESTS = $(check_PROGRAMS) test_SOURCES = test.c test_LDADD = libgslrandist.la ../rng/libgslrng.la ../cdf/libgslcdf.la ../specfunc/libgslspecfunc.la ../integration/libgslintegration.la ../complex/libgslcomplex.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../statistics/libgslstatistics.la ../sort/libgslsort.la ../linalg/libgsllinalg.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../block/libgslblock.la @@ -644,6 +644,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/weibull.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wishart.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff -Nru gsl-2.4+dfsg/randist/test.c gsl-2.5+dfsg/randist/test.c --- gsl-2.4+dfsg/randist/test.c 2016-09-15 20:16:11.000000000 +0000 +++ gsl-2.5+dfsg/randist/test.c 2018-05-18 03:26:50.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #define N 100000 @@ -166,6 +167,9 @@ void test_multivariate_gaussian_log_pdf (void); void test_multivariate_gaussian_pdf (void); void test_multivariate_gaussian (void); +void test_wishart_log_pdf (void); +void test_wishart_pdf (void); +void test_wishart (void); double test_gumbel1 (void); double test_gumbel1_pdf (double x); double test_gumbel2 (void); @@ -345,6 +349,10 @@ test_multivariate_gaussian_pdf (); test_multivariate_gaussian (); + test_wishart_log_pdf (); + test_wishart_pdf (); + test_wishart (); + testPDF (FUNC2 (gumbel1)); testPDF (FUNC2 (gumbel2)); testPDF (FUNC2 (landau)); @@ -1853,6 +1861,149 @@ } +/* Examples from R (GPL): http://www.r-project.org/ + * R> version$version.string # R version 3.4.1 (2017-06-30) + * R> library(MCMCpack); packageVersion("MCMCpack") # 1.3.9 + * R> df <- 3 + * R> V <- matrix(data=c(1, 0.3, 0.3, 1), nrow=2, ncol=2) + * R> X <- matrix(data=c(2.213322, 1.453357, 1.453357, 3.285779), nrow=2, ncol=2) + * R> sprintf("%.15f", log(dwish(W=X, v=df, S=V))) # -4.931913612377813 + */ +void +test_wishart_log_pdf (void) +{ + size_t d = 2; + const double df = 3, exp_res = -4.931913612377813; + double obs_res; + gsl_matrix * V = gsl_matrix_calloc(d, d); + gsl_matrix * L = gsl_matrix_calloc(d, d); + gsl_matrix * X = gsl_matrix_calloc(d, d); + gsl_matrix * L_X = gsl_matrix_calloc(d, d); + gsl_matrix * work = gsl_matrix_calloc(d, d); + + gsl_matrix_set(V, 0, 0, 1); + gsl_matrix_set(V, 1, 1, 1); + gsl_matrix_set(V, 0, 1, 0.3); + gsl_matrix_set(V, 1, 0, 0.3); + + gsl_matrix_memcpy(L, V); + gsl_linalg_cholesky_decomp1(L); + + gsl_matrix_set(X, 0, 0, 2.213322); + gsl_matrix_set(X, 1, 1, 3.285779); + gsl_matrix_set(X, 0, 1, 1.453357); + gsl_matrix_set(X, 1, 0, 1.453357); + + gsl_matrix_memcpy(L_X, X); + gsl_linalg_cholesky_decomp1(L_X); + + gsl_ran_wishart_log_pdf(X, L_X, df, L, &obs_res, work); + gsl_test_rel(obs_res, exp_res, 1.0e-10, "gsl_ran_wishart_log_pdf"); + + gsl_matrix_free(V); + gsl_matrix_free(L); + gsl_matrix_free(X); + gsl_matrix_free(L_X); + gsl_matrix_free(work); +} + + +/* Examples from R (GPL): http://www.r-project.org/ + * R> version$version.string # R version 3.4.1 (2017-06-30) + * R> library(MCMCpack); packageVersion("MCMCpack") # 1.3.9 + * R> df <- 3 + * R> V <- matrix(data=c(1, 0.3, 0.3, 1), nrow=2, ncol=2) + * R> X <- matrix(data=c(2.213322, 1.453357, 1.453357, 3.285779), nrow=2, ncol=2) + * R> sprintf("%.15f", dwish(W=X, v=df, S=V)) # 0.007212687778224 + */ +void +test_wishart_pdf (void) +{ + size_t d = 2; + const double df = 3, exp_res = 0.007212687778224; + double obs_res; + gsl_matrix * V = gsl_matrix_calloc(d, d); + gsl_matrix * L = gsl_matrix_calloc(d, d); + gsl_matrix * X = gsl_matrix_calloc(d, d); + gsl_matrix * L_X = gsl_matrix_calloc(d, d); + gsl_matrix * work = gsl_matrix_calloc(d, d); + + gsl_matrix_set(V, 0, 0, 1); + gsl_matrix_set(V, 1, 1, 1); + gsl_matrix_set(V, 0, 1, 0.3); + gsl_matrix_set(V, 1, 0, 0.3); + + gsl_matrix_memcpy(L, V); + gsl_linalg_cholesky_decomp1(L); + + gsl_matrix_set(X, 0, 0, 2.213322); + gsl_matrix_set(X, 1, 1, 3.285779); + gsl_matrix_set(X, 0, 1, 1.453357); + gsl_matrix_set(X, 1, 0, 1.453357); + + gsl_matrix_memcpy(L_X, X); + gsl_linalg_cholesky_decomp1(L_X); + + gsl_ran_wishart_pdf(X, L_X, df, L, &obs_res, work); + gsl_test_rel(obs_res, exp_res, 1.0e-10, "gsl_ran_wishart_pdf"); + + gsl_matrix_free(V); + gsl_matrix_free(L); + gsl_matrix_free(X); + gsl_matrix_free(L_X); + gsl_matrix_free(work); +} + + +/* Draw N random "matrices" according to a W_d(df,V) with d=1 and V=1, + * and check that their mean and variance are close enough to those of + * a Chi-squared(df), respectively df and 2df. + */ +void +test_wishart (void) +{ + size_t d = 1, i, j; + double df[5] = {1, 3, 5, 7, 9}, mean_wishart, var_wishart; + int status; + gsl_matrix * V = gsl_matrix_calloc(d, d); + gsl_matrix * L = gsl_matrix_calloc(d, d); + gsl_matrix * sample_wishart = gsl_matrix_calloc(d, d); + gsl_matrix * work = gsl_matrix_calloc(d, d); + gsl_vector * samples_wishart = gsl_vector_calloc(N); + + gsl_matrix_set(V, 0, 0, 1.0); + gsl_matrix_memcpy(L, V); + gsl_linalg_cholesky_decomp1(L); + + for (j = 0; j < 5; ++j) { /* for loop over df */ + + /* draw N random variables from W(df,V) */ + for (i = 0; i < N; ++i) { + status = gsl_ran_wishart(r_global, df[j], L, sample_wishart, work); + gsl_vector_set(samples_wishart, i, gsl_matrix_get(sample_wishart, 0, 0)); + } + + /* compute their mean and variance */ + mean_wishart = gsl_stats_mean(samples_wishart->data, + samples_wishart->stride, N); + var_wishart = gsl_stats_variance_m(samples_wishart->data, + samples_wishart->stride, + N, mean_wishart); + + /* check */ + gsl_test_rel(mean_wishart, df[j], 1.0e-1, "gsl_ran_wishart, mean"); + gsl_test_rel(var_wishart, 2*df[j], 1.0e-1, "gsl_ran_wishart, var"); + + } /* end of for loop over df */ + + gsl_matrix_free(V); + gsl_matrix_free(L); + gsl_matrix_free(sample_wishart); + gsl_matrix_free(work); + gsl_vector_free(samples_wishart); +} + + double test_geometric (void) { diff -Nru gsl-2.4+dfsg/randist/wishart.c gsl-2.5+dfsg/randist/wishart.c --- gsl-2.4+dfsg/randist/wishart.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/randist/wishart.c 2018-05-18 02:48:47.000000000 +0000 @@ -0,0 +1,220 @@ +/* randist/wishart.c + * + * Copyright (C) 2017 Timothée Flutre + * + * 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 3 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Generate a random matrix from a Wishart distribution using the Bartlett + * decomposition, following Smith and Hocking, Journal of the Royal Statistical + * Society. Series C (Applied Statistics), Vol. 21, No. 3 (1972), pp. 341-345. + * + * df degrees of freedom + * L matrix resulting from the Cholesky decomposition of + * the scale matrix V = L L^T (dimension d x d) + * result output matrix (dimension d x d) + * work matrix used for intermediate computations (dimension d x d) + */ +int +gsl_ran_wishart (const gsl_rng * r, + const double df, + const gsl_matrix * L, + gsl_matrix * result, + gsl_matrix * work) +{ + if (L->size1 != L->size2) + { + GSL_ERROR("L should be a square matrix", GSL_ENOTSQR); + } + else if (result->size1 != result->size2) + { + GSL_ERROR("result should be a square matrix", GSL_ENOTSQR); + } + else if (work->size1 != work->size2) + { + GSL_ERROR("work should be a square matrix", GSL_ENOTSQR); + } + else if (result->size1 != L->size1) + { + GSL_ERROR("incompatible dimensions of result matrix", GSL_EBADLEN); + } + else if (work->size1 != L->size1) + { + GSL_ERROR("incompatible dimensions of work matrix", GSL_EBADLEN); + } + else if (df <= L->size1 - 1) + { + GSL_ERROR("incompatible degrees of freedom", GSL_EDOM); + } + else + { + /* result: X = L A A^T L^T */ + + size_t d = L->size1, i, j; + + /* insure the upper part of A is zero before filling its lower part */ + gsl_matrix_set_zero(work); + for (i = 0; i < d; ++i) + { + gsl_matrix_set(work, i, i, sqrt(gsl_ran_chisq(r, df - i))); + + for (j = 0; j < i; ++j) + { + gsl_matrix_set(work, i, j, gsl_ran_ugaussian(r)); + } + } + + /* compute L * A */ + gsl_blas_dtrmm(CblasLeft, CblasLower, CblasNoTrans, CblasNonUnit, 1.0, + L, work); + + /* compute (L * A) * (L * A)^T */ + gsl_blas_dsyrk(CblasUpper, CblasNoTrans, 1.0, work, 0.0, result); + for (i = 0; i < d; ++i) + { + for (j = 0; j < i; ++j) + { + gsl_matrix_set(result, i, j, gsl_matrix_get(result, j, i)); + } + } + + return GSL_SUCCESS; + } +} + +/* Compute the log of the probability density function at a given quantile + * matrix for a Wishart distribution using the Cholesky decomposition of the + * scale matrix. + * + * X quantile matrix at which to evaluate the PDF (dimension d x d) + * L_X matrix resulting from the Cholesky decomposition of + * of the quantile matrix at which to evaluate the PDF + * X = L_X L_X^T (dimension d x d) + * df degrees of freedom + * L matrix resulting from the Cholesky decomposition of + * the scale matrix V = L L^T (dimension d x d) + * result output of the density (dimension 1) + * work matrix used for intermediate computations (dimension d x d) + */ +int +gsl_ran_wishart_log_pdf (const gsl_matrix * X, + const gsl_matrix * L_X, + const double df, + const gsl_matrix * L, + double * result, + gsl_matrix * work) +{ + if (L->size1 != L->size2) + { + GSL_ERROR("L should be a square matrix", GSL_ENOTSQR); + } + else if (X->size1 != X->size2) + { + GSL_ERROR("X should be a square matrix", GSL_ENOTSQR); + } + else if (L_X->size1 != L_X->size2) + { + GSL_ERROR("L_X should be a square matrix", GSL_ENOTSQR); + } + else if (X->size1 != L->size1) + { + GSL_ERROR("incompatible dimensions of X matrix", GSL_EBADLEN); + } + else if (L_X->size1 != L->size1) + { + GSL_ERROR("incompatible dimensions of L_X matrix", GSL_EBADLEN); + } + else if (df <= L->size1 - 1) + { + GSL_ERROR("incompatible degrees of freedom", GSL_EDOM); + } + else + { + size_t d = L->size1, i; + int status; + double log_mv_Ga, log_det_V, log_det_X, tr_Vinv_X; + + /* compute the log of the multivariate Gamma */ + log_mv_Ga = d * (d-1) * 0.25 * log(M_PI); + for (i = 0; i < d; ++i) + { + log_mv_Ga += gsl_sf_lngamma((df - i + 1) * 0.5); + } + + /* compute the log of the determinant of the scale matrix */ + log_det_V = log(gsl_matrix_get(L, 0, 0)); + for (i = 1; i < d; ++i) + { + log_det_V += log(gsl_matrix_get(L, i, i)); + } + log_det_V = 2 * log_det_V; + + /* compute the log of the determinant of the quantile matrix */ + log_det_X = log(gsl_matrix_get(L_X, 0, 0)); + for (i = 1; i < d; ++i) + { + log_det_X += log(gsl_matrix_get(L_X, i, i)); + } + log_det_X = 2 * log_det_X; + + /* compute the trace of V^(-1) X */ + status = gsl_linalg_cholesky_solve_mat(L, X, work); + if (status) + return status; + tr_Vinv_X = gsl_matrix_get(work, 0, 0); + for (i = 1; i < d; ++i) + { + tr_Vinv_X += gsl_matrix_get(work, i, i); + } + + /* add all to get the log of the PDF */ + *result = - (0.5 * df * d) * log(2.0) + - (0.5 * df) * log_det_V + - log_mv_Ga + + 0.5 * (df - d - 1) * log_det_X + - 0.5 * tr_Vinv_X; + + return GSL_SUCCESS; + } +} + +int +gsl_ran_wishart_pdf (const gsl_matrix * X, + const gsl_matrix * L_X, + const double df, + const gsl_matrix * L, + double * result, + gsl_matrix * work) +{ + double logpdf; + int status = gsl_ran_wishart_log_pdf(X, L_X, df, L, &logpdf, work); + + if (status == GSL_SUCCESS) + *result = exp(logpdf); + + return status; +} diff -Nru gsl-2.4+dfsg/rstat/test.c gsl-2.5+dfsg/rstat/test.c --- gsl-2.4+dfsg/rstat/test.c 2016-10-03 09:08:46.000000000 +0000 +++ gsl-2.5+dfsg/rstat/test.c 2017-07-23 14:03:11.000000000 +0000 @@ -127,7 +127,7 @@ { const size_t N = 2000000; double *data = random_data(N, r); - double data2[] = { 4.0, 7.0, 13.0, 16.0 }; + double data2[] = { 4.0, 7.0, 13.0, 16.0, -5.0 }; size_t i; test_basic(2, data, tol1); @@ -139,10 +139,10 @@ test_basic(1500000, data, tol1); test_basic(2000000, data, tol1); - for (i = 0; i < 4; ++i) + for (i = 0; i < 5; ++i) data2[i] += 1.0e9; - test_basic(4, data2, tol1); + test_basic(5, data2, tol1); free(data); } diff -Nru gsl-2.4+dfsg/specfunc/bessel.h gsl-2.5+dfsg/specfunc/bessel.h --- gsl-2.4+dfsg/specfunc/bessel.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/bessel.h 2017-08-12 22:38:24.000000000 +0000 @@ -39,6 +39,9 @@ int gsl_sf_bessel_Jnu_asympx_e(const double nu, const double x, gsl_sf_result * result); int gsl_sf_bessel_Ynu_asympx_e(const double nu, const double x, gsl_sf_result * result); +int gsl_sf_bessel_Jnupos_e(const double nu, const double x, gsl_sf_result * result); +int gsl_sf_bessel_Ynupos_e(const double nu, const double x, gsl_sf_result * result); + int gsl_sf_bessel_Inu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result); int gsl_sf_bessel_Knu_scaled_asympx_e(const double nu, const double x, gsl_sf_result * result); diff -Nru gsl-2.4+dfsg/specfunc/bessel_Jnu.c gsl-2.5+dfsg/specfunc/bessel_Jnu.c --- gsl-2.4+dfsg/specfunc/bessel_Jnu.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/bessel_Jnu.c 2017-08-12 22:38:24.000000000 +0000 @@ -1,6 +1,6 @@ /* specfunc/bessel_Jnu.c * - * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, 2017 Konrad Griessinger * * 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include "error.h" @@ -74,14 +75,11 @@ /*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ int -gsl_sf_bessel_Jnu_e(const double nu, const double x, gsl_sf_result * result) +gsl_sf_bessel_Jnupos_e(const double nu, const double x, gsl_sf_result * result) { /* CHECK_POINTER(result) */ - - if(x < 0.0 || nu < 0.0) { - DOMAIN_ERROR(result); - } - else if(x == 0.0) { + + if(x == 0.0) { if(nu == 0.0) { result->val = 1.0; result->err = 0.0; @@ -175,6 +173,35 @@ } } +int +gsl_sf_bessel_Jnu_e(const double nu, const double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if (nu < 0.0) { + int Jstatus = gsl_sf_bessel_Jnupos_e(-nu, x, result); + double Jval = result->val; + double Jerr = result->err; + int Ystatus = gsl_sf_bessel_Ynupos_e(-nu, x, result); + double Yval = result->val; + double Yerr = result->err; + /* double s = sin(M_PI*nu), c = cos(M_PI*nu); */ + int sinstatus = gsl_sf_sin_pi_e(nu, result); + double s = result->val; + double serr = result->err; + int cosstatus = gsl_sf_cos_pi_e(nu, result); + double c = result->val; + double cerr = result->err; + result->val = s*Yval + c*Jval; + result->err = fabs(c*Yerr) + fabs(s*Jerr) + fabs(cerr*Yval) + fabs(serr*Jval); + return GSL_ERROR_SELECT_4(Jstatus, Ystatus, sinstatus, cosstatus); + } + else return gsl_sf_bessel_Jnupos_e(nu, x, result); +} + /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ #include "eval.h" diff -Nru gsl-2.4+dfsg/specfunc/bessel_Ynu.c gsl-2.5+dfsg/specfunc/bessel_Ynu.c --- gsl-2.4+dfsg/specfunc/bessel_Ynu.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/bessel_Ynu.c 2017-08-12 22:38:24.000000000 +0000 @@ -1,6 +1,6 @@ /* specfunc/bessel_Ynu.c * - * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman + * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, 2017 Konrad Griessinger * * 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 @@ -23,6 +23,7 @@ #include #include #include +#include #include "error.h" @@ -65,14 +66,10 @@ /*-*-*-*-*-*-*-*-*-*-*-* Functions with Error Codes *-*-*-*-*-*-*-*-*-*-*-*/ int -gsl_sf_bessel_Ynu_e(double nu, double x, gsl_sf_result * result) +gsl_sf_bessel_Ynupos_e(double nu, double x, gsl_sf_result * result) { /* CHECK_POINTER(result) */ - - if(x <= 0.0 || nu < 0.0) { - DOMAIN_ERROR(result); - } - else if(nu > 50.0) { + if(nu > 50.0) { return gsl_sf_bessel_Ynu_asymp_Olver_e(nu, x, result); } else { @@ -120,6 +117,34 @@ } } +int +gsl_sf_bessel_Ynu_e(double nu, double x, gsl_sf_result * result) +{ + /* CHECK_POINTER(result) */ + + if(x <= 0.0) { + DOMAIN_ERROR(result); + } + else if (nu < 0.0) { + int Jstatus = gsl_sf_bessel_Jnupos_e(-nu, x, result); + double Jval = result->val; + double Jerr = result->err; + int Ystatus = gsl_sf_bessel_Ynupos_e(-nu, x, result); + double Yval = result->val; + double Yerr = result->err; + /* double s = sin(M_PI*nu), c = cos(M_PI*nu); */ + int sinstatus = gsl_sf_sin_pi_e(nu, result); + double s = result->val; + double serr = result->err; + int cosstatus = gsl_sf_cos_pi_e(nu, result); + double c = result->val; + double cerr = result->err; + result->val = c*Yval - s*Jval; + result->err = fabs(c*Yerr) + fabs(s*Jerr) + fabs(cerr*Yval) + fabs(serr*Jval); + return GSL_ERROR_SELECT_4(Jstatus, Ystatus, sinstatus, cosstatus); + } + else return gsl_sf_bessel_Ynupos_e(nu, x, result); +} /*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ diff -Nru gsl-2.4+dfsg/specfunc/gsl_sf.h gsl-2.5+dfsg/specfunc/gsl_sf.h --- gsl-2.4+dfsg/specfunc/gsl_sf.h 2017-05-20 08:10:34.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/gsl_sf.h 2017-08-12 22:38:24.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff -Nru gsl-2.4+dfsg/specfunc/gsl_sf_sincos_pi.h gsl-2.5+dfsg/specfunc/gsl_sf_sincos_pi.h --- gsl-2.4+dfsg/specfunc/gsl_sf_sincos_pi.h 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/gsl_sf_sincos_pi.h 2017-08-12 22:38:24.000000000 +0000 @@ -0,0 +1,57 @@ +/* specfunc/gsl_sf_sincos_pi.h + * + * Copyright (C) 2017 Konrad Griessinger + * + * 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 3 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, K. Griessinger */ + +#ifndef __GSL_SF_SINCOS_PI_H__ +#define __GSL_SF_SINCOS_PI_H__ + +#include + +#undef __BEGIN_DECLS +#undef __END_DECLS +#ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +#else +# define __BEGIN_DECLS /* empty */ +# define __END_DECLS /* empty */ +#endif + +__BEGIN_DECLS + + +/* sin_pi(x) with GSL semantics. This is actually important + * because we want to control the error estimate, and trying + * to guess the error for the standard library implementation + * every time it is used would be a little goofy. + */ +int gsl_sf_sin_pi_e(double x, gsl_sf_result * result); +double gsl_sf_sin_pi(const double x); + + +/* cos_pi(x) with GSL semantics. + */ +int gsl_sf_cos_pi_e(double x, gsl_sf_result * result); +double gsl_sf_cos_pi(const double x); + + +__END_DECLS + +#endif /* __GSL_SF_SINCOS_PI_H__ */ diff -Nru gsl-2.4+dfsg/specfunc/Makefile.am gsl-2.5+dfsg/specfunc/Makefile.am --- gsl-2.4+dfsg/specfunc/Makefile.am 2017-05-20 08:10:34.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/Makefile.am 2017-08-12 22:38:24.000000000 +0000 @@ -1,12 +1,12 @@ noinst_LTLIBRARIES = libgslspecfunc.la -pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hermite.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h +pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hermite.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_sincos_pi.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h legendre_source.c AM_CPPFLAGS = -I$(top_srcdir) -libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hermite.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_P.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c +libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hermite.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_P.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sincos_pi.c sinint.c synchrotron.c transport.c trig.c zeta.c TESTS = $(check_PROGRAMS) @@ -14,6 +14,6 @@ test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../poly/libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la -test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hermite.c test_hyperg.c test_legendre.c test_mathieu.c +test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hermite.c test_hyperg.c test_legendre.c test_mathieu.c test_sincos_pi.c diff -Nru gsl-2.4+dfsg/specfunc/Makefile.in gsl-2.5+dfsg/specfunc/Makefile.in --- gsl-2.4+dfsg/specfunc/Makefile.in 2017-06-19 12:55:40.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/Makefile.in 2018-06-13 20:31:04.000000000 +0000 @@ -112,7 +112,8 @@ legendre_con.lo legendre_poly.lo log.lo mathieu_angfunc.lo \ mathieu_charv.lo mathieu_coeff.lo mathieu_radfunc.lo \ mathieu_workspace.lo poch.lo pow_int.lo psi.lo result.lo \ - shint.lo sinint.lo synchrotron.lo transport.lo trig.lo zeta.lo + shint.lo sincos_pi.lo sinint.lo synchrotron.lo transport.lo \ + trig.lo zeta.lo libgslspecfunc_la_OBJECTS = $(am_libgslspecfunc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -122,7 +123,8 @@ test_bessel.$(OBJEXT) test_coulomb.$(OBJEXT) \ test_dilog.$(OBJEXT) test_gamma.$(OBJEXT) \ test_hermite.$(OBJEXT) test_hyperg.$(OBJEXT) \ - test_legendre.$(OBJEXT) test_mathieu.$(OBJEXT) + test_legendre.$(OBJEXT) test_mathieu.$(OBJEXT) \ + test_sincos_pi.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) test_DEPENDENCIES = libgslspecfunc.la ../eigen/libgsleigen.la \ ../linalg/libgsllinalg.la ../sort/libgslsort.la \ @@ -544,13 +546,13 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libgslspecfunc.la -pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hermite.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h +pkginclude_HEADERS = gsl_sf.h gsl_sf_airy.h gsl_sf_bessel.h gsl_sf_clausen.h gsl_sf_coulomb.h gsl_sf_coupling.h gsl_sf_dawson.h gsl_sf_debye.h gsl_sf_dilog.h gsl_sf_elementary.h gsl_sf_ellint.h gsl_sf_elljac.h gsl_sf_erf.h gsl_sf_exp.h gsl_sf_expint.h gsl_sf_fermi_dirac.h gsl_sf_gamma.h gsl_sf_gegenbauer.h gsl_sf_hermite.h gsl_sf_hyperg.h gsl_sf_laguerre.h gsl_sf_lambert.h gsl_sf_legendre.h gsl_sf_log.h gsl_sf_mathieu.h gsl_sf_pow_int.h gsl_sf_psi.h gsl_sf_result.h gsl_sf_sincos_pi.h gsl_sf_synchrotron.h gsl_sf_transport.h gsl_sf_trig.h gsl_sf_zeta.h gsl_specfunc.h noinst_HEADERS = bessel_amp_phase.h bessel_olver.h bessel_temme.h bessel.h hyperg.h legendre.h eval.h chebyshev.h cheb_eval.c cheb_eval_mode.c check.h error.h legendre_source.c AM_CPPFLAGS = -I$(top_srcdir) -libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hermite.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_P.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sinint.c synchrotron.c transport.c trig.c zeta.c +libgslspecfunc_la_SOURCES = airy.c airy_der.c airy_zero.c atanint.c bessel.c bessel.h bessel_I0.c bessel_I1.c bessel_In.c bessel_Inu.c bessel_J0.c bessel_J1.c bessel_Jn.c bessel_Jnu.c bessel_K0.c bessel_K1.c bessel_Kn.c bessel_Knu.c bessel_Y0.c bessel_Y1.c bessel_Yn.c bessel_Ynu.c bessel_amp_phase.c bessel_amp_phase.h bessel_i.c bessel_j.c bessel_k.c bessel_olver.c bessel_temme.c bessel_y.c bessel_zero.c bessel_sequence.c beta.c beta_inc.c clausen.c coulomb.c coupling.c coulomb_bound.c dawson.c debye.c dilog.c elementary.c ellint.c elljac.c erfc.c exp.c expint.c expint3.c fermi_dirac.c gegenbauer.c gamma.c gamma_inc.c hermite.c hyperg_0F1.c hyperg_2F0.c hyperg_1F1.c hyperg_2F1.c hyperg_U.c hyperg.c laguerre.c lambert.c legendre_H3d.c legendre_P.c legendre_Qn.c legendre_con.c legendre_poly.c log.c mathieu_angfunc.c mathieu_charv.c mathieu_coeff.c mathieu_radfunc.c mathieu_workspace.c poch.c pow_int.c psi.c recurse.h result.c shint.c sincos_pi.c sinint.c synchrotron.c transport.c trig.c zeta.c TESTS = $(check_PROGRAMS) test_LDADD = libgslspecfunc.la ../eigen/libgsleigen.la ../linalg/libgsllinalg.la ../sort/libgslsort.la ../matrix/libgslmatrix.la ../vector/libgslvector.la ../blas/libgslblas.la ../cblas/libgslcblas.la ../block/libgslblock.la ../complex/libgslcomplex.la ../poly/libgslpoly.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la -test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hermite.c test_hyperg.c test_legendre.c test_mathieu.c +test_SOURCES = test_sf.c test_sf.h test_airy.c test_bessel.c test_coulomb.c test_dilog.c test_gamma.c test_hermite.c test_hyperg.c test_legendre.c test_mathieu.c test_sincos_pi.c all: all-am .SUFFIXES: @@ -694,6 +696,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sincos_pi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/synchrotron.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_airy.Po@am__quote@ @@ -706,6 +709,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_legendre.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mathieu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sincos_pi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zeta.Plo@am__quote@ diff -Nru gsl-2.4+dfsg/specfunc/sincos_pi.c gsl-2.5+dfsg/specfunc/sincos_pi.c --- gsl-2.4+dfsg/specfunc/sincos_pi.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/sincos_pi.c 2017-10-19 08:27:23.000000000 +0000 @@ -0,0 +1,242 @@ +/* specfunc/sincos_pi.c + * + * Copyright (C) 2017 Gerard Jungman, Konrad Griessinger (konradg@gmx.net) + * + * 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 3 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. + */ + +/* routines for computing sin(pi*x) and cos(pi*x), respectively, with argument reduction */ + +#include +#include +#include +#include +#include + +/* Any double precision number bigger than this is automatically an even integer. */ +#define TWOBIG (2.0 / GSL_DBL_EPSILON) + +/* routine computing sin(pi*x) valid for |x| <= 0.25 using a Taylor expansion around the origin and otherwise a rational approximation from the reference below. Spot-checked to give around 2e-16 relative accuracy. */ +/* I. Koren and O. Zinaty. Evaluating elementary functions in a numerical +coprocessor based on rational approximations. IEEE Transactions on +Computers, Vol.39, No.8, August 1990, pp 1030-1037. */ +/* +static int +sin_pi_koren(const double x, gsl_sf_result *result) +{ + result->val = 0.0; + result->err = 0.0; + if (16.0*fabs(x) < 1.0) { + const double y = M_PI * x; + const double a = y*y; + result->val = y*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a/110.0)/72.0)/42.0)/20.0)/6.0); + } + else { + const double a0 = 1805490264.690988571178600370234394843221; + const double a1 = -164384678.227499837726129612587952660511; + const double a2 = 3664210.647581261810227924465160827365; + const double a3 = -28904.140246461781357223741935980097; + const double a4 = 76.568981088717405810132543523682; + const double b0 = 2298821602.638922662086487520330827251172; + const double b1 = 27037050.118894436776624866648235591988; + const double b2 = 155791.388546947693206469423979505671; + const double b3 = 540.567501261284024767779280700089; + const double t = 16.0*x*x; + result->val = 4.0*x*(((( a4*t + a3 )*t + a2 )*t + a1 )*t + a0)/(((( t + b3 )*t + b2 )*t + b1 )*t + b0); + } + + result->err = GSL_DBL_EPSILON*fabs(result->val); + + return GSL_SUCCESS; +} +*/ + +/* routine computing cos(pi*x) valid for |x| <= 0.25 using a Taylor expansion around the origin and otherwise a rational approximation from the reference below. Spot-checked to give around 2e-16 relative accuracy. */ +/* I. Koren and O. Zinaty. Evaluating elementary functions in a numerical +coprocessor based on rational approximations. IEEE Transactions on +Computers, Vol.39, No.8, August 1990, pp 1030-1037. */ +/* +static int +cos_pi_koren(const double x, gsl_sf_result *result) +{ + result->val = 0.0; + result->err = 0.0; + if (20.0*fabs(x) < 1.0) { + const double y = M_PI * x; + const double a = y*y; + result->val = 1.0 - 0.5*a*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a/90.0)/56.0)/30.0)/12.0); + } + else { + const double a0 = 1090157078.174871420428849017262549038606; + const double a1 = -321324810.993150712401352959397648541681; + const double a2 = 12787876.849523878944051885325593878177; + const double a3 = -150026.206045948110568310887166405972; + const double a4 = 538.333564203182661664319151379451; + const double b0 = 1090157078.174871420428867295670039506886; + const double b1 = 14907035.776643879767410969509628406502; + const double b2 = 101855.811943661368302608146695082218; + const double b3 = 429.772865107391823245671264489311; + const double t = 16.0*x*x; + result->val = (((( a4*t + a3 )*t + a2 )*t + a1 )*t + a0)/(((( t + b3 )*t + b2 )*t + b1 )*t + b0); + } + + result->err = GSL_DBL_EPSILON*fabs(result->val); + + return GSL_SUCCESS; +} +*/ + +/* routine computing sin(pi*x) using a Taylor expansion around the origin and otherwise the library function. */ +static int +sin_pi_taylor(const double x, gsl_sf_result *result) +{ + result->val = 0.0; + result->err = 0.0; + if (16.0*fabs(x) < 1.0) { + const double y = M_PI * x; + const double a = y*y; + result->val = y*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a/110.0)/72.0)/42.0)/20.0)/6.0); + } + else { + result->val = sin(M_PI*x); + } + + result->err = GSL_DBL_EPSILON*fabs(result->val); + + return GSL_SUCCESS; +} + +/* routine computing sin(pi*x) using a Taylor expansion around the origin and otherwise the library function. */ +static int +cos_pi_taylor(const double x, gsl_sf_result *result) +{ + result->val = 0.0; + result->err = 0.0; + if (20.0*fabs(x) < 1.0) { + const double y = M_PI * x; + const double a = y*y; + result->val = 1.0 - 0.5*a*(1.0 - a*(1.0 - a*(1.0 - a*(1.0 - a/90.0)/56.0)/30.0)/12.0); + } + else { + result->val = cos(M_PI*x); + } + + result->err = GSL_DBL_EPSILON*fabs(result->val); + + return GSL_SUCCESS; +} + +int +gsl_sf_sin_pi_e(const double x, gsl_sf_result *result) +{ + double intx = 0.0, fracx = 0.0; + long q; + int sign = 1, status; + + result->val = 0.0; + result->err = 0.0; + fracx = modf(x,&intx); + if (fracx == 0.0) return GSL_SUCCESS; + if(fabs(intx) >= TWOBIG) return GSL_SUCCESS; /* to be sure. Actually should be covered by the line above */ + + q = ( ( (intx >= LONG_MIN) && (intx <= LONG_MAX) ) ? intx : fmod(intx, 2.0) ); + sign = ( q % 2 ? -1 : 1 ); + + /* int sign = 1 - 2*((int)round(fmod(fabs(intx),2.0))); */ + if (fabs(fracx) == 0.5) { /* probably unnecessary */ + if (fracx < 0.0) sign = -sign; + result->val = ( sign != 1 ? -1.0 : 1.0 ); + return GSL_SUCCESS; + } + if (fabs(fracx) > 0.5) { + sign = -sign; + fracx = ( fracx > 0.0 ? fracx-1.0 : fracx+1.0 ); + } + + status = 0; + if (fracx > 0.25) { + status = cos_pi_taylor((fracx-0.5), result); + } + else if (fracx < -0.25) { + status = cos_pi_taylor((fracx+0.5), result); + sign = -sign; + } + else { + status = sin_pi_taylor(fracx, result); + } + if (sign != 1) result->val = -result->val; + return status; +} + +int +gsl_sf_cos_pi_e(const double x, gsl_sf_result *result) +{ + double intx = 0.0, fracx = 0.0; + long q; + int sign = 1, status; + + result->val = 0.0; + result->err = 0.0; + fracx = modf(x,&intx); + if (fabs(fracx) == 0.5) return GSL_SUCCESS; + + if(fabs(intx) >= TWOBIG) { + result->val = 1.0; + return GSL_SUCCESS; + } + + q = ( ( (intx >= LONG_MIN) && (intx <= LONG_MAX) ) ? intx : fmod(intx, 2.0) ); + sign = ( q % 2 ? -1 : 1 ); + + /* int sign = 1 - 2*((int)round(fmod(fabs(intx),2.0))); */ + if (fracx == 0.0) { /* probably unnecessary */ + result->val = ( sign != 1 ? -1.0 : 1.0 ); + return GSL_SUCCESS; + } + if (fabs(fracx) > 0.5) { + sign = -sign; + fracx = ( fracx > 0.0 ? fracx-1.0 : fracx+1.0 ); + } + + status = 0; + if (fracx > 0.25) { + status = sin_pi_taylor((fracx-0.5), result); + sign = -sign; + } + else if (fracx < -0.25) { + status = sin_pi_taylor((fracx+0.5), result); + } + else { + status = cos_pi_taylor(fracx, result); + } + if (sign != 1) result->val = -result->val; + return status; +} + +/*-*-*-*-*-*-*-*-*-* Functions w/ Natural Prototypes *-*-*-*-*-*-*-*-*-*-*/ + +#include "eval.h" + +double +gsl_sf_sin_pi(const double x) +{ + EVAL_RESULT(gsl_sf_sin_pi_e(x, &result)); +} + +double +gsl_sf_cos_pi(const double x) +{ + EVAL_RESULT(gsl_sf_cos_pi_e(x, &result)); +} diff -Nru gsl-2.4+dfsg/specfunc/test_bessel.c gsl-2.5+dfsg/specfunc/test_bessel.c --- gsl-2.4+dfsg/specfunc/test_bessel.c 2017-05-22 09:59:50.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/test_bessel.c 2018-06-12 21:43:29.000000000 +0000 @@ -183,11 +183,11 @@ TEST_SF(s, gsl_sf_bessel_j2_e, ( 1.0, &r), 0.06203505201137386110, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_j2_e, ( 10.0, &r), 0.07794219362856244547, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_j2_e, (100.0, &r), 0.004803441652487953480, TEST_TOL1, GSL_SUCCESS); - TEST_SF(s, gsl_sf_bessel_j2_e, (1048576.0, &r), -3.1518539455252413111e-07, TEST_TOL3, GSL_SUCCESS); #if 0 /* bug #45730; the bug should be fixed, but these tests are disabled since error computation is not correct for these inputs */ + TEST_SF(s, gsl_sf_bessel_j2_e, (1048576.0, &r), -3.1518539455252413111e-07, TEST_TOL3, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_j2_e, (-1.0e22, &r), 5.23214785395139e-23, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_j2_e, (-1.0e21, &r), 7.449501119831337e-22, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_j2_e, (-1.0e20, &r), 7.639704044417282e-21, TEST_TOL2, GSL_SUCCESS); @@ -312,6 +312,320 @@ TEST_SF(s, gsl_sf_bessel_Jnu_e, (2.0, 900.0, &r), -0.019974345269680646400, TEST_TOL4, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Jnu_e, (2.0, 15000.0, &r), -0.0020455820181216382666, TEST_TOL4, GSL_SUCCESS); + /* Jnu for negative integer nu */ + + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 4.3966088395743909188e-1, &r), -4.4808688873945295916e-19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-43, 3.2953184511924683369e-1, &r), -3.4985116870357066158e-87, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 3.5081119129046332101e-1, &r), 2.2148387185334257376e-11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-17, 1.6717234250796879247e-1, &r), -1.3336696368048418208e-33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 1.0085435516296562067e-1, &r), 4.6463938513369299663e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 1.0423882905853389231e-1, &r), -7.0211488877617616588e-69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-10, 2.014635069337132169e-1, &r), 2.9614218635575180136e-17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 3.3470953660313309239e-1, &r), -5.3786691977970313226e-41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 1.796487688043502395e-2, &r), -3.9796275104402232636e-37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 4.3851505455005663023e-1, &r), 6.3723816221242007043e-53, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 2.9134673992671269075e-1, &r), -1.4108323502121482121e-60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 7.6696967407852829575e-1, &r), 7.2211466723046636958e-42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 1.9829576302527197691e-2, &r), 1.3193561299244410609e-15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 4.1513019703157674847e-1, &r), 4.362149422492811209e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-19, 1.3033500482689031834e-2, &r), -2.4071043287214877014e-59, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 7.2050154387915780891e-1, &r), 6.8377203227324865568e-4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-36, 9.058436592111083308e-1, &r), 1.1063535538518134862e-54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 4.4893454860671838425e-2, &r), -7.1436404620419702996e-105, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-25, 1.4253284590439372148e-1, &r), -1.3532982149810467304e-54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-35, 6.8075538970323047806e-1, &r), -4.0087398199591044218e-57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-9, 6.9978823056579836732e-2, &r), -2.1657760307485265867e-19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 8.3903642499214990225e-1, &r), 1.8046736761082165751e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-43, 6.543891152683782553e-1, &r), -2.2618181452671187564e-74, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1, 2.557673774862201033e-1, &r), -1.2684081505646766845e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-21, 2.3961944728579204361e-1, &r), -8.7037441094405713341e-40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 3.7732868931080794955e-1, &r), -6.1458679923678486123e-20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-33, 3.8478064679256785588e-1, &r), -2.7471851206170506902e-61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-50, 8.3045728127372512419e-1, &r), 2.6904315506244885678e-84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-33, 3.4391840270211572065e-1, &r), -6.7604474418522862789e-63, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 4.4699489157302132678e-1, &r), -4.1674520864249550489e-38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 8.6894302936681315656e-1, &r), -1.8080036072447165775e-31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 2.3997647040322801696e-1, &r), 1.2775332144705955465e-46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 9.7688590680055575385e-1, &r), 2.260676935437026869e-3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 8.9090003293395823104e-1, &r), 3.8525697232471553813e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 9.4057990133775869779e-1, &r), -5.4483632006108552908e-56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1, 2.6641070579761597867e-1, &r), -1.3202706692617745567e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 9.8878610880180753494e-1, &r), -1.3892626129288932172e-6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 3.1042396387236895292e-1, &r), 7.4291433893935351027e-86, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 6.8722270094498481586e-1, &r), 6.9210950943508574463e-25, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-16, 1.6113707818439830316e-2, &r), 1.5066992425677873707e-47, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 3.0720392023079679622e-1, &r), -7.2938615192106070364e-60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 3.4957196590626821859e-1, &r), 2.153068469114375124e-11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 9.9805150837159144851e-1, &r), 2.4578749047519916152e-3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 8.4538260733781281419e-1, &r), 2.4776262290872395403e-8, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-21, 7.8935512795174026579e-1, &r), -6.4516652247824702208e-29, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-32, 3.4859401756229795902e-1, &r), 1.9985100102959434086e-60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 9.2530929240293814377e-1, &r), 1.3798987861611642315e-39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-32, 5.7276907866586953775e-1, &r), 1.5890407703711501803e-53, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-16, 8.6364032267280037696e-1, &r), 6.9097436254460436398e-20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 8.1065458967451038451e-2, &r), 6.2316950805227520253e-58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-17, 6.946415511078842723e-1, &r), -4.3495405983099048944e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-14, 2.7619565270505476723e-1, &r), 1.0511271746088180311e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 8.579791601466317093e-2, &r), -5.3039175204559594309e-14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-50, 7.4681490716561041968e-1, &r), 1.3331741219055661824e-86, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 9.6631424224612452556e-1, &r), 1.2465815577059566852e-42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-14, 2.6745819874317492788e-1, &r), 6.7024985048974981757e-24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 3.6947309321414497419e-1, &r), 6.4975710352073715961e-38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-49, 2.3389602803779083655e-2, &r), -3.5281224467005794333e-158, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-48, 7.7482504299905127354e-1, &r), 1.3711857024107478291e-81, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 6.5337950709230049969e-1, &r), 9.9749347191786840601e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 5.4117488569210959438e-1, &r), -3.8843890347204927665e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-50, 9.4038774092645791075e-1, &r), 1.3455212768163778034e-81, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1, 5.627399919447310892e-1, &r), -2.703780920058947009e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-35, 7.9925999507829895011e-2, &r), -1.1060656306690664139e-89, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-10, 2.8875439067692705135e-3, &r), 1.0844833648855202142e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 2.7645446745852278572e-1, &r), -2.7740931384652548129e-61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 8.5374968606378578252e-1, &r), 7.5366644001760905687e-14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-11, 2.2997159465452075155e-1, &r), -1.1626579415654480052e-18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-47, 5.8616043503503357359e-1, &r), -3.4270544836018351049e-85, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 8.4884849730214263521e-1, &r), 1.8679667366331791405e-33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 5.3943176031162412158e-1, &r), 3.5300994115064965228e-38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3, 9.3387179309343112648e-1, &r), -1.6062668879215016378e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 5.5061917642540109891e-1, &r), 2.5629166990385734238e-30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 2.9315675715515822781e-1, &r), 5.1505442739915338391e-49, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 8.9079715253593128884e-1, &r), 1.0539758479683914316e-5, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 9.1220250697048036241e-2, &r), 2.2291985671052015068e-73, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-49, 3.2934552845357396486e-1, &r), -6.7628009346158039786e-102, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 6.2008856084878849548e-3, &r), 2.7691703032688977815e-69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 7.1620177578706903472e-1, &r), -2.124755495743639839e-33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 5.1124413385957329246e-1, &r), -7.462204354283390559e-49, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 6.7405321505832900803e-1, &r), -5.2689769204867120958e-34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 7.6828173704641609615e-2, &r), -1.600162678935095954e-78, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 7.8546641070654814244e-1, &r), 9.610534504452577567e-4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-39, 7.8708523270381710591e-1, &r), -7.8237015591341025437e-63, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 1.1973778137874968338e-1, &r), 4.0918170073170305674e-15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 7.9699790929323855652e-1, &r), 1.4309765990568672215e-30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-11, 4.4800161319259052168e-1, &r), -1.7773520138988139169e-15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-39, 9.2637892745877041811e-1, &r), -4.4944192865215894733e-60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 4.6475617572623309956e-1, &r), -4.7026155154566357963e-50, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-25, 4.6435749048262147537e-1, &r), -8.9952935327704632698e-42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 9.6511079209639008185e-1, &r), 4.4842768640542298547e-39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-36, 3.8411791760130458261e-2, &r), 4.296403338839098526e-104, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 2.891145018145052606e-1, &r), 1.2636012998902815302e-8, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-43, 3.0866754076112185885e-1, &r), -2.1010663709383681337e-88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-44, 8.3972445789951961023e-1, &r), 9.7813493638738341846e-72, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 8.2307293342676789357e-1, &r), 2.9041436661554638719e-30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 9.8857250941935924585e-1, &r), 4.357505306871049656e-13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-47, 9.9901153675544108048e-1, &r), -2.6090278787375958472e-74, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-44, 2.8286777063559952163e-1, &r), 1.5832896249242322418e-92, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-10, 9.7638349947419439863e-1, &r), 2.0735913941162063742e-10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-36, 4.6452631984005212745e-1, &r), 4.0190510760125038996e-65, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-25, 8.2954737598010312336e-1, &r), -1.7855017422981225812e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 4.2326977999795604681e-1, &r), -3.1249531389372439734e-51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-9, 6.339167576518494852e-1, &r), -8.8082994072251150317e-11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-27, 7.4535258299077637954e-1, &r), -2.4368032520208918805e-40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-45, 8.0998976704970278418e-1, &r), -1.8024726219976677441e-74, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 5.3437414610693284794e-1, &r), 2.8159486268019058346e-38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-19, 3.6987646459831328184e-1, &r), -9.7200835901252686409e-32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-49, 4.7308684164506190021e-1, &r), -3.4438316393709775799e-94, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 8.4616849424460901479e-1, &r), 1.4469107537397962381e-67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-39, 8.6819804427642418616e-1, &r), -3.5837055310896411954e-61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 4.1490163307722590922e-1, &r), 2.448154551562710141e-49, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-25, 6.312651668273163642e-1, &r), -1.9374739456138691106e-38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-32, 5.3525470388026220677e-1, &r), 1.8191207037881755277e-54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 9.2605599515408535679e-3, &r), -7.2212651931099339154e-41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 4.8798589647640992562e-1, &r), -1.5614996577959031121e-66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 2.2096551301466541766e-2, &r), -2.9050812034192451665e-116, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 1.8092873560926168207e-1, &r), 1.0575388628113044972e-95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 4.2954143428969324083e-1, &r), 1.7857221060719548205e-36, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-41, 1.7704659657689619579e-1, &r), -2.017674513721498041e-93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3, 8.8755155653793053987e-1, &r), -1.3862799262620708632e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1, 6.7617657704638521874e-1, &r), -3.1913053561511127823e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-34, 6.4464304038438048178e-1, &r), 6.4622314654558520448e-56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-41, 7.2625991432244163042e-1, &r), -2.7337118024791538344e-68, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3, 6.357184822423154937e-1, &r), -5.2186206749718741014e-3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 8.4999778579632777264e-1, &r), 7.9757193518631922586e-6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-47, 4.9270801771231759268e-1, &r), -9.7743102162756354643e-89, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-44, 3.0382431918975667824e-1, &r), 3.6749344196700669304e-91, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-21, 8.3709075395163832807e-1, &r), -2.2120291813240017972e-28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 2.2926361048823468174e-1, &r), -9.4684470339645238166e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2, 7.7595731076113971064e-1, &r), 7.1557648504788709828e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 8.3155666144468474085e-1, &r), -1.760187305034807398e-15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 8.9229820511590331545e-1, &r), 1.8952192929209682492e-36, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-9, 4.3091918823985208523e-1, &r), -2.7448142505229531657e-12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-45, 7.6232573842954975111e-1, &r), -1.177044451508791199e-75, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-47, 8.5370192783467777094e-1, &r), -1.6168449888151601463e-77, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-17, 7.0917926374340919579e-1, &r), -6.1835780259077271289e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-48, 5.3177634068823620691e-1, &r), 1.9544175507861216812e-89, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 8.6236563774769292261e-1, &r), 2.0102896278761019978e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-47, 1.9398034049650767996e-1, &r), -9.1928516850183758066e-108, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 1.9059407555598432968e-1, &r), 3.0818305203000064476e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 1.177497340192600765e-1, &r), 1.1853471604859571152e-64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-44, 5.4411719229619710879e-1, &r), 5.0099597095462268336e-80, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 8.4096736569723091858e-1, &r), 4.6598891827094030103e-30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-14, 5.7336031747513286455e-1, &r), 2.8892068362904543886e-19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 4.3701161637218456507e-1, &r), 2.2572337854881401663e-40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-16, 5.5950502438849852065e-1, &r), 6.6952184074205206877e-23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-15, 7.2135709344094709909e-1, &r), -1.724936657760223936e-19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 8.9503358993826252397e-1, &r), 1.5285906153951174029e-66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-34, 8.8842662562391397862e-1, &r), 3.5115599466639988263e-51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 7.1820429322328243568e-1, &r), 3.3906734873299682373e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 6.9983283703407621113e-1, &r), 4.9840979255532732037e-71, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 3.4956023377394930027e-1, &r), -1.2169918834421082937e-53, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 3.1780802172157483391e-1, &r), 1.0816638066322224274e-43, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 6.6747313617191922586e-1, &r), 6.8258422034194326368e-72, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 9.8281798409069473598e-1, &r), -1.2641970706335426485e-40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-48, 9.3933236478420901552e-1, &r), 1.4126090419557425431e-77, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-33, 7.9969562813573452357e-1, &r), -8.3521436185818779821e-51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 1.749832037277650746e-1, &r), 2.4377505307831309992e-6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 7.4928517324325015606e-1, &r), 1.578984980873870348e-14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-50, 6.8668643284952988717e-1, &r), 2.0060641365741957198e-88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 4.628453813124784986e-1, &r), 7.3802979097358757591e-44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-17, 1.3398796901656815413e-1, &r), -3.1005014564142463477e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-21, 4.3589737907768555406e-1, &r), -2.4897620016130572781e-34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-49, 9.3471214811043877923e-1, &r), -1.0635172631183545319e-79, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 6.2842914244476056474e-1, &r), 1.919020727030761691e-15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-44, 3.9902397275715061045e-1, &r), 5.9381636725852262522e-86, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-38, 7.4844742354073981342e-1, &r), 1.1452741249870059158e-61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 1.7024143837455386901e-1, &r), 2.5696433432212310518e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-35, 2.4663778723047911984e-1, &r), -1.4846380265631517846e-72, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 3.4675532474808813305e-1, &r), 7.7576502065450687145e-84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-42, 9.7015007293565236242e-1, &r), 4.5073367850753509233e-65, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 5.8064934044500015204e-1, &r), 3.3392049842730194442e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4, 8.9712869996285071984e-1, &r), 1.6201373653351794808e-3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-14, 4.7509593095794841351e-1, &r), 2.0819777331649343154e-20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 1.9971440277743206076e-1, &r), 1.5567772398263651029e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2, 3.1326041354180815314e-1, &r), 1.2166506426643152762e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-21, 7.1780328035546876532e-1, &r), -8.7820775346034440302e-30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-40, 3.4783624449708255548e-1, &r), 5.0330128895858604038e-79, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 4.6025606383259078342e-1, &r), 7.8278566159609528116e-40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 6.8329209514074967672e-1, &r), -4.0018049034521909865e-61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 3.1644447969459523952e-1, &r), 3.757803139189680586e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-49, 3.8814659649103508174e-1, &r), -2.1178321069354253493e-98, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-33, 2.2586340634075651258e-1, &r), -6.3690605699693325702e-69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 1.1833425544176035201e-1, &r), -1.0457450400633015896e-72, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 4.716233225505345007e-1, &r), -7.9892591292002198427e-9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 4.0216249780484400656e-1, &r), 1.0224868057823447281e-49, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-39, 2.1728515555094074309e-1, &r), -1.2424793343150735922e-84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-10, 1.5286805658821812372e-1, &r), 1.8744497113230339685e-18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2, 4.2012489177724585853e-1, &r), 2.1740379601921820516e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3, 5.4168160735476556955e-1, &r), -3.2509626190739798323e-3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 6.0999547254418081401e-1, &r), 9.6515399655293906821e-41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-31, 9.3599472437451867441e-1, &r), -7.236873645285246215e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2, 8.9238535456317991508e-2, &r), 9.9477909077321557346e-4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-41, 3.3286697432119768766e-1, &r), -3.5168501713472066379e-82, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 1.3103200887095798302e-2, &r), 4.1630610278945554747e-84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 6.8545576155223653312e-1, &r), -1.0860095433456484207e-7, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-33, 7.4597656684747976078e-1, &r), -8.4232256181114982289e-52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-35, 9.5265851504353628581e-1, &r), -5.1260638475279101845e-52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-5, 1.9993324513780069188e-2, &r), -8.319296787329444617e-13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-15, 7.291071285552115835e-2, &r), -2.0411952376466778385e-34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-5, 4.307852573603263607e-1, &r), -3.8336545021181925733e-6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 3.0719264454074178501e-1, &r), 7.6627991262305533713e-12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 2.9261260328577001029e-1, &r), -2.8395431884068098274e-10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-36, 3.4285828911893011822e-1, &r), 7.1807133181285014617e-70, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-22, 2.1687887653368606307e-1, &r), 5.2860475778514174667e-43, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 7.2816755037040510323e-1, &r), 4.7187086299885949165e-35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 2.0826276232560462604e-2, &r), 3.2368741843295077202e-52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-9, 6.8082174052201672454e-1, &r), -1.6719854980400483279e-10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 1.1998114825675920571e-1, &r), 4.2119340347581322841e-59, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-9, 5.9197600088654039875e-1, &r), -4.7631865156190005935e-11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-30, 1.2367288101522705215e-1, &r), 2.0588316029270585207e-69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7, 8.3266930505292536647e-1, &r), -4.2096524602233328394e-7, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 4.360196631312459384e-1, &r), 1.9281550661128359168e-28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-13, 9.8501660515145040901e-1, &r), -1.5833136710018445626e-14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 9.3281324180154613247e-1, &r), -2.7828395455119501545e-41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-50, 8.9831019278310796215e-1, &r), 1.3646576617083900982e-82, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-34, 8.1153956230382506493e-1, &r), 1.6192058088789772833e-52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-15, 9.5908894233909785027e-1, &r), -1.2293883538807523551e-17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-28, 4.7478353398916835208e-1, &r), 1.0667274838088242221e-47, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-26, 3.1425431663890729964e-1, &r), 3.137014371489532261e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 6.8861856868877100233e-1, &r), -4.2000859317520628674e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-16, 6.9807655407582355921e-1, &r), 2.3026948238804970982e-21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-15, 1.9223628937777433793e-1, &r), -4.2201734817670464106e-28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-24, 7.91209811831343471e-1, &r), 3.458241440092889033e-34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 2.8881796002183274727e-1, &r), 1.7143390913163291276e-19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-34, 3.6891378721647167497e-1, &r), 3.7139793083014182422e-64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-20, 8.4841223828616526898e-1, &r), 1.4510812436551651903e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-23, 2.2490195812594682131e-1, &r), -5.7468688920782767025e-45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 2.2504144134842978217e-1, &r), 1.3048322081397375779e-33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-41, 8.9085721717774902491e-1, &r), -1.1841910084346823163e-64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-14, 3.5776817082613807574e-1, &r), 3.9325021938284721675e-22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-17, 4.6898364389788035003e-1, &r), -5.492570150236103145e-26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 7.4085998179632632531e-1, &r), 3.5186865149767756957e-6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-29, 8.1247678941673114604e-1, &r), -5.0783189409391835819e-43, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 1.7590874156867732351e-2, &r), 6.4299450335557031571e-16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6, 4.1122931368227349961e-2, &r), 1.0494595145859932593e-13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-18, 3.4357780610013843947e-2, &r), 2.6519427947417673311e-48, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8, 7.2901630769663700817e-1, &r), 7.6159005881302088369e-9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-40, 6.2434787548617066655e-1, &r), 7.297739135890827566e-69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-37, 2.5717302633809380684e-1, &r), -7.9671811532819427071e-77, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-12, 4.4871088635019795091e-1, &r), 3.3823657137507787902e-17, TEST_TOL2, GSL_SUCCESS); + + /* Jnu for negative nu */ + + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.7408502287167772557e+1, 4.3891036254061936271e-2, &r), -1.5118966152679114528e+42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.0369289750688261206e+1, 8.617077861907621132e-1, &r), 1.3458137581188368176e+61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.6398263821779503158, 5.7108775125890870648e-1, &r), -1.1073338178875224514e+2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.0743837616631487936e+1, 2.2372123946196517647e-1, &r), 1.3987244312547157439e+37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.7297952956642177128e+1, 2.8440280848533973972e-1, &r), -5.5832331287880973953e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.3507072230824139103e+1, 9.7008738913549467403e-1, &r), -9.9108981827284991851e+12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.4663106025697138284e+1, 9.6739483983540323655e-1, &r), 2.5305841722999151766e+67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.7450767905208691173e+1, 5.2288309478685515663e-3, &r), -3.4541920228396234708e+180, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.8736914274754280581e+1, 4.4318942692773250336e-1, &r), 1.2783291424623089209e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.4560791710276042462e+1, 5.6595841783863809163e-1, &r), 1.7364781221343685309e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.8723165418996042381e+1, 2.4003201116391659975e-1, &r), 8.229650479070536446e+54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.1780816480084454714e+1, 3.5000033756039229564e-1, &r), -8.9158096963672457852e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8.3572537806135923827, 8.994859317735841446e-1, &r), 2.4471474432717596765e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.9179499652113791027e+1, 7.3466044408596358731e-1, &r), -1.0446080588162613503e+82, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.0204535104461498585e+1, 1.3316368076269799096e-1, &r), 1.6723180404777533538e+93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.9597169419874779916e+1, 8.3895848736941180651e-1, &r), -1.9885394381212418599e+80, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.2228113163441444643e+1, 7.2360070820350912315e-1, &r), 3.7033741801434815187e+12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.3252347726870680973e+1, 4.7042383176138740544e-2, &r), -2.2524439080867705956e+121, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.8363275112470146292e+1, 3.5406545166014987925e-1, &r), 7.0915928368505654149e+95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.4031313414732363799e+1, 1.7077658851102128503e-1, &r), 4.2707681524978432343e+46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.4994220322161396103e+1, 7.6004498361697560048e-2, &r), 8.3491267575601512811e+85, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.5842451866339926986e+1, 7.1655842470093644641e-1, &r), -1.4956016465164596038e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.3303969013414183336e+1, 3.4261981308825774017e-1, &r), -1.7313464383524562686e+84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.9620214546900609668e+1, 8.9559048893071335969e-2, &r), -6.5439278427877993956e+69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.9267775155252921091e+1, 4.9173394917277714574e-1, &r), -2.7879726255003962141e+68, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.085805422677201981e+1, 7.1844728658692273953e-2, &r), 1.7330833141098585591e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.3205222720657600449e+1, 2.0938011160695718605e-1, &r), -1.2855953290893319419e+93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.1761832688338363731e-1, 4.0692821730479031008e-1, &r), 1.0616114810207300625, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.4176152886105712673e+1, 7.3083748089885469319e-1, &r), 2.3708170326600879156e+51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.7495316392965243753e+1, 3.6374757654471397858e-1, &r), -2.4050181588419272908e+26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.4363999308889822481e+1, 2.2964635433363436307e-1, &r), 1.4858445128296594446e+23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.5945782535187393546e+1, 5.5004988492253222851e-1, &r), -5.3196903529172738965e+19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.6539439893219625339e+1, 5.4022213494661757887e-1, &r), 3.4606719889912371036e+40, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.9104819423206076833e+1, 8.7581079115207012305e-1, &r), -8.3806822204633705862e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.1344422530419629852e+1, 1.8412292138063948156e-1, &r), -1.3032526695489281999e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.2479004807998664153e+1, 7.628052499161305046e-1, &r), 3.8593605090529013702e+67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.7234292208462683278e+1, 5.6929354834881763134e-1, &r), -1.3560087920173394791e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.9852923491811760298e+1, 2.1764339448558498796e-2, &r), -3.1065720979758225192e+88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.9470737712526065987e+1, 9.1397839227827761003e-1, &r), -4.9854244578384505794e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.4879459756439547254e+1, 8.7694253508024822462e-1, &r), 4.0540656704233640216e+31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-8.6562240771489400173e-1, 6.4882619355798588927e-1, &r), 9.5827819637209987022e-2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.4096305256724256786e+1, 1.1837901256079790395e-1, &r), 1.5389662008468777023e+26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.3739240782592000796e+1, 1.1830951764837136725e-1, &r), -5.4851415830067607572e+25, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-7.7683272384817803185e-1, 2.0897180603218726575e-1, &r), 1.3452855819917342033, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.9007825894244022613e+1, 8.0804305816981973945e-1, &r), -1.9558153171413640836e+78, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.224872379992519031, 9.4716012050013901355e-1, &r), -8.7507643021583199242e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-5.0807600398060325807e+1, 6.1902119795226148946e-1, &r), 1.9558680407989173708e+89, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.2130610423140110162e+1, 7.2184881647444607846e-1, &r), 3.0709609117301881893e+67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.1186300874143057513e+1, 1.3944550368322800884e-1, &r), -1.2405415201132534983e+95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.1777582295815773824e+1, 7.6178874271077561762e-1, &r), -7.1748063501973138583e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.2185912810368133222e+1, 3.959510541558671016e-1, &r), 1.196451653185591802e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.2976006083946226988e+1, 4.5739390828369379657e-1, &r), 1.0599129365585919882e+77, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.0412232215064606945e+1, 6.7510758855896918145e-1, &r), 2.4302601636670462267e+45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.8388188389747281955e+1, 8.9233979909724013718e-1, &r), 9.1410432331502484426e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-2.4298840569257253701e+1, 6.8042862360863559591e-1, &r), 4.0995648850574613979e+33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.8834735272673504063e+1, 4.2324469410479691518e-1, &r), 7.0355133597135130631e+69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.6091840934431606344e+1, 1.7508918790902548661e-1, &r), 8.7456315137421979067e+103, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.9754264394942756728, 1.558717798933954111e-2, &r), -3.551027943747170162e+2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.7168594342366560374e+1, 6.976373865080374073e-1, &r), -1.1036447967023475572e+58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.5379944292029245754e+1, 5.3150471205968938472e-2, &r), -1.0469743921754287032e+126, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-1.153181439556533474e+1, 1.8204366094125528818e-1, &r), -4.0986515168430307785e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-4.9939680334734766385e+1, 8.132277926604580844e-1, &r), -9.5179038651143567503e+80, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-3.5986707652967270442e+1, 5.5665988728905782182e-1, &r), -1.27797927382078249e+58, TEST_TOL3, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Jnu_e, (-6.7046620273111013832, 1.059530133767196237e-1, &r), 3.8106055649273069958e+10, TEST_TOL2, GSL_SUCCESS); + + /* Ynu */ + TEST_SF(s, gsl_sf_bessel_Ynu_e, (0.0001, 1.0, &r), 0.08813676933044478439, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Ynu_e, (0.0001,10.0, &r), 0.05570979797521875261, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Ynu_e, ( 0.75, 1.0, &r), -0.6218694174429746383, TEST_TOL0, GSL_SUCCESS); @@ -324,6 +638,241 @@ TEST_SF(s, gsl_sf_bessel_Ynu_e, (10.0, 100.0, &r), 0.05833157423641492875, TEST_TOL2, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Ynu_e, (10.2, 100.0, &r), 0.07169383985546287091, TEST_TOL2, GSL_SUCCESS); + /* Ynu for negative integer nu */ + + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-13, 4.3966088395743909188e-1, &r), 5.4675723318993574107e+16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-43, 3.2953184511924683369e-1, &r), 2.115977780575035527e+84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8, 3.5081119129046332101e-1, &r), -1.7982193624366780622e+9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-17, 1.6717234250796879247e-1, &r), 1.4040223280006382933e+31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-20, 1.0085435516296562067e-1, &r), -3.4253870177732383503e+42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-29, 1.0423882905853389231e-1, &r), 1.5633159385709367033e+66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-10, 2.014635069337132169e-1, &r), -1.0750753223600878559e+15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-23, 3.3470953660313309239e-1, &r), 2.5733184597190491073e+38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-13, 1.796487688043502395e-2, &r), 6.1526862287828618145e+34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-30, 4.3851505455005663023e-1, &r), -1.6652274019860697168e+50, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-31, 2.9134673992671269075e-1, &r), 7.2783380837435004727e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-28, 7.6696967407852829575e-1, &r), -1.5748860170624112485e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6, 1.9829576302527197691e-2, &r), -4.0210481843848071758e+13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-26, 4.1513019703157674847e-1, &r), -2.806930683617814941e+42, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-19, 1.3033500482689031834e-2, &r), 6.9598794107689745713e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4, 7.2050154387915780891e-1, &r), -1.1846384548732517149e+2, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-36, 9.058436592111083308e-1, &r), -7.994500359474016123e+51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-37, 4.4893454860671838425e-2, &r), 1.2042846052782773184e+102, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-25, 1.4253284590439372148e-1, &r), 9.4085712788480443733e+51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-35, 6.8075538970323047806e-1, &r), 2.2691146737122039815e+54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-9, 6.9978823056579836732e-2, &r), 1.6330796519846810927e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-30, 8.3903642499214990225e-1, &r), -5.8816651774415705482e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-43, 6.543891152683782553e-1, &r), 3.2732133353307485906e+71, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1, 2.557673774862201033e-1, &r), 2.648397359834244179, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-21, 2.3961944728579204361e-1, &r), 1.7416186098234671613e+37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-13, 3.7732868931080794955e-1, &r), 3.9857279826655584502e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-33, 3.8478064679256785588e-1, &r), 3.5113798569950397588e+58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-50, 8.3045728127372512419e-1, &r), -2.3665632218557611716e+81, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-33, 3.4391840270211572065e-1, &r), 1.4268698281593046704e+60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-23, 4.4699489157302132678e-1, &r), 3.3214969951131331346e+35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-23, 8.6894302936681315656e-1, &r), 7.6600878858980858273e+28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-24, 2.3997647040322801696e-1, &r), -1.0382177146462655416e+44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4, 9.7688590680055575385e-1, &r), -3.6396008802115138586e+1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-20, 8.9090003293395823104e-1, &r), -4.1352523331280200421e+23, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-37, 9.4057990133775869779e-1, &r), 1.5795116292393394486e+53, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1, 2.6641070579761597867e-1, &r), 2.5520015187867893496, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-7, 9.8878610880180753494e-1, &r), 3.3070534106551277147e+4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-42, 3.1042396387236895292e-1, &r), -1.0201733293438510046e+83, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-18, 6.8722270094498481586e-1, &r), -2.556940038138305942e+22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-16, 1.6113707818439830316e-2, &r), -1.3203947711040991975e+45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-31, 3.0720392023079679622e-1, &r), 1.4078366532641984096e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8, 3.4957196590626821859e-1, &r), -1.8497964339362348508e+9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4, 9.9805150837159144851e-1, &r), -3.35276446088454154e+1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8, 8.4538260733781281419e-1, &r), -1.6151126896511724021e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-21, 7.8935512795174026579e-1, &r), 2.3510763338498465525e+26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-32, 3.4859401756229795902e-1, &r), -4.9775956770188671631e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-28, 9.2530929240293814377e-1, &r), -8.2429457360543127639e+36, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-32, 5.7276907866586953775e-1, &r), -6.2608710158624288778e+50, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-16, 8.6364032267280037696e-1, &r), -2.8833961453891338766e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-24, 8.1065458967451038451e-2, &r), -2.1283114054434655701e+55, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-17, 6.946415511078842723e-1, &r), 4.3084587997971578431e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-14, 2.7619565270505476723e-1, &r), -2.1634745597658813187e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-7, 8.579791601466317093e-2, &r), 8.5741016888820088808e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-50, 7.4681490716561041968e-1, &r), -4.7757514561562387813e+83, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-30, 9.6631424224612452556e-1, &r), -8.5159643935229761718e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-14, 2.6745819874317492788e-1, &r), -3.3928529652241947717e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-22, 3.6947309321414497419e-1, &r), -2.2270901208692386374e+35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-49, 2.3389602803779083655e-2, &r), 1.8412401963717225375e+155, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-48, 7.7482504299905127354e-1, &r), -4.8369236019321535917e+78, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-30, 6.5337950709230049969e-1, &r), -1.0639517934361092802e+45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-29, 5.4117488569210959438e-1, &r), 2.8262145810872807871e+45, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-50, 9.4038774092645791075e-1, &r), -4.7322361571978865664e+78, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1, 5.627399919447310892e-1, &r), 1.3310580822914015523, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-35, 7.9925999507829895011e-2, &r), 8.2224704007424584626e+86, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-10, 2.8875439067692705135e-3, &r), -2.9351293887447581255e+33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-31, 2.7645446745852278572e-1, &r), 3.7015590625912763344e+58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-12, 8.5374968606378578252e-1, &r), -3.528575811542778544e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-11, 2.2997159465452075155e-1, &r), 2.4894373648370412225e+16, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-47, 5.8616043503503357359e-1, &r), 1.9763554381308657733e+82, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-24, 8.4884849730214263521e-1, &r), -7.1046392480541118407e+30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-24, 5.3943176031162412158e-1, &r), -3.7580440656007599181e+35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3, 9.3387179309343112648e-1, &r), 7.0202042170209205589, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-20, 5.5061917642540109891e-1, &r), -6.2122754555889405012e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-26, 2.9315675715515822781e-1, &r), -2.3771210812024680281e+46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6, 8.9079715253593128884e-1, &r), -5.091626137833991034e+3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-30, 9.1220250697048036241e-2, &r), -4.7597279133940392868e+70, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-20, 6.2008856084878849548e-3, &r), -5.7473876046110789338e+66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-23, 7.1620177578706903472e-1, &r), 6.5166498927440582853e+30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-29, 5.1124413385957329246e-1, &r), 1.4711351369242792138e+46, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-23, 6.7405321505832900803e-1, &r), 2.627743272609579819e+31, TEST_TOL2, GSL_SUCCESS); + + /* Ynu for negative nu */ + + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.7408502287167772557e+1, 4.3891036254061936271e-2, &r), 4.469714143570654497e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.0369289750688261206e+1, 8.617077861907621132e-1, &r), -5.8595434076664310948e+60, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.6398263821779503158, 5.7108775125890870648e-1, &r), -5.2034221685931678753e+1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.0743837616631487936e+1, 2.2372123946196517647e-1, &r), 1.345588718040376054e+37, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.7297952956642177128e+1, 2.8440280848533973972e-1, &r), 4.1115735370678699359e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.3507072230824139103e+1, 9.7008738913549467403e-1, &r), -2.202372544321863968e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.4663106025697138284e+1, 9.6739483983540323655e-1, &r), 1.4235309894056948387e+67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.7450767905208691173e+1, 5.2288309478685515663e-3, &r), 5.3855142705411361919e+179, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.8736914274754280581e+1, 4.4318942692773250336e-1, &r), 1.1773204343097478161e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.4560791710276042462e+1, 5.6595841783863809163e-1, &r), 3.3572924118396673305e+55, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.8723165418996042381e+1, 2.4003201116391659975e-1, &r), 6.9471556080056038434e+54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.1780816480084454714e+1, 3.5000033756039229564e-1, &r), -1.0833823624917670056e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8.3572537806135923827, 8.994859317735841446e-1, &r), -1.1774337302489088463e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.9179499652113791027e+1, 7.3466044408596358731e-1, &r), 1.6517722024836217581e+82, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.0204535104461498585e+1, 1.3316368076269799096e-1, &r), -2.2341067840937606376e+93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.9597169419874779916e+1, 8.3895848736941180651e-1, &r), -6.2662143656762004053e+79, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.2228113163441444643e+1, 7.2360070820350912315e-1, &r), -4.2511898289085272856e+12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.3252347726870680973e+1, 4.7042383176138740544e-2, &r), 2.2194603264543665848e+121, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.8363275112470146292e+1, 3.5406545166014987925e-1, &r), -3.248353813678515594e+95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.4031313414732363799e+1, 1.7077658851102128503e-1, &r), -4.3273454620971397041e+47, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.4994220322161396103e+1, 7.6004498361697560048e-2, &r), 4.5976914154279708742e+87, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.5842451866339926986e+1, 7.1655842470093644641e-1, &r), -2.7708334780004236249e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.3303969013414183336e+1, 3.4261981308825774017e-1, &r), 1.2252074327758681488e+84, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.9620214546900609668e+1, 8.9559048893071335969e-2, &r), -2.5960278365111086141e+69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.9267775155252921091e+1, 4.9173394917277714574e-1, &r), 2.4927765540337657002e+68, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.085805422677201981e+1, 7.1844728658692273953e-2, &r), 3.6253005874483288876e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.3205222720657600449e+1, 2.0938011160695718605e-1, &r), 1.7097593469426311991e+93, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.1761832688338363731e-1, 4.0692821730479031008e-1, &r), -3.9929527887838440231e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.4176152886105712673e+1, 7.3083748089885469319e-1, &r), -3.8375532995220739134e+51, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.4363999308889822481e+1, 2.2964635433363436307e-1, &r), -6.7651597483976020212e+22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.5945782535187393546e+1, 5.5004988492253222851e-1, &r), -3.0929200048995927397e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.6539439893219625339e+1, 5.4022213494661757887e-1, &r), 4.3099923396955639095e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.9104819423206076833e+1, 8.7581079115207012305e-1, &r), 2.4523357879118971691e+58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.1344422530419629852e+1, 1.8412292138063948156e-1, &r), 6.9306682864864401354e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.2479004807998664153e+1, 7.628052499161305046e-1, &r), -2.5492681017463054894e+66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.7234292208462683278e+1, 5.6929354834881763134e-1, &r), 1.4969074140226347429e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.9852923491811760298e+1, 2.1764339448558498796e-2, &r), -6.237969203121440244e+88, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.9470737712526065987e+1, 9.1397839227827761003e-1, &r), 4.5960647034986138864e+38, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.4879459756439547254e+1, 8.7694253508024822462e-1, &r), 1.0188843810269963844e+32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8.6562240771489400173e-1, 6.4882619355798588927e-1, &r), 1.1287689391130420057, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.4096305256724256786e+1, 1.1837901256079790395e-1, &r), -4.9304578916106509819e+26, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.3739240782592000796e+1, 1.1830951764837136725e-1, &r), -5.1263258788046229045e+25, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-7.7683272384817803185e-1, 2.0897180603218726575e-1, &r), 1.881590189544752977, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.9007825894244022613e+1, 8.0804305816981973945e-1, &r), 7.9534669124448258162e+79, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.224872379992519031, 9.4716012050013901355e-1, &r), 5.2709059549031973037e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-5.0807600398060325807e+1, 6.1902119795226148946e-1, &r), 2.8318147090250448397e+89, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.2130610423140110162e+1, 7.2184881647444607846e-1, &r), -7.0593986791573883029e+67, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.1186300874143057513e+1, 1.3944550368322800884e-1, &r), 1.8718282789345414439e+95, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.1777582295815773824e+1, 7.6178874271077561762e-1, &r), -8.5399447567722731535e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.2185912810368133222e+1, 3.959510541558671016e-1, &r), -1.8100903248905368685e+56, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.2976006083946226988e+1, 4.5739390828369379657e-1, &r), 1.4034454523109119588e+78, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.0412232215064606945e+1, 6.7510758855896918145e-1, &r), -6.8761190595978173779e+44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.8388188389747281955e+1, 8.9233979909724013718e-1, &r), -3.3498674090203423756e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.4298840569257253701e+1, 6.8042862360863559591e-1, &r), -3.0013837000776612869e+33, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.8834735272673504063e+1, 4.2324469410479691518e-1, &r), 1.2310766881467564871e+70, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.6091840934431606344e+1, 1.7508918790902548661e-1, &r), -2.946550933505149671e+104, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.9754264394942756728, 1.558717798933954111e-2, &r), -4.5906289772187980725e+3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.7168594342366560374e+1, 6.976373865080374073e-1, &r), 1.8851114888349680045e+58, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.5379944292029245754e+1, 5.3150471205968938472e-2, &r), 4.1473845726043547937e+125, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.153181439556533474e+1, 1.8204366094125528818e-1, &r), -4.1102104914739582156e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.9939680334734766385e+1, 8.132277926604580844e-1, &r), -4.9623796120191838477e+81, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.5986707652967270442e+1, 5.5665988728905782182e-1, &r), -3.058579118813851873e+59, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.7046620273111013832, 1.059530133767196237e-1, &r), 2.8547617693483259231e+10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.154578607200052944e+1, 4.5282605452993561522e-1, &r), -4.6204765000245865931e+31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.3955292370868357326e+1, 5.3774303067450442349e-1, &r), -3.285152670384139907e+35, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.2209824848466094111e+1, 5.9504757613868441576e-1, &r), -3.8856592501211432238e+50, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.0825185544715207495e+1, 7.5398610386439322567e-1, &r), 2.3035172984979776888e+64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.1910588368134692781e+1, 5.1283495159288225414e-1, &r), -1.3438429765742294157e+52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.7113819006700078322, 4.0393307486388760775e-1, &r), 3.8345193040174093796e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.8693610985720627242e+1, 3.4777341593350738095e-1, &r), 1.2557150749869300709e+50, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.3640245743314574591e+1, 9.6025287507519664839e-1, &r), -3.8943763839931542689e+28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.8083409800395899615e+1, 1.4391402197265332926e-1, &r), -9.9126133627220300984e+113, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.8105478052324389543e+1, 4.891514010318381566e-1, &r), -1.2271238830087142465e+66, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.5311996069559305006e+1, 9.5766172213158543809e-1, &r), 3.7577671642248517421e+31, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.0646798215967974621e+1, 9.3310976056897272996e-1, &r), 1.5913395046591416208e+41, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.9802221662384415773e+1, 8.0558698100484531078e-1, &r), -1.3410097300803423969e+61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.6307175589532141033e+1, 8.5581965580057553716e-1, &r), -8.2913043528862589862e+72, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.0008133602203088381e+1, 8.8260963451522902618e-1, &r), -4.3184875964228242059e+8, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.2307910802466458785e+1, 6.782808128445430142e-1, &r), -1.4119756731193528077e+69, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.0130438814666196845e+1, 2.1277791687648788154e-1, &r), -1.02690311217639001e+15, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.9533803019889111726e+1, 3.9334897500975715385e-1, &r), -6.4704382293897894852e+28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.3895956090712434265e+1, 8.0661260505451797979e-1, &r), -4.3815146159956971318e+14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.4635165127833994625e+1, 3.7945739040607276532e-1, &r), 1.5929485514781295968e+20, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.8560967136543055351e+1, 7.9600892022399284277e-1, &r), 1.1465774145795382248e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.2108119261932190115, 8.7806601388332832487e-1, &r), -7.4701969028629161594e+3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.9950977953230716109, 5.8978625225697869088e-1, &r), 1.1808677382965817331e+6, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.2481246429363894157e+1, 7.2704916561624886813e-1, &r), -7.5667536238826222942e+11, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-5.020982518214251176e+1, 7.5109544046044664159e-1, &r), -7.9040859853121739692e+83, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8.9473034048334154025, 6.4213370686611774774e-2, &r), 2.6029884691597775763e+17, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.834075672586642874e+1, 6.4258947909888861139e-1, &r), -5.8405580195454874797e+61, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.4411381704857813062e+1, 1.2743783697917866926e-1, &r), -3.1773798568513309515e+105, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.1687391291035845538, 7.8786722297686215495e-1, &r), -1.4219092995559599082e+4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.0704293950958482287e+1, 3.8531626603275482749e-1, &r), 1.5743246247238302576e+13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.0571445654620545043e+1, 3.4876986634505808892e-1, &r), 7.0385234557024272162e+76, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.3563863522003561189, 9.7999452783586835833e-1, &r), -3.1893996030425450694e+1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.8492269674910402783e+1, 1.7152753186318347442e-1, &r), -6.0249928142043118768e+32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.5363228484567149913e+1, 3.0542644930515794217e-1, &r), 1.3211507552477009856e+44, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.3771144161000489935e+1, 7.3346736008344405886e-1, &r), -8.3124988094143057824e+14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.3761246233591030521e+1, 5.4968519162734822572e-1, &r), -6.0578774841300955332e+34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.2634961325802757898e+1, 6.6471162507224558099e-1, &r), 3.2082973398317013106e+30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.6563404270777516422e+1, 7.5273096421024420905e-1, &r), 3.7592589106971418602e+75, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.0848764148512049678e+1, 9.2286052929496267966e-1, &r), 3.2439553455961291223e+9, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.5455854142576014389e+1, 7.8971992208889605774e-1, &r), 1.3378630820768277448e+52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.2013968530863113871e+1, 1.9744029176545173315e-1, &r), -1.584787479000820067e+19, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-5.6750075448691398076, 8.0444727938729491316e-1, &r), -2.10533382223663811e+3, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.8429830608986305295e+1, 8.2140563165026789468e-1, &r), -1.1405415108194473062e+21, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.346426407446347328e+1, 8.5111501099434108204e-1, &r), 8.7606083372225198285e+28, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.9593848458448579212e+1, 1.2641237816367966816e-1, &r), -6.4135079973931874203e+64, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.7086231381348987822e+1, 3.9893860083544831831e-1, &r), 7.515835122388342095e+24, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.8484417257406457732, 6.0748406712157845873e-1, &r), -2.7380610022426281822, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.1822890333552359573e+1, 5.0020129878524173631e-1, &r), -1.7231227888225767619e+52, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-6.2862753931112845805, 7.9353453932163968388e-1, &r), -1.342401423092805412e+4, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.5508352825172743548, 7.3200379508076835206e-1, &r), -4.0497851981930665643e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-7.6325669923999446014, 6.3959118408264715884e-2, &r), -8.0591625416199259092e+13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.7217355888852626548e+1, 8.2439297912634420605e-1, &r), 4.2640264465349061973e+55, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.9216632463077931365e+1, 2.1243165065073566651e-2, &r), 7.2753341407348563956e+121, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.0310494244455808579e+1, 5.6409661087945220564e-1, &r), -8.0236717760932647636e+27, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.2561355227860967802e+1, 6.1429304168687688441e-1, &r), 1.095939957156354534e+71, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.348280958534689123e+1, 1.3878791555680588964e-1, &r), 1.4127166630922246712e+47, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.266908051943509346, 9.1043177038683039605e-1, &r), 7.9342040586370876107, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.6453677594081999426e+1, 7.3766130024218803361e-1, &r), -2.8496103761067379068e+18, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.0292370302033138277e+1, 2.7545919896373212095e-1, &r), -9.9081192322574702806e+13, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.788826873303230097e+1, 2.2855276522975392381e-1, &r), -4.2068889321668479948e+53, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.1401875376696767087e+1, 6.6522142928175599046e-2, &r), 5.4702914219176701268e+108, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.9306765177660380865e+1, 2.0291343278160599375e-1, &r), 4.3752403877947450222e+34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.9778989699515361126e+1, 5.0069816606055756877e-2, &r), -5.0144871285761887467e+77, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.3484350943085112332e+1, 2.5580340114657331489e-2, &r), 8.660979419407748338e+32, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.8885950309653823971e+1, 2.705230773944354062e-1, &r), 7.0729128795400209404e+102, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.6140505254948262834e+1, 5.635769797194365065e-1, &r), -1.691181704671511378e+39, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.36353791993838395e+1, 7.8601342847547894355e-1, &r), -4.184570564713370597e+30, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.8043892058273381078e+1, 9.6661631483018731188e-1, &r), -5.2799069238255343804e+54, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.0627792568626186656e+1, 2.7801894968851888201e-1, &r), 4.6951098613000862734e+34, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.7821819326414013127e+1, 7.0072053744106375522e-1, &r), -3.2969189837617817178e+59, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.1895350862490616295e+1, 6.3819566879323744549e-1, &r), -7.4877627933750167273e+12, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.1564822793166119652e+1, 8.7089052441788146841e-1, &r), -4.362095115786654673e+62, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-5.6988133455245986782, 1.0513161628614675752e-1, &r), -2.6315584241050780179e+8, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-5.04236829179067909, 2.1606414592833118122e-2, &r), 6.6460848251254935943e+10, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-8.5815569416794001464e-1, 3.2800854133020344342e-1, &r), 1.7278337309129555492, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-7.4540158508402344121, 3.3591301584669540366e-1, &r), 4.6958147873473343296e+7, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.1342269410012557907e+1, 7.2248859912133702972e-1, &r), 8.4210802265866850829e+65, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-4.0890888214378787004e+1, 4.6015468690527406659e-2, &r), 1.5760625185685568109e+114, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.4949019201278440062e+1, 5.5379096162817544569e-1, &r), 2.4017690399425079403e+57, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.5581474535040863099, 8.6545078146345742122e-1, &r), -4.2518863856194071801e-1, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-1.6450819423469368818e+1, 4.0968007844676920681e-1, &r), -4.7316334255824816328e+22, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-2.4534051152698170766e+1, 9.2462004307970597256e-1, &r), 8.0009048223739294629e+29, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-9.5846016059057764355, 1.4980322293854772757e-1, &r), -7.3726783694247075753e+14, TEST_TOL2, GSL_SUCCESS); + TEST_SF(s, gsl_sf_bessel_Ynu_e, (-3.1840530425923939329e+1, 9.3847997261021697482e-1, &r), -3.8745468671462878671e+43, TEST_TOL2, GSL_SUCCESS); + + /* Inu */ + TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, (0.0001,10.0, &r), 0.12783333709581669672, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, ( 1.0, 0.001, &r), 0.0004995003123542213370, TEST_TOL0, GSL_SUCCESS); TEST_SF(s, gsl_sf_bessel_Inu_scaled_e, ( 1.0, 1.0, &r), 0.20791041534970844887, TEST_TOL0, GSL_SUCCESS); diff -Nru gsl-2.4+dfsg/specfunc/test_legendre.c gsl-2.5+dfsg/specfunc/test_legendre.c --- gsl-2.4+dfsg/specfunc/test_legendre.c 2017-06-14 06:58:50.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/test_legendre.c 2018-06-08 20:17:41.000000000 +0000 @@ -459,11 +459,20 @@ /* test S(l,0) = P(l,0) */ idx = gsl_sf_legendre_array_index(l, 0); gsl_test_rel(p[idx], p_schmidt[idx], 1.0e-10, - "unnorm l=%zu, m=0, x=%f", l, x); + "legendre unnorm l=%zu, m=0, x=%f", l, x); gsl_test_rel(dp[idx], dp_schmidt[idx], 1.0e-10, - "unnorm deriv l=%zu, m=0, x=%f", l, x); - gsl_test_rel(d2p[idx], d2p_schmidt[idx], 1.0e-10, - "unnorm deriv2 l=%zu, m=0, x=%f", l, x); + "legendre unnorm deriv l=%zu, m=0, x=%f", l, x); + + if (l > 1) + { + gsl_test_rel(d2p[idx], d2p_schmidt[idx], 1.0e-10, + "legendre unnorm deriv2 l=%zu, m=0, x=%f", l, x); + } + else + { + gsl_test_abs(d2p[idx], d2p_schmidt[idx], 1.0e-10, + "legendre unnorm deriv2 l=%zu, m=0, x=%f", l, x); + } /* test S(l,m) = a_{lm} * P(l,m) for m > 0 */ for (m = 1; m <= l; ++m) @@ -471,11 +480,11 @@ idx = gsl_sf_legendre_array_index(l, m); gsl_test_rel(a_lm * p[idx], p_schmidt[idx], 1.0e-9, - "unnorm l=%zu, m=%zu, x=%f", l, m, x); + "legendre unnorm l=%zu, m=%zu, x=%f", l, m, x); gsl_test_abs(a_lm * dp[idx], dp_schmidt[idx], 1.0e-10, - "unnorm deriv l=%zu, m=%zu, x=%f", l, m, x); + "legendre unnorm deriv l=%zu, m=%zu, x=%f", l, m, x); gsl_test_abs(a_lm * d2p[idx], d2p_schmidt[idx], 1.0e-10, - "unnorm deriv2 l=%zu, m=%zu, x=%f", l, m, x); + "legendre unnorm deriv2 l=%zu, m=%zu, x=%f", l, m, x); a_lm /= sqrt((double) (l + m + 1)) * sqrt((double) (l - m)); diff -Nru gsl-2.4+dfsg/specfunc/test_sf.c gsl-2.5+dfsg/specfunc/test_sf.c --- gsl-2.4+dfsg/specfunc/test_sf.c 2017-05-20 08:10:34.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/test_sf.c 2018-05-16 03:01:50.000000000 +0000 @@ -2758,6 +2758,7 @@ gsl_test(test_pow_int(), "Integer Powers"); gsl_test(test_psi(), "Psi Functions"); gsl_test(test_psi_complex(), "Psi Function for complex argument"); + gsl_test(test_sincos_pi(), "sin_pi and cos_pi"); gsl_test(test_synch(), "Synchrotron Functions"); gsl_test(test_transport(), "Transport Functions"); gsl_test(test_trig(), "Trigonometric and Related Functions"); diff -Nru gsl-2.4+dfsg/specfunc/test_sf.h gsl-2.5+dfsg/specfunc/test_sf.h --- gsl-2.4+dfsg/specfunc/test_sf.h 2017-05-20 08:10:34.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/test_sf.h 2017-08-12 22:38:24.000000000 +0000 @@ -102,6 +102,7 @@ int test_hermite(void); int test_hyperg(void); int test_legendre(void); +int test_sincos_pi(void); #endif /* !TEST_SF_H */ diff -Nru gsl-2.4+dfsg/specfunc/test_sincos_pi.c gsl-2.5+dfsg/specfunc/test_sincos_pi.c --- gsl-2.4+dfsg/specfunc/test_sincos_pi.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/specfunc/test_sincos_pi.c 2017-09-26 16:26:05.000000000 +0000 @@ -0,0 +1,395 @@ +/* specfunc/test_sincos_pi.c + * + * Copyright (C) 2017 Konrad Griessinger + * + * 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 3 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: Konrad Griessinger */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "test_sf.h" + +/* Any double precision number bigger than this is automatically an even integer. */ +#define BIGDBL (2.0 / GSL_DBL_EPSILON) + +int +test_sincos_pi(void) +{ + gsl_sf_result r; + int s = 0; + int k = 0, kmax = 12; + double x = 0.0, ix = 0.0, fx = 0.0, exact = 0.0; + + /* sin_pi tests */ + + fx = 0.5; + exact = 1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + fx = -0.5; + exact = -1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 1.5; + exact = -1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + fx = -1.5; + exact = 1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 2.5; + exact = 1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + fx = -2.5; + exact = -1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 3.5; + exact = -1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + fx = -3.5; + exact = 1.0; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 0.375; + exact = 0.923879532511286756128183189397; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = -0.375; + exact = -0.923879532511286756128183189397; + + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 0.0; + exact = 0.0; + + ix = 0.0; + for (k=0; k= BIGDBL ) ) break; + printf("ix+fx= %.18e\n", ix+fx); + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + ix += 101.0; + exact = -exact; + } + + fx = -0.0625; + exact = -0.195090322016128267848284868477; + ix = LONG_MIN - 1.0; + ix -= fabs(fmod(ix,2.0)); /* make sure of even number */ + + for (k=0; k= BIGDBL ) ) break; + printf("ix+fx= %.18e\n", ix+fx); + TEST_SF(s, gsl_sf_sin_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + ix -= 101.0; + exact = -exact; + } + + + + /* cos_pi tests */ + + ix = 0.0; + fx = 0.0; + exact = 1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 1.0; + exact = -1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = -1.0; + exact = -1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 2.0; + exact = 1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = -2.0; + exact = 1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 3.0; + exact = -1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = -3.0; + exact = -1.0; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + + fx = 0.375; + exact = 0.382683432365089771728459984030; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = -0.375; + exact = 0.382683432365089771728459984030; + + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + + fx = 0.0; + exact = 1.0; + + ix = 0.0; + for (k=0; k= BIGDBL ) ) break; + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + ix += 101.0; + exact = -exact; + } + + fx = -0.0625; + exact = 0.980785280403230449126182236134; + ix = LONG_MIN - 1.0; + ix -= fabs(fmod(ix,2.0)); /* make sure of even number */ + + for (k=0; k= BIGDBL ) ) break; + TEST_SF(s, gsl_sf_cos_pi_e, (ix+fx, &r), exact, TEST_TOL0, GSL_SUCCESS); + ix -= 101.0; + exact = -exact; + } + + return s; +} + diff -Nru gsl-2.4+dfsg/spmatrix/gsl_spmatrix.h gsl-2.5+dfsg/spmatrix/gsl_spmatrix.h --- gsl-2.4+dfsg/spmatrix/gsl_spmatrix.h 2016-07-02 23:02:41.000000000 +0000 +++ gsl-2.5+dfsg/spmatrix/gsl_spmatrix.h 2018-01-04 22:00:08.000000000 +0000 @@ -106,7 +106,12 @@ * workspace of size MAX(size1,size2)*MAX(sizeof(double),sizeof(size_t)) * used in various routines */ - void *work; + union + { + void *work; + size_t *work_sze; + double *work_dbl; + }; size_t sptype; /* sparse storage type */ } gsl_spmatrix; diff -Nru gsl-2.4+dfsg/spmatrix/spcompress.c gsl-2.5+dfsg/spmatrix/spcompress.c --- gsl-2.4+dfsg/spmatrix/spcompress.c 2016-07-02 23:02:41.000000000 +0000 +++ gsl-2.5+dfsg/spmatrix/spcompress.c 2018-01-04 22:15:55.000000000 +0000 @@ -71,7 +71,7 @@ gsl_spmatrix_cumsum(m->size2, Cp); /* make a copy of the column pointers */ - w = (size_t *) m->work; + w = m->work_sze; for (n = 0; n < m->size2; ++n) w[n] = Cp[n]; @@ -142,7 +142,7 @@ gsl_spmatrix_cumsum(m->size1, Cp); /* make a copy of the row pointers */ - w = (size_t *) m->work; + w = m->work_sze; for (n = 0; n < m->size1; ++n) w[n] = Cp[n]; diff -Nru gsl-2.4+dfsg/spmatrix/spoper.c gsl-2.5+dfsg/spmatrix/spoper.c --- gsl-2.4+dfsg/spmatrix/spoper.c 2016-07-02 23:02:41.000000000 +0000 +++ gsl-2.5+dfsg/spmatrix/spoper.c 2018-01-04 22:23:01.000000000 +0000 @@ -103,8 +103,8 @@ else { int status = GSL_SUCCESS; - size_t *w = (size_t *) a->work; - double *x = (double *) b->work; + size_t *w = a->work_sze; + double *x = c->work_dbl; size_t *Cp, *Ci; double *Cd; size_t j, p; diff -Nru gsl-2.4+dfsg/spmatrix/spswap.c gsl-2.5+dfsg/spmatrix/spswap.c --- gsl-2.4+dfsg/spmatrix/spswap.c 2016-07-02 23:02:41.000000000 +0000 +++ gsl-2.5+dfsg/spmatrix/spswap.c 2018-01-04 22:16:59.000000000 +0000 @@ -167,7 +167,7 @@ size_t *ATi = dest->i; size_t *ATp = dest->p; double *ATd = dest->data; - size_t *w = (size_t *) dest->work; + size_t *w = dest->work_sze; size_t p, j; /* initialize to 0 */ @@ -203,7 +203,7 @@ size_t *ATj = dest->i; size_t *ATp = dest->p; double *ATd = dest->data; - size_t *w = (size_t *) dest->work; + size_t *w = dest->work_sze; size_t p, i; /* initialize to 0 */ diff -Nru gsl-2.4+dfsg/spmatrix/test.c gsl-2.5+dfsg/spmatrix/test.c --- gsl-2.4+dfsg/spmatrix/test.c 2017-05-24 09:16:17.000000000 +0000 +++ gsl-2.5+dfsg/spmatrix/test.c 2017-09-07 08:39:30.000000000 +0000 @@ -536,7 +536,7 @@ gsl_spmatrix *A_crs = gsl_spmatrix_crs(A); gsl_spmatrix *B_crs = gsl_spmatrix_crs(B); gsl_spmatrix *C_crs = gsl_spmatrix_alloc_nzmax(M, N, 1, GSL_SPMATRIX_CRS); - + gsl_spmatrix_add(C_ccs, A_ccs, B_ccs); gsl_spmatrix_add(C_crs, A_crs, B_crs); @@ -564,6 +564,32 @@ gsl_test(status == 1, "test_ops: add M=%zu N=%zu CCS", M, N); gsl_test(status == 2, "test_ops: add M=%zu N=%zu CRS", M, N); + /* test again with C = 2*A */ + gsl_spmatrix_add(C_ccs, A_ccs, A_ccs); + gsl_spmatrix_add(C_crs, A_crs, A_crs); + + status = 0; + for (i = 0; i < M; ++i) + { + for (j = 0; j < N; ++j) + { + double aij, bij, cij; + + aij = gsl_spmatrix_get(A_ccs, i, j); + cij = gsl_spmatrix_get(C_ccs, i, j); + if (aij + aij != cij) + status = 1; + + aij = gsl_spmatrix_get(A_crs, i, j); + cij = gsl_spmatrix_get(C_crs, i, j); + if (aij + aij != cij) + status = 2; + } + } + + gsl_test(status == 1, "test_ops: add duplicate M=%zu N=%zu CCS", M, N); + gsl_test(status == 2, "test_ops: add duplicate M=%zu N=%zu CRS", M, N); + gsl_spmatrix_free(A); gsl_spmatrix_free(B); gsl_spmatrix_free(A_ccs); diff -Nru gsl-2.4+dfsg/statistics/gastwirth.c gsl-2.5+dfsg/statistics/gastwirth.c --- gsl-2.4+dfsg/statistics/gastwirth.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gastwirth.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,71 @@ +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "gastwirth_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff -Nru gsl-2.4+dfsg/statistics/gastwirth_source.c gsl-2.5+dfsg/statistics/gastwirth_source.c --- gsl-2.4+dfsg/statistics/gastwirth_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gastwirth_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,39 @@ +/* statistics/gastwirth_source.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + + +double +FUNCTION(gsl_stats,gastwirth_from_sorted_data) (const BASE sorted_data[], + const size_t stride, + const size_t n) +{ + if (n == 0) + { + return 0.0; + } + else + { + double a = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted_data, stride, n, 1.0 / 3.0); + double b = FUNCTION(gsl_stats,median_from_sorted_data)(sorted_data, stride, n); + double c = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted_data, stride, n, 2.0 / 3.0); + double gastwirth = 0.3 * a + 0.4 * b + 0.3 * c; + + return gastwirth; + } +} diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_char.h gsl-2.5+dfsg/statistics/gsl_statistics_char.h --- gsl-2.4+dfsg/statistics/gsl_statistics_char.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_char.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_CHAR_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_char_min_index (const char data[], const size_t stride, const size_t n); void gsl_stats_char_minmax_index (size_t * min_index, size_t * max_index, const char data[], const size_t stride, const size_t n); +char gsl_stats_char_select(char data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_char_median_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_char_median (char sorted_data[], const size_t stride, const size_t n); double gsl_stats_char_quantile_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_char_trmean_from_sorted_data (const double trim, const char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_char_gastwirth_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_char_mad0(const char data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_char_mad(const char data[], const size_t stride, const size_t n, double work[]); + +char gsl_stats_char_Sn0_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, char work[]) ; +double gsl_stats_char_Sn_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, char work[]) ; + +char gsl_stats_char_Qn0_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, char work[], int work_int[]) ; +double gsl_stats_char_Qn_from_sorted_data (const char sorted_data[], const size_t stride, const size_t n, char work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_CHAR_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_double.h gsl-2.5+dfsg/statistics/gsl_statistics_double.h --- gsl-2.4+dfsg/statistics/gsl_statistics_double.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_double.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_DOUBLE_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -92,9 +93,24 @@ size_t gsl_stats_min_index (const double data[], const size_t stride, const size_t n); void gsl_stats_minmax_index (size_t * min_index, size_t * max_index, const double data[], const size_t stride, const size_t n); +double gsl_stats_select(double data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_median_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_median (double sorted_data[], const size_t stride, const size_t n); double gsl_stats_quantile_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_trmean_from_sorted_data (const double trim, const double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_gastwirth_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_mad0(const double data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_mad(const double data[], const size_t stride, const size_t n, double work[]); + +double gsl_stats_Sn0_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, double work[]) ; +double gsl_stats_Sn_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, double work[]) ; + +double gsl_stats_Qn0_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, double work[], int work_int[]) ; +double gsl_stats_Qn_from_sorted_data (const double sorted_data[], const size_t stride, const size_t n, double work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_DOUBLE_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_float.h gsl-2.5+dfsg/statistics/gsl_statistics_float.h --- gsl-2.4+dfsg/statistics/gsl_statistics_float.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_float.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_FLOAT_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -92,9 +93,24 @@ size_t gsl_stats_float_min_index (const float data[], const size_t stride, const size_t n); void gsl_stats_float_minmax_index (size_t * min_index, size_t * max_index, const float data[], const size_t stride, const size_t n); +float gsl_stats_float_select(float data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_float_median_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_float_median (float sorted_data[], const size_t stride, const size_t n); double gsl_stats_float_quantile_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_float_trmean_from_sorted_data (const double trim, const float sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_float_gastwirth_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_float_mad0(const float data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_float_mad(const float data[], const size_t stride, const size_t n, double work[]); + +float gsl_stats_float_Sn0_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, float work[]) ; +double gsl_stats_float_Sn_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, float work[]) ; + +float gsl_stats_float_Qn0_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, float work[], int work_int[]) ; +double gsl_stats_float_Qn_from_sorted_data (const float sorted_data[], const size_t stride, const size_t n, float work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_FLOAT_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_int.h gsl-2.5+dfsg/statistics/gsl_statistics_int.h --- gsl-2.4+dfsg/statistics/gsl_statistics_int.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_int.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_INT_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_int_min_index (const int data[], const size_t stride, const size_t n); void gsl_stats_int_minmax_index (size_t * min_index, size_t * max_index, const int data[], const size_t stride, const size_t n); +int gsl_stats_int_select(int data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_int_median_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_int_median (int sorted_data[], const size_t stride, const size_t n); double gsl_stats_int_quantile_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_int_trmean_from_sorted_data (const double trim, const int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_int_gastwirth_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_int_mad0(const int data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_int_mad(const int data[], const size_t stride, const size_t n, double work[]); + +int gsl_stats_int_Sn0_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, int work[]) ; +double gsl_stats_int_Sn_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, int work[]) ; + +int gsl_stats_int_Qn0_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, int work[], int work_int[]) ; +double gsl_stats_int_Qn_from_sorted_data (const int sorted_data[], const size_t stride, const size_t n, int work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_INT_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_long_double.h gsl-2.5+dfsg/statistics/gsl_statistics_long_double.h --- gsl-2.4+dfsg/statistics/gsl_statistics_long_double.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_long_double.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_LONG_DOUBLE_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -92,9 +93,24 @@ size_t gsl_stats_long_double_min_index (const long double data[], const size_t stride, const size_t n); void gsl_stats_long_double_minmax_index (size_t * min_index, size_t * max_index, const long double data[], const size_t stride, const size_t n); +long double gsl_stats_long_double_select(long double data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_long_double_median_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_double_median (long double sorted_data[], const size_t stride, const size_t n); double gsl_stats_long_double_quantile_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_long_double_trmean_from_sorted_data (const double trim, const long double sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_double_gastwirth_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_long_double_mad0(const long double data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_long_double_mad(const long double data[], const size_t stride, const size_t n, double work[]); + +long double gsl_stats_long_double_Sn0_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, long double work[]) ; +double gsl_stats_long_double_Sn_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, long double work[]) ; + +long double gsl_stats_long_double_Qn0_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, long double work[], int work_int[]) ; +double gsl_stats_long_double_Qn_from_sorted_data (const long double sorted_data[], const size_t stride, const size_t n, long double work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_LONG_DOUBLE_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_long.h gsl-2.5+dfsg/statistics/gsl_statistics_long.h --- gsl-2.4+dfsg/statistics/gsl_statistics_long.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_long.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_LONG_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_long_min_index (const long data[], const size_t stride, const size_t n); void gsl_stats_long_minmax_index (size_t * min_index, size_t * max_index, const long data[], const size_t stride, const size_t n); +long gsl_stats_long_select(long data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_long_median_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_median (long sorted_data[], const size_t stride, const size_t n); double gsl_stats_long_quantile_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_long_trmean_from_sorted_data (const double trim, const long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_long_gastwirth_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_long_mad0(const long data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_long_mad(const long data[], const size_t stride, const size_t n, double work[]); + +long gsl_stats_long_Sn0_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, long work[]) ; +double gsl_stats_long_Sn_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, long work[]) ; + +long gsl_stats_long_Qn0_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, long work[], int work_int[]) ; +double gsl_stats_long_Qn_from_sorted_data (const long sorted_data[], const size_t stride, const size_t n, long work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_LONG_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_short.h gsl-2.5+dfsg/statistics/gsl_statistics_short.h --- gsl-2.4+dfsg/statistics/gsl_statistics_short.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_short.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_SHORT_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_short_min_index (const short data[], const size_t stride, const size_t n); void gsl_stats_short_minmax_index (size_t * min_index, size_t * max_index, const short data[], const size_t stride, const size_t n); +short gsl_stats_short_select(short data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_short_median_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_short_median (short sorted_data[], const size_t stride, const size_t n); double gsl_stats_short_quantile_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_short_trmean_from_sorted_data (const double trim, const short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_short_gastwirth_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_short_mad0(const short data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_short_mad(const short data[], const size_t stride, const size_t n, double work[]); + +short gsl_stats_short_Sn0_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, short work[]) ; +double gsl_stats_short_Sn_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, short work[]) ; + +short gsl_stats_short_Qn0_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, short work[], int work_int[]) ; +double gsl_stats_short_Qn_from_sorted_data (const short sorted_data[], const size_t stride, const size_t n, short work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_SHORT_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_uchar.h gsl-2.5+dfsg/statistics/gsl_statistics_uchar.h --- gsl-2.4+dfsg/statistics/gsl_statistics_uchar.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_uchar.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_UCHAR_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_uchar_min_index (const unsigned char data[], const size_t stride, const size_t n); void gsl_stats_uchar_minmax_index (size_t * min_index, size_t * max_index, const unsigned char data[], const size_t stride, const size_t n); +unsigned char gsl_stats_uchar_select(unsigned char data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_uchar_median_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uchar_median (unsigned char sorted_data[], const size_t stride, const size_t n); double gsl_stats_uchar_quantile_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_uchar_trmean_from_sorted_data (const double trim, const unsigned char sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uchar_gastwirth_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_uchar_mad0(const unsigned char data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_uchar_mad(const unsigned char data[], const size_t stride, const size_t n, double work[]); + +unsigned char gsl_stats_uchar_Sn0_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, unsigned char work[]) ; +double gsl_stats_uchar_Sn_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, unsigned char work[]) ; + +unsigned char gsl_stats_uchar_Qn0_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, unsigned char work[], int work_int[]) ; +double gsl_stats_uchar_Qn_from_sorted_data (const unsigned char sorted_data[], const size_t stride, const size_t n, unsigned char work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_UCHAR_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_uint.h gsl-2.5+dfsg/statistics/gsl_statistics_uint.h --- gsl-2.4+dfsg/statistics/gsl_statistics_uint.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_uint.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_UINT_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_uint_min_index (const unsigned int data[], const size_t stride, const size_t n); void gsl_stats_uint_minmax_index (size_t * min_index, size_t * max_index, const unsigned int data[], const size_t stride, const size_t n); +unsigned int gsl_stats_uint_select(unsigned int data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_uint_median_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uint_median (unsigned int sorted_data[], const size_t stride, const size_t n); double gsl_stats_uint_quantile_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_uint_trmean_from_sorted_data (const double trim, const unsigned int sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_uint_gastwirth_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_uint_mad0(const unsigned int data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_uint_mad(const unsigned int data[], const size_t stride, const size_t n, double work[]); + +unsigned int gsl_stats_uint_Sn0_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, unsigned int work[]) ; +double gsl_stats_uint_Sn_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, unsigned int work[]) ; + +unsigned int gsl_stats_uint_Qn0_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, unsigned int work[], int work_int[]) ; +double gsl_stats_uint_Qn_from_sorted_data (const unsigned int sorted_data[], const size_t stride, const size_t n, unsigned int work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_UINT_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_ulong.h gsl-2.5+dfsg/statistics/gsl_statistics_ulong.h --- gsl-2.4+dfsg/statistics/gsl_statistics_ulong.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_ulong.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_ULONG_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_ulong_min_index (const unsigned long data[], const size_t stride, const size_t n); void gsl_stats_ulong_minmax_index (size_t * min_index, size_t * max_index, const unsigned long data[], const size_t stride, const size_t n); +unsigned long gsl_stats_ulong_select(unsigned long data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_ulong_median_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ulong_median (unsigned long sorted_data[], const size_t stride, const size_t n); double gsl_stats_ulong_quantile_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_ulong_trmean_from_sorted_data (const double trim, const unsigned long sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ulong_gastwirth_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_ulong_mad0(const unsigned long data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_ulong_mad(const unsigned long data[], const size_t stride, const size_t n, double work[]); + +unsigned long gsl_stats_ulong_Sn0_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, unsigned long work[]) ; +double gsl_stats_ulong_Sn_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, unsigned long work[]) ; + +unsigned long gsl_stats_ulong_Qn0_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, unsigned long work[], int work_int[]) ; +double gsl_stats_ulong_Qn_from_sorted_data (const unsigned long sorted_data[], const size_t stride, const size_t n, unsigned long work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_ULONG_H__ */ diff -Nru gsl-2.4+dfsg/statistics/gsl_statistics_ushort.h gsl-2.5+dfsg/statistics/gsl_statistics_ushort.h --- gsl-2.4+dfsg/statistics/gsl_statistics_ushort.h 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/gsl_statistics_ushort.h 2018-05-02 20:45:21.000000000 +0000 @@ -21,6 +21,7 @@ #define __GSL_STATISTICS_USHORT_H__ #include +#include #undef __BEGIN_DECLS #undef __END_DECLS @@ -72,9 +73,24 @@ size_t gsl_stats_ushort_min_index (const unsigned short data[], const size_t stride, const size_t n); void gsl_stats_ushort_minmax_index (size_t * min_index, size_t * max_index, const unsigned short data[], const size_t stride, const size_t n); +unsigned short gsl_stats_ushort_select(unsigned short data[], const size_t stride, const size_t n, const size_t k); + double gsl_stats_ushort_median_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ushort_median (unsigned short sorted_data[], const size_t stride, const size_t n); double gsl_stats_ushort_quantile_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, const double f) ; +double gsl_stats_ushort_trmean_from_sorted_data (const double trim, const unsigned short sorted_data[], const size_t stride, const size_t n) ; +double gsl_stats_ushort_gastwirth_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n) ; + +double gsl_stats_ushort_mad0(const unsigned short data[], const size_t stride, const size_t n, double work[]); +double gsl_stats_ushort_mad(const unsigned short data[], const size_t stride, const size_t n, double work[]); + +unsigned short gsl_stats_ushort_Sn0_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, unsigned short work[]) ; +double gsl_stats_ushort_Sn_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, unsigned short work[]) ; + +unsigned short gsl_stats_ushort_Qn0_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, unsigned short work[], int work_int[]) ; +double gsl_stats_ushort_Qn_from_sorted_data (const unsigned short sorted_data[], const size_t stride, const size_t n, unsigned short work[], int work_int[]) ; + __END_DECLS #endif /* __GSL_STATISTICS_USHORT_H__ */ diff -Nru gsl-2.4+dfsg/statistics/mad.c gsl-2.5+dfsg/statistics/mad.c --- gsl-2.4+dfsg/statistics/mad.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/mad.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,72 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "mad_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff -Nru gsl-2.4+dfsg/statistics/mad_source.c gsl-2.5+dfsg/statistics/mad_source.c --- gsl-2.4+dfsg/statistics/mad_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/mad_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,66 @@ +/* statistics/mad_source.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +/* +gsl_stats_mad0() + Compute median absolute deviation + +Inputs: data - array containing the observations + stride - stride + n - length of 'data' + work - workspace of length n + +Return: MAD statistic (without scale/correction factor) +*/ + +double +FUNCTION(gsl_stats,mad0) (const BASE data[], + const size_t stride, + const size_t n, + double work[]) +{ + double median, mad; + size_t i; + + /* copy input data to work */ + for (i = 0; i < n; ++i) + work[i] = (double) data[i * stride]; + + /* compute median of input data using double version */ + median = gsl_stats_median(work, 1, n); + + /* compute absolute deviations from median */ + for (i = 0; i < n; ++i) + work[i] = fabs((double) data[i * stride] - median); + + mad = gsl_stats_median(work, 1, n); + + return mad; +} + +double +FUNCTION(gsl_stats,mad) (const BASE data[], + const size_t stride, + const size_t n, + double work[]) +{ + double mad0 = FUNCTION(gsl_stats,mad0)(data, stride, n, work); + double mad = 1.482602218505602 * mad0; + return mad; +} diff -Nru gsl-2.4+dfsg/statistics/Makefile.am gsl-2.5+dfsg/statistics/Makefile.am --- gsl-2.4+dfsg/statistics/Makefile.am 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Makefile.am 2018-05-02 20:45:21.000000000 +0000 @@ -6,14 +6,14 @@ AM_CPPFLAGS = -I$(top_srcdir) -libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c +libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c mad.c median.c covariance.c quantiles.c select.c Sn.c Qn.c gastwirth.c trmean.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c -noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c +noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c mad_source.c median_source.c quantiles_source.c select_source.c Sn_source.c Qn_source.c gastwirth_source.c trmean_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c check_PROGRAMS = test TESTS = $(check_PROGRAMS) -test_SOURCES = test.c test_nist.c -test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../vector/libgslvector.la +test_SOURCES = test.c test_nist.c test_robust.c +test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../rng/libgslrng.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../vector/libgslvector.la diff -Nru gsl-2.4+dfsg/statistics/Makefile.in gsl-2.5+dfsg/statistics/Makefile.in --- gsl-2.4+dfsg/statistics/Makefile.in 2017-06-19 12:55:40.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Makefile.in 2018-06-13 20:31:04.000000000 +0000 @@ -96,20 +96,22 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libgslstatistics_la_LIBADD = am_libgslstatistics_la_OBJECTS = mean.lo variance.lo absdev.lo skew.lo \ - kurtosis.lo lag1.lo p_variance.lo minmax.lo ttest.lo median.lo \ - covariance.lo quantiles.lo wmean.lo wvariance.lo wabsdev.lo \ + kurtosis.lo lag1.lo p_variance.lo minmax.lo ttest.lo mad.lo \ + median.lo covariance.lo quantiles.lo select.lo Sn.lo Qn.lo \ + gastwirth.lo trmean.lo wmean.lo wvariance.lo wabsdev.lo \ wskew.lo wkurtosis.lo libgslstatistics_la_OBJECTS = $(am_libgslstatistics_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -am_test_OBJECTS = test.$(OBJEXT) test_nist.$(OBJEXT) +am_test_OBJECTS = test.$(OBJEXT) test_nist.$(OBJEXT) \ + test_robust.$(OBJEXT) test_OBJECTS = $(am_test_OBJECTS) test_DEPENDENCIES = libgslstatistics.la ../sort/libgslsort.la \ ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la \ - ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la \ - ../vector/libgslvector.la + ../rng/libgslrng.la ../test/libgsltest.la ../sys/libgslsys.la \ + ../utils/libutils.la ../vector/libgslvector.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -524,11 +526,11 @@ noinst_LTLIBRARIES = libgslstatistics.la pkginclude_HEADERS = gsl_statistics.h gsl_statistics_char.h gsl_statistics_double.h gsl_statistics_float.h gsl_statistics_int.h gsl_statistics_long.h gsl_statistics_long_double.h gsl_statistics_short.h gsl_statistics_uchar.h gsl_statistics_uint.h gsl_statistics_ulong.h gsl_statistics_ushort.h AM_CPPFLAGS = -I$(top_srcdir) -libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c median.c covariance.c quantiles.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c -noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c median_source.c quantiles_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c +libgslstatistics_la_SOURCES = mean.c variance.c absdev.c skew.c kurtosis.c lag1.c p_variance.c minmax.c ttest.c mad.c median.c covariance.c quantiles.c select.c Sn.c Qn.c gastwirth.c trmean.c wmean.c wvariance.c wabsdev.c wskew.c wkurtosis.c +noinst_HEADERS = mean_source.c variance_source.c covariance_source.c absdev_source.c skew_source.c kurtosis_source.c lag1_source.c p_variance_source.c minmax_source.c ttest_source.c mad_source.c median_source.c quantiles_source.c select_source.c Sn_source.c Qn_source.c gastwirth_source.c trmean_source.c wmean_source.c wvariance_source.c wabsdev_source.c wskew_source.c wkurtosis_source.c test_float_source.c test_int_source.c TESTS = $(check_PROGRAMS) -test_SOURCES = test.c test_nist.c -test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../vector/libgslvector.la +test_SOURCES = test.c test_nist.c test_robust.c +test_LDADD = libgslstatistics.la ../sort/libgslsort.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../rng/libgslrng.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la ../vector/libgslvector.la all: all-am .SUFFIXES: @@ -597,18 +599,25 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Qn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/absdev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/covariance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gastwirth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kurtosis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lag1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mad.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/median.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_variance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantiles.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skew.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_nist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_robust.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trmean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variance.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wabsdev.Plo@am__quote@ diff -Nru gsl-2.4+dfsg/statistics/median_source.c gsl-2.5+dfsg/statistics/median_source.c --- gsl-2.4+dfsg/statistics/median_source.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/median_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -42,3 +42,26 @@ return median ; } +double +FUNCTION(gsl_stats,median) (BASE data[], const size_t stride, const size_t n) +{ + double median; + const size_t lhs = (n - 1) / 2 ; + const size_t rhs = n / 2 ; + + if (n == 0) + return 0.0; + + if (lhs == rhs) + { + median = (double) FUNCTION(gsl_stats,select)(data, stride, n, lhs); + } + else + { + BASE a = FUNCTION(gsl_stats,select)(data, stride, n, lhs); + BASE b = FUNCTION(gsl_stats,select)(data, stride, n, rhs); + median = 0.5 * (a + b); + } + + return median; +} diff -Nru gsl-2.4+dfsg/statistics/Qn.c gsl-2.5+dfsg/statistics/Qn.c --- gsl-2.4+dfsg/statistics/Qn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Qn.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,73 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "Qn_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff -Nru gsl-2.4+dfsg/statistics/Qn_source.c gsl-2.5+dfsg/statistics/Qn_source.c --- gsl-2.4+dfsg/statistics/Qn_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Qn_source.c 2018-05-03 15:53:27.000000000 +0000 @@ -0,0 +1,381 @@ +/* statistics/Qn_source.c + * + * Copyright (C) 2018 Patrick Alken + * Copyright (C) 2005, 2006, 2007 Martin Maechler, ETH Zurich + * + * 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 3 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. + */ + +/* This is a merge of the C version of original files qn.f and sn.f, + * translated by f2c (version 20010821). ==== ==== + * and then by f2c-clean,v 1.9 2000/01/13 13:46:53 + * and further clean-edited manually by Martin Maechler. + * + * Further added interface functions to be called via .C() from R or S-plus + * Note that Peter Rousseeuw has explicitely given permission to + * use his code under the GPL for the R project. + */ + +/* Original comments by the authors of the Fortran original code, + * (merged for Qn & Sn in one file by M.M.): + + This file contains fortran functions for two new robust estimators + of scale denoted as Qn and Sn, decribed in Rousseeuw and Croux (1993). + These estimators have a high breakdown point and a bounded influence + function. The implementation given here is very fast (running in + O(n logn) time) and needs little storage space. + + Rousseeuw, P.J. and Croux, C. (1993) + Alternatives to the Median Absolute Deviation", + Journal of the American Statistical Association, Vol. 88, 1273-1283. + + For both estimators, implementations in the pascal language can be + obtained from the original authors. + + This software may be used and copied freely for scientific + and/or non-commercial purposes, provided reference is made + to the abovementioned paper. + +Note by MM: We have explicit permission from P.Rousseeuw to +licence it under the GNU Public Licence. +*/ + +#ifndef int64_t +#define int64_t long int +#endif + +static BASE FUNCTION(Qn,whimed)(BASE * a, int * w, int n, BASE * a_cand, BASE * a_srt, int * w_cand); + +/* +gsl_stats_Qn0_from_sorted_data() + Efficient algorithm for the scale estimator: + + Q_n0 = { |x_i - x_j|; i ni) + { + j = 0; + /* Truncation to float : try to make sure that the same values are got later (guard bits !) */ + for (i = 1; i < ni; ++i) + { + if (left[i] <= right[i]) + { + weight[j] = right[i] - left[i] + 1; + jh = left[i] + weight[j] / 2; + work[j] = sorted_data[i * stride] - sorted_data[(ni - jh) * stride]; + ++j; + } + } + + trial = FUNCTION(Qn,whimed)(work, weight, j, a_cand, a_srt, /*iw_cand*/ p); + + j = 0; + for (i = ni - 1; i >= 0; --i) + { + while (j < ni && ((double)(sorted_data[i * stride] - sorted_data[(ni - j - 1) * stride])) < trial) + ++j; + + p[i] = j; + } + + j = ni + 1; + for (i = 0; i < ni; ++i) + { + while ((double)(sorted_data[i * stride] - sorted_data[(ni - j + 1) * stride]) > trial) + --j; + + q[i] = j; + } + + sump = 0; + sumq = 0; + + for (i = 0; i < ni; ++i) + { + sump += p[i]; + sumq += q[i] - 1; + } + + if (knew <= sump) + { + for (i = 0; i < ni; ++i) + right[i] = p[i]; + + nr = sump; + } + else if (knew > sumq) + { + for (i = 0; i < ni; ++i) + left[i] = q[i]; + + nl = sumq; + } + else /* sump < knew <= sumq */ + { + found = 1; + } + } /* while */ + + if (found) + { + return trial; + } + else + { + j = 0; + for (i = 1; i < ni; ++i) + { + int jj; + + for (jj = left[i]; jj <= right[i]; ++jj) + { + work[j] = sorted_data[i * stride] - sorted_data[(ni - jj) * stride]; + j++; + }/* j will be = sum_{i=2}^n (right[i] - left[i] + 1)_{+} */ + } + + /* return pull(work, j - 1, knew - nl) : */ + knew -= (nl + 1); /* -1: 0-indexing */ + + /* sort work array */ + TYPE (gsl_sort) (work, 1, j); + + return (work[knew]); + } +} + +/* +gsl_stats_Qn_from_sorted_data() + Efficient algorithm for the scale estimator: + + Q_n = 2.219 * d_n * { |x_i - x_j|; i= 1e5 */ + int64_t wleft, wmid, wright, w_tot, wrest; + + BASE trial; + + w_tot = 0; + for (i = 0; i < n; ++i) + w_tot += w[i]; + + wrest = 0; + + /* REPEAT : */ + do + { + for (i = 0; i < n; ++i) + a_srt[i] = a[i]; + + n2 = n/2; /* =^= n/2 +1 with 0-indexing */ +#if 0 + rPsort(a_srt, n, n2); +#else + TYPE (gsl_sort) (a_srt, 1, n); +#endif + trial = a_srt[n2]; + + wleft = 0; + wmid = 0; + wright = 0; + + for (i = 0; i < n; ++i) + { + if (a[i] < trial) + wleft += w[i]; + else if (a[i] > trial) + wright += w[i]; + else + wmid += w[i]; + } + + /* wleft = sum_{i; a[i] < trial} w[i] + * wmid = sum_{i; a[i] == trial} w[i] at least one 'i' since trial is one a[]! + * wright= sum_{i; a[i] > trial} w[i] + */ + kcand = 0; + if (2 * (wrest + wleft) > w_tot) + { + for (i = 0; i < n; ++i) + { + if (a[i] < trial) + { + a_cand[kcand] = a[i]; + w_cand[kcand] = w[i]; + ++kcand; + } + } + } + else if (2 * (wrest + wleft + wmid) <= w_tot) + { + for (i = 0; i < n; ++i) + { + if (a[i] > trial) + { + a_cand[kcand] = a[i]; + w_cand[kcand] = w[i]; + ++kcand; + } + } + + wrest += wleft + wmid; + } + else + { + return trial; + } + + n = kcand; + for (i = 0; i < n; ++i) + { + a[i] = a_cand[i]; + w[i] = w_cand[i]; + } + } while(1); +} diff -Nru gsl-2.4+dfsg/statistics/select.c gsl-2.5+dfsg/statistics/select.c --- gsl-2.4+dfsg/statistics/select.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/select.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,73 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "select_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff -Nru gsl-2.4+dfsg/statistics/select_source.c gsl-2.5+dfsg/statistics/select_source.c --- gsl-2.4+dfsg/statistics/select_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/select_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,112 @@ +/* statistics/select_source.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#define SWAP(a,b) do { tmp = b ; b = a ; a = tmp ; } while(0) + +/* +gsl_stats_select() + Select k-th largest element from an unsorted array using +quickselect algorithm + +Inputs: data - unsorted array containing the observations + stride - stride + n - length of 'data' + k - desired element in [0,n-1] + +Return: k-th largest element of data[] +*/ + +BASE +FUNCTION(gsl_stats,select) (BASE data[], + const size_t stride, + const size_t n, + const size_t k) +{ + if (n == 0) + { + GSL_ERROR_VAL("array size must be positive", GSL_EBADLEN, 0.0); + } + else + { + size_t left = 0; + size_t right = n - 1; + size_t mid, i, j; + BASE pivot, tmp; + + while (1) + { + if (right <= left + 1) + { + if (right == left + 1 && data[right * stride] < data[left * stride]) + { + SWAP(data[left * stride], data[right * stride]); + } + + return data[k * stride]; + } + else + { + mid = (left + right) >> 1; + SWAP(data[mid * stride], data[(left + 1) * stride]); + + if (data[left * stride] > data[right * stride]) + { + SWAP(data[left * stride], data[right * stride]); + } + + if (data[(left + 1) * stride] > data[right * stride]) + { + SWAP(data[(left + 1) * stride], data[right * stride]); + } + + if (data[left * stride] > data[(left + 1) * stride]) + { + SWAP(data[left * stride], data[(left + 1) * stride]); + } + + i = left + 1; + j = right; + pivot = data[(left + 1) * stride]; + + while (1) + { + do i++; while (data[i * stride] < pivot); + do j--; while (data[j * stride] > pivot); + + if (j < i) + break; + + SWAP(data[i * stride], data[j * stride]); + } + + data[(left + 1) * stride] = data[j * stride]; + data[j * stride] = pivot; + + if (j >= k) + right = j - 1; + + if (j <= k) + left = i; + } + } + + /* will never get here */ + GSL_ERROR_VAL("select error", GSL_FAILURE, 0.0); + } +} diff -Nru gsl-2.4+dfsg/statistics/Sn.c gsl-2.5+dfsg/statistics/Sn.c --- gsl-2.4+dfsg/statistics/Sn.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Sn.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,73 @@ +#include +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "Sn_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + + diff -Nru gsl-2.4+dfsg/statistics/Sn_source.c gsl-2.5+dfsg/statistics/Sn_source.c --- gsl-2.4+dfsg/statistics/Sn_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/Sn_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,269 @@ +/* statistics/Sn_source.c + * + * Copyright (C) 2018 Patrick Alken + * Copyright (C) 2005, 2006, 2007 Martin Maechler, ETH Zurich + * + * 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 3 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. + */ + +/* This is a merge of the C version of original files qn.f and sn.f, + * translated by f2c (version 20010821). ==== ==== + * and then by f2c-clean,v 1.9 2000/01/13 13:46:53 + * and further clean-edited manually by Martin Maechler. + * + * Further added interface functions to be called via .C() from R or S-plus + * Note that Peter Rousseeuw has explicitely given permission to + * use his code under the GPL for the R project. + */ + +/* Original comments by the authors of the Fortran original code, + * (merged for Qn & Sn in one file by M.M.): + + This file contains fortran functions for two new robust estimators + of scale denoted as Qn and Sn, decribed in Rousseeuw and Croux (1993). + These estimators have a high breakdown point and a bounded influence + function. The implementation given here is very fast (running in + O(n logn) time) and needs little storage space. + + Rousseeuw, P.J. and Croux, C. (1993) + Alternatives to the Median Absolute Deviation", + Journal of the American Statistical Association, Vol. 88, 1273-1283. + + For both estimators, implementations in the pascal language can be + obtained from the original authors. + + This software may be used and copied freely for scientific + and/or non-commercial purposes, provided reference is made + to the abovementioned paper. + +Note by MM: We have explicit permission from P.Rousseeuw to +licence it under the GNU Public Licence. +*/ + +/* +gsl_stats_Sn0_from_sorted_data() + Efficient algorithm for the scale estimator: + + S_n0 = LOMED_{i} HIMED_{i} |x_i - x_j| + +which can equivalently be written as + + S_n0 = LOMED_{i} LOMED_{j != i} |x_i - x_j| + +Inputs: sorted_data - sorted array containing the observations + stride - stride + n - length of 'sorted_data' + work - workspace of length n + work[i] := LOMED_{j != i} | x_i - x_j | + +Return: S_n statistic (without scale/correction factor) +*/ + +BASE +FUNCTION(gsl_stats,Sn0_from_sorted_data) (const BASE sorted_data[], + const size_t stride, + const size_t n, + BASE work[]) +{ + /* Local variables */ + double medA, medB; + int i, diff, half, Amin, Amax, even, length; + int leftA, leftB, nA, nB, tryA, tryB, rightA, rightB; + int np1_2 = (n + 1) / 2; + + work[0] = sorted_data[n / 2 * stride] - sorted_data[0]; + + /* first half for() loop : */ + for (i = 2; i <= np1_2; ++i) + { + nA = i - 1; + nB = n - i; + diff = nB - nA; + leftA = leftB = 1; + rightA = rightB = nB; + Amin = diff / 2 + 1; + Amax = diff / 2 + nA; + + while (leftA < rightA) + { + length = rightA - leftA + 1; + even = 1 - length % 2; + half = (length - 1) / 2; + tryA = leftA + half; + tryB = leftB + half; + if (tryA < Amin) + { + rightB = tryB; + leftA = tryA + even; + } + else + { + if (tryA > Amax) + { + rightA = tryA; + leftB = tryB + even; + } + else + { + medA = sorted_data[(i - 1) * stride] - sorted_data[(i - tryA + Amin - 2) * stride]; + medB = sorted_data[(tryB + i - 1) * stride] - sorted_data[(i - 1) * stride]; + if (medA >= medB) + { + rightA = tryA; + leftB = tryB + even; + } + else + { + rightB = tryB; + leftA = tryA + even; + } + } + } + } /* while */ + + if (leftA > Amax) + { + work[i - 1] = sorted_data[(leftB + i - 1) * stride] - sorted_data[(i - 1) * stride]; + } + else + { + medA = sorted_data[(i - 1) * stride] - sorted_data[(i - leftA + Amin - 2) * stride]; + medB = sorted_data[(leftB + i - 1) * stride] - sorted_data[(i - 1) * stride]; + work[i - 1] = GSL_MIN(medA, medB); + } + } + + /* second half for() loop : */ + for (i = np1_2 + 1; i <= (int) n - 1; ++i) + { + nA = n - i; + nB = i - 1; + diff = nB - nA; + leftA = leftB = 1; + rightA = rightB = nB; + Amin = diff / 2 + 1; + Amax = diff / 2 + nA; + + while (leftA < rightA) + { + length = rightA - leftA + 1; + even = 1 - length % 2; + half = (length - 1) / 2; + tryA = leftA + half; + tryB = leftB + half; + + if (tryA < Amin) + { + rightB = tryB; + leftA = tryA + even; + } + else + { + if (tryA > Amax) + { + rightA = tryA; + leftB = tryB + even; + } + else + { + medA = sorted_data[(i + tryA - Amin) * stride] - sorted_data[(i - 1) * stride]; + medB = sorted_data[(i - 1) * stride] - sorted_data[(i - tryB - 1) * stride]; + if (medA >= medB) + { + rightA = tryA; + leftB = tryB + even; + } + else + { + rightB = tryB; + leftA = tryA + even; + } + } + } + } /* while */ + + if (leftA > Amax) + { + work[i - 1] = sorted_data[(i - 1) * stride] - sorted_data[(i - leftB - 1) * stride]; + } + else + { + medA = sorted_data[(i + leftA - Amin) * stride] - sorted_data[(i - 1) * stride]; + medB = sorted_data[(i - 1) * stride] - sorted_data[(i - leftB - 1) * stride]; + work[i - 1] = GSL_MIN(medA, medB); + } + } + + work[n - 1] = sorted_data[(n - 1) * stride] - sorted_data[(np1_2 - 1) * stride]; + + /* sort work array */ + TYPE (gsl_sort) (work, 1, n); + + return work[np1_2 - 1]; +} + +/* +gsl_stats_Sn_from_sorted_data() + Efficient algorithm for the scale estimator: + + S_n = 1.1926 * c_n LOMED_{i} HIMED_{i} |x_i - x_j| + +which can equivalently be written as + + S_n = 1.1926 * c_n * LOMED_{i} LOMED_{j != i} |x_i - x_j| + +and c_n is a correction factor for small sample bias + +Inputs: sorted_data - sorted array containing the observations + stride - stride + n - length of 'sorted_data' + work - workspace of length n + work[i] := LOMED_{j != i} | x_i - x_j | + +Return: S_n statistic +*/ + +double +FUNCTION(gsl_stats,Sn_from_sorted_data) (const BASE sorted_data[], + const size_t stride, + const size_t n, + BASE work[]) +{ + const double scale = 1.1926; /* asymptotic consistency for sigma^2 */ + double Sn0 = (double) FUNCTION(gsl_stats,Sn0_from_sorted_data)(sorted_data, stride, n, work); + double cn = 1.0; + double Sn; + + /* determine correction factor for finite sample bias */ + if (n <= 9) + { + if (n == 2) cn = 0.743; + else if (n == 3) cn = 1.851; + else if (n == 4) cn = 0.954; + else if (n == 5) cn = 1.351; + else if (n == 6) cn = 0.993; + else if (n == 7) cn = 1.198; + else if (n == 8) cn = 1.005; + else if (n == 9) cn = 1.131; + } + else if (n % 2 == 1) /* n odd, >= 11 */ + { + cn = (double) n / (n - 0.9); + } + + Sn = scale * cn * Sn0; + + return Sn; +} diff -Nru gsl-2.4+dfsg/statistics/test.c gsl-2.5+dfsg/statistics/test.c --- gsl-2.4+dfsg/statistics/test.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/test.c 2018-05-02 20:45:21.000000000 +0000 @@ -30,6 +30,7 @@ #include int test_nist (void); +int test_robust (void); /* Test program for mean.c. JimDavies 7.96 */ @@ -126,6 +127,7 @@ } test_nist(); + test_robust(); exit (gsl_test_summary ()); } diff -Nru gsl-2.4+dfsg/statistics/test_float_source.c gsl-2.5+dfsg/statistics/test_float_source.c --- gsl-2.4+dfsg/statistics/test_float_source.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/test_float_source.c 2018-05-02 20:45:21.000000000 +0000 @@ -299,9 +299,70 @@ double median = FUNCTION(gsl_stats,median_from_sorted_data)(sorted, stridea, na - 1) ; double expected = 0.0728; gsl_test_rel (median,expected, rel, - NAME(gsl_stats) "_median_from_sorted_data"); + NAME(gsl_stats) "_median_from_sorted_data (odd)"); } + { + BASE * work = (BASE *) malloc (stridea * na * sizeof(BASE)); + double expected = 0.07505; + double median; + + for (i = 0; i < na; i++) + work[i * stridea] = (BASE) rawa[i]; + + median = FUNCTION(gsl_stats,median)(work, stridea, na) ; + + gsl_test_rel (median, expected, rel, + NAME(gsl_stats) "_median (even)"); + + free(work); + } + + { + BASE * work = (BASE *) malloc (stridea * (na - 1) * sizeof(BASE)); + double expected = 0.0728; + double median; + + for (i = 0; i < na - 1; i++) + work[i * stridea] = (BASE) sorted[i * stridea]; + + median = FUNCTION(gsl_stats,median)(work, stridea, na - 1) ; + + gsl_test_rel (median, expected, rel, + NAME(gsl_stats) "_median (odd)"); + + free(work); + } + + { + const double trim = 0.2; + double trmean = FUNCTION(gsl_stats,trmean_from_sorted_data)(trim, sorted, stridea, na) ; + double expected = 0.0719; + gsl_test_rel (trmean, expected, rel, + NAME(gsl_stats) "_trmean_from_sorted_data (even)"); + } + + { + const double trim = 0.2; + double trmean = FUNCTION(gsl_stats,trmean_from_sorted_data)(trim, sorted, stridea, na - 1) ; + double expected = 0.06806666666666666; + gsl_test_rel (trmean, expected, rel, + NAME(gsl_stats) "_trmean_from_sorted_data (odd)"); + } + + { + double gastwirth = FUNCTION(gsl_stats,gastwirth_from_sorted_data)(sorted, stridea, na) ; + double expected = 0.07271; + gsl_test_rel (gastwirth, expected, rel, + NAME(gsl_stats) "_gastwirth_from_sorted_data (even)"); + } + + { + double gastwirth = FUNCTION(gsl_stats,gastwirth_from_sorted_data)(sorted, stridea, na - 1) ; + double expected = 0.06794; + gsl_test_rel (gastwirth, expected, rel, + NAME(gsl_stats) "_gastwirth_from_sorted_data (odd)"); + } { double zeroth = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, na, 0.0) ; @@ -332,6 +393,27 @@ } + { + size_t k; + BASE * work = (BASE *) malloc (stridea * na * sizeof(BASE)); + + for (k = 0; k < na; ++k) + { + double expected = sorted[k * stridea]; + double kselect; + + /* copy rawa[] for each k, since gsl_stats_select() changes input array */ + for (i = 0; i < na; i++) + work[i * stridea] = (BASE) rawa[i]; + + kselect = FUNCTION(gsl_stats,select)(work, stridea, na, k); + + gsl_test_rel(kselect, expected, rel, NAME(gsl_stats) "_select"); + } + + free(work); + } + /* Test for IEEE handling - set third element to NaN */ groupa [3*stridea] = GSL_NAN; @@ -416,6 +498,61 @@ min_index, expected_min_index); } + /* restore */ + groupa [3*stridea] = (BASE) rawa[3]; + + { + double * work = (double *) malloc (na * sizeof(double)); + double expected = 0.02925; + double mad0 = FUNCTION(gsl_stats,mad0)(groupa, stridea, na, work); + gsl_test_rel (mad0, expected, rel, NAME(gsl_stats) "_mad0 (even)"); + free(work); + } + + { + double * work = (double *) malloc ((na - 1) * sizeof(double)); + double expected = 0.02910; + double mad0 = FUNCTION(gsl_stats,mad0)(groupa, stridea, na - 1, work); + gsl_test_rel (mad0, expected, rel, NAME(gsl_stats) "_mad0 (odd)"); + free(work); + } + + { + BASE *work = malloc(na * sizeof(BASE)); + double r = FUNCTION(gsl_stats,Sn_from_sorted_data) (sorted, stridea, na, work); + double expected = 0.04007136; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_Sn_from_sorted_data (even)"); + free(work); + } + + { + BASE *work = malloc((na - 1) * sizeof(BASE)); + double r = FUNCTION(gsl_stats,Sn_from_sorted_data) (sorted, stridea, na - 1, work); + double expected = 0.03728599834710744; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_Sn_from_sorted_data (odd)"); + free(work); + } + + { + BASE *work = malloc(3 * na * sizeof(BASE)); + int *work_int = malloc(5 * na * sizeof(int)); + double r = FUNCTION(gsl_stats,Qn_from_sorted_data) (sorted, stridea, na, work, work_int); + double expected = 0.04113672759664409; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_Qn_from_sorted_data (even)"); + free(work); + free(work_int); + } + + { + BASE *work = malloc(3 * (na - 1) * sizeof(BASE)); + int *work_int = malloc(5 * (na - 1) * sizeof(int)); + double r = FUNCTION(gsl_stats,Qn_from_sorted_data) (sorted, stridea, na - 1, work, work_int); + double expected = 0.03684305546303433; + gsl_test_rel (r, expected, rel, NAME(gsl_stats) "_Qn_from_sorted_data (odd)"); + free(work); + free(work_int); + } + free (sorted); free (groupa); free (groupb); diff -Nru gsl-2.4+dfsg/statistics/test_int_source.c gsl-2.5+dfsg/statistics/test_int_source.c --- gsl-2.4+dfsg/statistics/test_int_source.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/test_int_source.c 2018-06-13 19:33:55.000000000 +0000 @@ -230,6 +230,67 @@ NAME(gsl_stats) "_median_from_sorted_data (odd)"); } + { + BASE * work = (BASE *) malloc (stridea * ina * sizeof(BASE)); + double expected = 18; + double median; + + for (i = 0; i < ina; i++) + work[i * stridea] = (BASE) irawa[i]; + + median = FUNCTION(gsl_stats,median)(work, stridea, ina) ; + + gsl_test_rel (median, expected, rel, + NAME(gsl_stats) "_median (even)"); + + free(work); + } + + { + BASE * work = (BASE *) malloc (stridea * (ina - 1) * sizeof(BASE)); + double expected = 18; + double median; + + for (i = 0; i < ina - 1; i++) + work[i * stridea] = sorted[i * stridea]; + + median = FUNCTION(gsl_stats,median)(work, stridea, ina - 1) ; + + gsl_test_rel (median, expected, rel, + NAME(gsl_stats) "_median (odd)"); + + free(work); + } + + { + const double trim = 0.31; + double trmean = FUNCTION(gsl_stats,trmean_from_sorted_data)(trim, sorted, stridea, ina) ; + double expected = 17.875; + gsl_test_rel (trmean, expected, rel, + NAME(gsl_stats) "_trmean_from_sorted_data (even)"); + } + + { + const double trim = 0.3; + double trmean = FUNCTION(gsl_stats,trmean_from_sorted_data)(trim, sorted, stridea, ina - 1) ; + double expected = 17.66666666666666; + gsl_test_rel (trmean, expected, rel, + NAME(gsl_stats) "_trmean_from_sorted_data (odd)"); + } + + { + double gastwirth = FUNCTION(gsl_stats,gastwirth_from_sorted_data)(sorted, stridea, ina) ; + double expected = 17.9; + gsl_test_rel (gastwirth, expected, rel, + NAME(gsl_stats) "_gastwirth_from_sorted_data (even)"); + } + + { + double gastwirth = FUNCTION(gsl_stats,gastwirth_from_sorted_data)(sorted, stridea, ina - 1) ; + double expected = 17.4; + gsl_test_rel (gastwirth, expected, rel, + NAME(gsl_stats) "_gastwirth_from_sorted_data (odd)"); + } { double zeroth = FUNCTION(gsl_stats,quantile_from_sorted_data)(sorted, stridea, ina, 0.0) ; @@ -259,6 +320,85 @@ NAME(gsl_stats) "_quantile_from_sorted_data (50, odd)"); } + { + size_t k; + BASE * work = (BASE *) malloc (stridea * ina * sizeof(BASE)); + + for (k = 0; k < ina; ++k) + { + int expected = sorted[k * stridea]; + int kselect; + + /* copy irawa[] for each k, since gsl_stats_select() changes input array */ + for (i = 0; i < ina; i++) + work[i * stridea] = (BASE) irawa[i]; + + kselect = FUNCTION(gsl_stats,select)(work, stridea, ina, k); + + gsl_test (kselect != expected, + NAME(gsl_stats) "_select (%d observed vs %d expected)", + kselect, expected); + } + + free(work); + } + + { + double * work = (double *) malloc (ina * sizeof(double)); + double expected = 2.0; + double mad0 = FUNCTION(gsl_stats,mad0)(igroupa, stridea, ina, work); + gsl_test_rel (mad0, expected, rel, NAME(gsl_stats) "_mad0 (even)"); + free(work); + } + + { + double * work = (double *) malloc ((ina - 1) * sizeof(double)); + double expected = 2.0; + double mad0 = FUNCTION(gsl_stats,mad0)(igroupa, stridea, ina - 1, work); + gsl_test_rel (mad0, expected, rel, NAME(gsl_stats) "_mad0 (odd)"); + free(work); + } + + { + BASE * work = malloc(ina * sizeof(BASE)); + double sn = FUNCTION(gsl_stats,Sn_from_sorted_data)(sorted, stridea, ina, work) ; + double expected = 2.3852; + gsl_test_rel (sn, expected, rel, + NAME(gsl_stats) "_Sn_from_sorted_data (even)"); + free(work); + } + + { + BASE * work = malloc((ina - 1) * sizeof(BASE)); + double sn = FUNCTION(gsl_stats,Sn_from_sorted_data)(sorted, stridea, ina - 1, work) ; + double expected = 2.503801104972376; + gsl_test_rel (sn, expected, rel, + NAME(gsl_stats) "_Sn_from_sorted_data (odd)"); + free(work); + } + + { + BASE * work = malloc(3 * ina * sizeof(BASE)); + int * work_int = malloc(5 * ina * sizeof(int)); + double qn = FUNCTION(gsl_stats,Qn_from_sorted_data)(sorted, stridea, ina, work, work_int) ; + double expected = 3.732513488036874; + gsl_test_rel (qn, expected, rel, + NAME(gsl_stats) "_Qn_from_sorted_data (even)"); + free(work); + free(work_int); + } + + { + BASE * work = malloc(3 * (ina - 1) * sizeof(BASE)); + int * work_int = malloc(5 * (ina - 1) * sizeof(int)); + double qn = FUNCTION(gsl_stats,Qn_from_sorted_data)(sorted, stridea, ina - 1, work, work_int) ; + double expected = 4.118443402621429; + gsl_test_rel (qn, expected, rel, + NAME(gsl_stats) "_Qn_from_sorted_data (odd)"); + free(work); + free(work_int); + } + free (sorted); free (igroupa); free (igroupb); diff -Nru gsl-2.4+dfsg/statistics/test_nist.c gsl-2.5+dfsg/statistics/test_nist.c --- gsl-2.4+dfsg/statistics/test_nist.c 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/statistics/test_nist.c 2018-05-03 15:55:29.000000000 +0000 @@ -29,6 +29,8 @@ #include #include +int test_nist (void); + int test_nist (void) { diff -Nru gsl-2.4+dfsg/statistics/test_robust.c gsl-2.5+dfsg/statistics/test_robust.c --- gsl-2.4+dfsg/statistics/test_robust.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/test_robust.c 2018-05-03 15:54:44.000000000 +0000 @@ -0,0 +1,267 @@ +/* statistics/test_robust.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +int test_robust (void); + +/* random vector in [-1,1] */ +static int +random_array(const size_t n, double * x, gsl_rng * r) +{ + size_t i; + + for (i = 0; i < n; ++i) + x[i] = 2.0 * gsl_rng_uniform(r) - 1.0; + + return 0; +} + +/* calculate MAD statistic for input vector using slow/naive algorithm */ +static double +slow_MAD(const size_t n, const double x[]) +{ + double *work = malloc(n * sizeof(double)); + double median, mad; + size_t i; + + for (i = 0; i < n; ++i) + work[i] = x[i]; + + gsl_sort(work, 1, n); + median = gsl_stats_median_from_sorted_data(work, 1, n); + + for (i = 0; i < n; ++i) + work[i] = fabs(x[i] - median); + + gsl_sort(work, 1, n); + mad = gsl_stats_median_from_sorted_data(work, 1, n); + + free(work); + + return mad; +} + +/* calculate S_n statistic for input vector using slow/naive algorithm */ +static double +slow_Sn0(const size_t n, const double x[]) +{ + double *work1 = malloc(n * sizeof(double)); + double *work2 = malloc(n * sizeof(double)); + double Sn; + size_t i, j; + + for (i = 0; i < n; ++i) + { + for (j = 0; j < n; ++j) + work1[j] = fabs(x[i] - x[j]); + + /* find himed_j | x_i - x_j | */ + gsl_sort(work1, 1, n); + work2[i] = work1[n / 2]; + } + + /* find lomed_i { himed_j | x_i - x_j | } */ + gsl_sort(work2, 1, n); + Sn = work2[(n + 1) / 2 - 1]; + + free(work1); + free(work2); + + return Sn; +} + +/* calculate Q_n statistic for input vector using slow/naive algorithm */ +static double +slow_Qn0(const size_t n, const double x[]) +{ + const size_t wsize = n * (n - 1) / 2; + const size_t n_2 = n / 2; + const size_t k = ((n_2 + 1) * n_2) / 2; + double *work; + double Qn; + size_t idx = 0; + size_t i, j; + + if (n < 2) + return (0.0); + + work = malloc(wsize * sizeof(double)); + + for (i = 0; i < n; ++i) + { + for (j = i + 1; j < n; ++j) + work[idx++] = fabs(x[i] - x[j]); + } + + gsl_sort(work, 1, idx); + Qn = work[k - 1]; + + free(work); + + return Qn; +} + +static int +test_median(const double tol, const size_t n, gsl_rng * r) +{ + double * x = malloc(n * sizeof(double)); + double median1, median2; + + random_array(n, x, r); + + median1 = gsl_stats_median(x, 1, n); + + gsl_sort(x, 1, n); + median2 = gsl_stats_median_from_sorted_data(x, 1, n); + + gsl_test_rel(median1, median2, tol, "test_median n=%zu", n); + + free(x); + + return 0; +} + +static int +test_mad(const double tol, const size_t n, gsl_rng * r) +{ + double * x = malloc(n * sizeof(double)); + double * work = malloc(n * sizeof(double)); + double mad1, mad2; + + random_array(n, x, r); + + mad1 = slow_MAD(n, x); + + gsl_sort(x, 1, n); + mad2 = gsl_stats_mad0(x, 1, n, work); + + gsl_test_rel(mad1, mad2, tol, "test_mad n=%zu", n); + + free(x); + free(work); + + return 0; +} + +static int +test_Sn(const double tol, const size_t n, gsl_rng * r) +{ + double * x = malloc(n * sizeof(double)); + double * work = malloc(n * sizeof(double)); + double Sn1, Sn2; + + random_array(n, x, r); + + /* compute S_n with slow/naive algorithm */ + Sn1 = slow_Sn0(n, x); + + /* compute S_n with efficient algorithm */ + gsl_sort(x, 1, n); + Sn2 = gsl_stats_Sn0_from_sorted_data(x, 1, n, work); + + gsl_test_rel(Sn2, Sn1, tol, "test_Sn n=%zu", n); + + free(x); + free(work); + + return 0; +} + +static int +test_Qn(const double tol, const size_t n, gsl_rng * r) +{ + double * x = malloc(n * sizeof(double)); + double * work = malloc(3 * n * sizeof(double)); + int * work_int = malloc(5 * n * sizeof(int)); + double Qn1, Qn2; + + random_array(n, x, r); + + /* compute Q_n with slow/naive algorithm */ + Qn1 = slow_Qn0(n, x); + + /* compute Q_n with efficient algorithm */ + gsl_sort(x, 1, n); + Qn2 = gsl_stats_Qn0_from_sorted_data(x, 1, n, work, work_int); + + gsl_test_rel(Qn2, Qn1, tol, "test_Qn n=%zu", n); + + free(x); + free(work); + free(work_int); + + return 0; +} + +int +test_robust (void) +{ + const double tol = 1.0e-12; + gsl_rng * r = gsl_rng_alloc(gsl_rng_default); + + test_median(GSL_DBL_EPSILON, 1, r); + test_median(GSL_DBL_EPSILON, 2, r); + test_median(GSL_DBL_EPSILON, 3, r); + test_median(GSL_DBL_EPSILON, 100, r); + test_median(GSL_DBL_EPSILON, 101, r); + test_median(GSL_DBL_EPSILON, 500, r); + test_median(GSL_DBL_EPSILON, 501, r); + + test_mad(GSL_DBL_EPSILON, 1, r); + test_mad(GSL_DBL_EPSILON, 2, r); + test_mad(GSL_DBL_EPSILON, 3, r); + test_mad(GSL_DBL_EPSILON, 100, r); + test_mad(GSL_DBL_EPSILON, 101, r); + test_mad(GSL_DBL_EPSILON, 500, r); + test_mad(GSL_DBL_EPSILON, 501, r); + + test_Sn(tol, 1, r); + test_Sn(tol, 2, r); + test_Sn(tol, 3, r); + test_Sn(tol, 100, r); + test_Sn(tol, 101, r); + test_Sn(tol, 500, r); + test_Sn(tol, 501, r); + + test_Qn(tol, 1, r); + test_Qn(tol, 2, r); + test_Qn(tol, 3, r); + test_Qn(tol, 4, r); + test_Qn(tol, 5, r); + test_Qn(tol, 100, r); + test_Qn(tol, 101, r); + test_Qn(tol, 500, r); + test_Qn(tol, 501, r); + + gsl_rng_free(r); + + return 0; +} diff -Nru gsl-2.4+dfsg/statistics/trmean.c gsl-2.5+dfsg/statistics/trmean.c --- gsl-2.4+dfsg/statistics/trmean.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/trmean.c 2018-05-02 20:45:21.000000000 +0000 @@ -0,0 +1,71 @@ +#include +#include +#include + +#define BASE_LONG_DOUBLE +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_LONG_DOUBLE + +#define BASE_DOUBLE +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_DOUBLE + +#define BASE_FLOAT +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_FLOAT + +#define BASE_ULONG +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_ULONG + +#define BASE_LONG +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_LONG + +#define BASE_UINT +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_UINT + +#define BASE_INT +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_INT + +#define BASE_USHORT +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_USHORT + +#define BASE_SHORT +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_SHORT + +#define BASE_UCHAR +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_UCHAR + +#define BASE_CHAR +#include "templates_on.h" +#include "trmean_source.c" +#include "templates_off.h" +#undef BASE_CHAR + + diff -Nru gsl-2.4+dfsg/statistics/trmean_source.c gsl-2.5+dfsg/statistics/trmean_source.c --- gsl-2.4+dfsg/statistics/trmean_source.c 1970-01-01 00:00:00.000000000 +0000 +++ gsl-2.5+dfsg/statistics/trmean_source.c 2018-06-13 19:33:38.000000000 +0000 @@ -0,0 +1,46 @@ +/* statistics/trmean_source.c + * + * Copyright (C) 2018 Patrick Alken + * + * 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 3 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. + */ + +double +FUNCTION (gsl_stats, trmean_from_sorted_data) (const double trim, const BASE sorted_data[], + const size_t stride, const size_t size) +{ + if (trim >= 0.5) + { + return FUNCTION(gsl_stats, median_from_sorted_data)(sorted_data, stride, size); + } + else + { + size_t ilow = (size_t) floor(trim * size); + size_t ihigh = size - ilow - 1; + double mean = 0.0; + double k = 0.0; + size_t i; + + /* compute mean of middle samples in [ilow,ihigh] */ + for (i = ilow; i <= ihigh; ++i) + { + double delta = sorted_data[i * stride] - mean; + k += 1.0; + mean += delta / k; + } + + return mean; + } +} diff -Nru gsl-2.4+dfsg/vector/Makefile.am gsl-2.5+dfsg/vector/Makefile.am --- gsl-2.4+dfsg/vector/Makefile.am 2015-11-03 16:21:55.000000000 +0000 +++ gsl-2.5+dfsg/vector/Makefile.am 2018-06-03 00:36:15.000000000 +0000 @@ -14,7 +14,7 @@ test_SOURCES = test.c test_static_SOURCES = test_static.c -CLEANFILES = test.txt test.dat +CLEANFILES = test.txt test.dat test_static.dat noinst_HEADERS = init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c oper_complex_source.c reim_source.c subvector_source.c view_source.c diff -Nru gsl-2.4+dfsg/vector/Makefile.in gsl-2.5+dfsg/vector/Makefile.in --- gsl-2.4+dfsg/vector/Makefile.in 2017-06-19 12:55:40.000000000 +0000 +++ gsl-2.5+dfsg/vector/Makefile.in 2018-06-13 20:31:04.000000000 +0000 @@ -533,7 +533,7 @@ test_static_LDADD = libgslvector.la ../block/libgslblock.la ../ieee-utils/libgslieeeutils.la ../err/libgslerr.la ../test/libgsltest.la ../sys/libgslsys.la ../utils/libutils.la test_SOURCES = test.c test_static_SOURCES = test_static.c -CLEANFILES = test.txt test.dat +CLEANFILES = test.txt test.dat test_static.dat noinst_HEADERS = init_source.c file_source.c copy_source.c swap_source.c prop_source.c test_complex_source.c test_source.c minmax_source.c oper_source.c oper_complex_source.c reim_source.c subvector_source.c view_source.c libgslvector_la_SOURCES = init.c file.c vector.c copy.c swap.c prop.c minmax.c oper.c reim.c subvector.c view.c view.h all: all-am diff -Nru gsl-2.4+dfsg/vector/test_complex_source.c gsl-2.5+dfsg/vector/test_complex_source.c --- gsl-2.4+dfsg/vector/test_complex_source.c 2017-06-14 14:01:42.000000000 +0000 +++ gsl-2.5+dfsg/vector/test_complex_source.c 2017-07-23 14:03:11.000000000 +0000 @@ -635,41 +635,51 @@ { TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); - size_t i; - FILE *f = tmpfile(); - - /* write file */ - - for (i = 0; i < N; i++) - { - BASE x = ZERO; - GSL_REAL (x) = (ATOMIC)(N - i); - GSL_IMAG (x) = (ATOMIC)(N - i + 1); - FUNCTION (gsl_vector, set) (v, i, x); - }; - - FUNCTION (gsl_vector, fwrite) (f, v); - - /* read file */ +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif - rewind(f); - FUNCTION (gsl_vector, fread) (f, w); + { + /* write file */ + FILE *f = fopen(filename, "wb"); + + for (i = 0; i < N; i++) + { + BASE x = ZERO; + GSL_REAL (x) = (ATOMIC)(N - i); + GSL_IMAG (x) = (ATOMIC)(N - i + 1); + FUNCTION (gsl_vector, set) (v, i, x); + }; + + FUNCTION (gsl_vector, fwrite) (f, v); + + fclose(f); + } + + { + /* read file */ + FILE *f = fopen(filename, "rb"); + + FUNCTION (gsl_vector, fread) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i * stride] != (ATOMIC) (N - i) || w->data[2 * i * stride + 1] != (ATOMIC) (N - i + 1)) + status = 1; + }; - status = 0; - for (i = 0; i < N; i++) - { - if (w->data[2 * i * stride] != (ATOMIC) (N - i) || w->data[2 * i * stride + 1] != (ATOMIC) (N - i + 1)) - status = 1; - }; + gsl_test (status, NAME (gsl_vector) "_write and read work"); - fclose (f); + fclose (f); + } FUNCTION (gsl_vector, free) (v); FUNCTION (gsl_vector, free) (w); - - gsl_test (status, NAME (gsl_vector) "_write and read work"); } #if USES_LONGDOUBLE && ! HAVE_PRINTF_LONGDOUBLE @@ -680,41 +690,51 @@ { TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); - size_t i; - FILE *f = tmpfile(); - - /* write file */ - - for (i = 0; i < N; i++) - { - BASE x; - GSL_REAL (x) = (ATOMIC)i; - GSL_IMAG (x) = (ATOMIC)(i + 1); - FUNCTION (gsl_vector, set) (v, i, x); - }; - - FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); - - /* read file */ +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif - rewind(f); - FUNCTION (gsl_vector, fscanf) (f, w); + { + /* write file */ + FILE *f = fopen(filename, "w"); + + for (i = 0; i < N; i++) + { + BASE x; + GSL_REAL (x) = (ATOMIC)i; + GSL_IMAG (x) = (ATOMIC)(i + 1); + FUNCTION (gsl_vector, set) (v, i, x); + }; + + FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); + + fclose(f); + } + + { + /* read file */ + FILE *f = fopen(filename, "r"); + + FUNCTION (gsl_vector, fscanf) (f, w); + + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[2 * i * stride] != (ATOMIC) i || w->data[2 * i * stride + 1] != (ATOMIC) (i + 1)) + status = 1; + }; - status = 0; - for (i = 0; i < N; i++) - { - if (w->data[2 * i * stride] != (ATOMIC) i || w->data[2 * i * stride + 1] != (ATOMIC) (i + 1)) - status = 1; - }; + gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); - fclose (f); + fclose (f); + } FUNCTION (gsl_vector, free) (v); FUNCTION (gsl_vector, free) (w); - - gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); } #endif diff -Nru gsl-2.4+dfsg/vector/test_source.c gsl-2.5+dfsg/vector/test_source.c --- gsl-2.4+dfsg/vector/test_source.c 2017-06-14 13:59:49.000000000 +0000 +++ gsl-2.5+dfsg/vector/test_source.c 2017-07-23 14:03:11.000000000 +0000 @@ -715,35 +715,45 @@ { TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); - size_t i; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif + + { + /* write file */ + FILE *f = fopen(filename, "wb"); - /* write file */ + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (N - i)); + }; - for (i = 0; i < N; i++) - { - FUNCTION (gsl_vector, set) (v, i, (ATOMIC) (N - i)); - }; + FUNCTION (gsl_vector, fwrite) (f, v); - FUNCTION (gsl_vector, fwrite) (f, v); + fclose(f); + } - /* read file */ + { + /* read file */ + FILE *f = fopen(filename, "rb"); - rewind(f); - FUNCTION (gsl_vector, fread) (f, w); + FUNCTION (gsl_vector, fread) (f, w); - status = 0; - for (i = 0; i < N; i++) - { - if (w->data[i*stride] != (ATOMIC) (N - i)) - status = 1; - }; + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[i*stride] != (ATOMIC) (N - i)) + status = 1; + }; - TEST (status, "_write and read"); + TEST (status, "_write and read"); - fclose(f); + fclose(f); + } FUNCTION (gsl_vector, free) (v); /* free whatever is in v */ FUNCTION (gsl_vector, free) (w); /* free whatever is in w */ @@ -757,35 +767,45 @@ { TYPE (gsl_vector) * v = FUNCTION (create, vector) (stride, N); TYPE (gsl_vector) * w = FUNCTION (create, vector) (stride, N); - size_t i; - FILE *f = tmpfile(); +#ifdef NO_INLINE + char filename[] = "test_static.dat"; +#else + char filename[] = "test.dat"; +#endif + + { + /* write file */ + FILE *f = fopen(filename, "w"); - /* write file */ + for (i = 0; i < N; i++) + { + FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); + }; - for (i = 0; i < N; i++) - { - FUNCTION (gsl_vector, set) (v, i, (ATOMIC) i); - }; + FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); - FUNCTION (gsl_vector, fprintf) (f, v, OUT_FORMAT); + fclose(f); + } - /* read file */ + { + /* read file */ + FILE *f = fopen(filename, "r"); - rewind(f); - FUNCTION (gsl_vector, fscanf) (f, w); + FUNCTION (gsl_vector, fscanf) (f, w); - status = 0; - for (i = 0; i < N; i++) - { - if (w->data[i*stride] != (ATOMIC) i) - status = 1; - }; + status = 0; + for (i = 0; i < N; i++) + { + if (w->data[i*stride] != (ATOMIC) i) + status = 1; + }; - gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); + gsl_test (status, NAME (gsl_vector) "_fprintf and fscanf"); - fclose (f); + fclose (f); + } FUNCTION (gsl_vector, free) (v); FUNCTION (gsl_vector, free) (w);