Adding upstream version 1.9.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ddf4b25f8f
commit
49fcf7364a
88 changed files with 62468 additions and 0 deletions
22
nist/Makefile.am
Normal file
22
nist/Makefile.am
Normal file
|
@ -0,0 +1,22 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
|
||||
if ENABLE_NIST_TEST
|
||||
check_PROGRAMS = nist
|
||||
endif
|
||||
|
||||
AM_CFLAGS=-Wall
|
||||
|
||||
nist_LDADD = -lm
|
||||
|
||||
nist_SOURCES = cephes.c dfft.c matrix.c nist.c packtest.c special-functions.c cephes-protos.h matrix.h mconf.h special-functions.h nist.h
|
||||
|
||||
CLEANFILES = sample nist.out
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
if ENABLE_NIST_TEST
|
||||
check-local:
|
||||
../src/haveged -n 16M $*
|
||||
./nist sample ${srcdir}
|
||||
endif
|
576
nist/Makefile.in
Normal file
576
nist/Makefile.in
Normal file
|
@ -0,0 +1,576 @@
|
|||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 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 = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
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@
|
||||
@ENABLE_NIST_TEST_TRUE@check_PROGRAMS = nist$(EXEEXT)
|
||||
subdir = nist
|
||||
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)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am_nist_OBJECTS = cephes.$(OBJEXT) dfft.$(OBJEXT) matrix.$(OBJEXT) \
|
||||
nist.$(OBJEXT) packtest.$(OBJEXT) special-functions.$(OBJEXT)
|
||||
nist_OBJECTS = $(am_nist_OBJECTS)
|
||||
nist_DEPENDENCIES =
|
||||
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_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 =
|
||||
am__maybe_remake_depfiles =
|
||||
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 = $(nist_SOURCES)
|
||||
DIST_SOURCES = $(nist_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
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__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
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@
|
||||
HAVEGE_LT_VERSION = @HAVEGE_LT_VERSION@
|
||||
HA_DISTRO = @HA_DISTRO@
|
||||
HA_LDFLAGS = @HA_LDFLAGS@
|
||||
HA_UNITD = @HA_UNITD@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
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__leading_dot = @am__leading_dot@
|
||||
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@
|
||||
AM_CFLAGS = -Wall
|
||||
nist_LDADD = -lm
|
||||
nist_SOURCES = cephes.c dfft.c matrix.c nist.c packtest.c special-functions.c cephes-protos.h matrix.h mconf.h special-functions.h nist.h
|
||||
CLEANFILES = sample nist.out
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(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 --ignore-deps nist/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps nist/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__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
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
|
||||
|
||||
nist$(EXEEXT): $(nist_OBJECTS) $(nist_DEPENDENCIES) $(EXTRA_nist_DEPENDENCIES)
|
||||
@rm -f nist$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(nist_OBJECTS) $(nist_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.c.o:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
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
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(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
|
||||
@ENABLE_NIST_TEST_FALSE@check-local:
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-local
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
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:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
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."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-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-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 -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:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool 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-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 \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
@ENABLE_NIST_TEST_TRUE@check-local:
|
||||
@ENABLE_NIST_TEST_TRUE@ ../src/haveged -n 16M $*
|
||||
@ENABLE_NIST_TEST_TRUE@ ./nist sample ${srcdir}
|
||||
|
||||
# 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:
|
180
nist/cephes-protos.h
Normal file
180
nist/cephes-protos.h
Normal file
|
@ -0,0 +1,180 @@
|
|||
/*
|
||||
* This file was automatically generated by version 1.7 of cextract.
|
||||
* Manual editing not recommended.
|
||||
*
|
||||
* Created: Fri Mar 31 19:17:33 1995
|
||||
*/
|
||||
extern double acosh ( double x );
|
||||
extern int airy ( double x, double *ai, double *aip, double *bi, double *bip );
|
||||
extern double asin ( double x );
|
||||
extern double acos ( double x );
|
||||
extern double asinh ( double x );
|
||||
extern double atan ( double x );
|
||||
extern double atan2 ( double y, double x );
|
||||
extern double atanh ( double x );
|
||||
extern double bdtrc ( int k, int n, double p );
|
||||
extern double bdtr ( int k, int n, double p );
|
||||
extern double bdtri ( int k, int n, double y );
|
||||
extern double beta ( double a, double b );
|
||||
extern double lbeta ( double a, double b );
|
||||
extern double btdtr ( double a, double b, double x );
|
||||
extern double cbrt ( double x );
|
||||
extern double chbevl ( double x, void *P, int n );
|
||||
extern double chdtrc ( double df, double x );
|
||||
extern double chdtr ( double df, double x );
|
||||
extern double chdtri ( double df, double y );
|
||||
// extern void clog ( cmplx *z, cmplx *w );
|
||||
extern void _cexp ( cmplx *z, cmplx *w );
|
||||
extern void _csin ( cmplx *z, cmplx *w );
|
||||
extern void _ccos ( cmplx *z, cmplx *w );
|
||||
extern void _ctan ( cmplx *z, cmplx *w );
|
||||
extern void _ccot ( cmplx *z, cmplx *w );
|
||||
extern void _casin ( cmplx *z, cmplx *w );
|
||||
extern void _cacos ( cmplx *z, cmplx *w );
|
||||
extern void _catan ( cmplx *z, cmplx *w );
|
||||
extern void cadd ( cmplx *a, cmplx *b, cmplx *c );
|
||||
extern void csub ( cmplx *a, cmplx *b, cmplx *c );
|
||||
extern void cmul ( cmplx *a, cmplx *b, cmplx *c );
|
||||
extern void cdiv ( cmplx *a, cmplx *b, cmplx *c );
|
||||
extern void cmov ( void *a, void *b );
|
||||
extern void cneg ( cmplx *a );
|
||||
//extern double _cabs ( cmplx *z );
|
||||
extern void _csqrt ( cmplx *z, cmplx *w );
|
||||
extern double hypot ( double x, double y );
|
||||
extern double cosh ( double x );
|
||||
extern double dawsn ( double xx );
|
||||
extern void eigens ( double A[], double RR[], double E[], int N );
|
||||
extern double ellie ( double phi, double m );
|
||||
extern double ellik ( double phi, double m );
|
||||
extern double ellpe ( double x );
|
||||
extern int ellpj ( double u, double m, double *sn, double *cn, double *dn, double *ph );
|
||||
extern double ellpk ( double x );
|
||||
extern double exp ( double x );
|
||||
extern double exp10 ( double x );
|
||||
extern double exp1m ( double x );
|
||||
extern double exp2 ( double x );
|
||||
extern double expn ( int n, double x );
|
||||
extern double fabs ( double x );
|
||||
extern double fac ( int i );
|
||||
extern double fdtrc ( int ia, int ib, double x );
|
||||
extern double fdtr ( int ia, int ib, double x );
|
||||
extern double fdtri ( int ia, int ib, double y );
|
||||
extern int fftr ( double x[], int m0, double sine[] );
|
||||
extern double ceil ( double x );
|
||||
extern double floor ( double x );
|
||||
extern double frexp ( double x, int *pw2 );
|
||||
extern double ldexp ( double x, int pw2 );
|
||||
extern int _signbit ( double x );
|
||||
/* extern int isnan ( double x ); */
|
||||
/*extern int isfinite ( double x );*/
|
||||
extern int fresnl ( double xxa, double *ssa, double *cca );
|
||||
extern double gamma ( double x );
|
||||
extern double lgam ( double x );
|
||||
extern double gdtr ( double a, double b, double x );
|
||||
extern double gdtrc ( double a, double b, double x );
|
||||
extern int gels ( double A[], double R[], int M, double EPS, double AUX[] );
|
||||
extern double hyp2f1 ( double a, double b, double c, double x );
|
||||
extern double hyperg ( double a, double b, double x );
|
||||
extern double hyp2f0 ( double a, double b, double x, int type, double *err );
|
||||
extern double i0 ( double x );
|
||||
extern double i0e ( double x );
|
||||
extern double i1 ( double x );
|
||||
extern double i1e ( double x );
|
||||
extern double igamc ( double a, double x );
|
||||
extern double igam ( double a, double x );
|
||||
extern double igami ( double a, double y0 );
|
||||
extern double incbet ( double aa, double bb, double xx );
|
||||
extern double incbi ( double aa, double bb, double yy0 );
|
||||
extern double iv ( double v, double x );
|
||||
extern double j0 ( double x );
|
||||
extern double y0 ( double x );
|
||||
extern double j1 ( double x );
|
||||
extern double y1 ( double x );
|
||||
extern double jn ( int n, double x );
|
||||
extern double jv ( double n, double x );
|
||||
extern double k0 ( double x );
|
||||
extern double k0e ( double x );
|
||||
extern double k1 ( double x );
|
||||
extern double k1e ( double x );
|
||||
extern double kn ( int nn, double x );
|
||||
extern int levnsn ( int n, double r[], double a[], double e[], double refl[] );
|
||||
extern double log ( double x );
|
||||
extern double log10 ( double x );
|
||||
extern double _log2 ( double x );
|
||||
extern long lrand ( void );
|
||||
extern long lsqrt ( long x );
|
||||
extern int minv ( double A[], double X[], int n, double B[], int IPS[] );
|
||||
extern int mmmpy ( int r, int c, double *A, double *B, double *Y );
|
||||
extern int mtherr ( char *name, int code );
|
||||
/*extern double polevl ( double x, void *P, int N );
|
||||
extern double p1evl ( double x, void *P, int N );*/
|
||||
extern int mtransp ( int n, double *A, double *T );
|
||||
extern int mvmpy ( int r, int c, double *A, double *V, double *Y );
|
||||
extern double nbdtrc ( int k, int n, double p );
|
||||
extern double nbdtr ( int k, int n, double p );
|
||||
extern double nbdtri ( int k, int n, double p );
|
||||
extern double ndtr ( double a );
|
||||
extern double erfc ( double a );
|
||||
extern double erf ( double x );
|
||||
extern double ndtri ( double y0 );
|
||||
extern double pdtrc ( int k, double m );
|
||||
extern double pdtr ( int k, double m );
|
||||
extern double pdtri ( int k, double y );
|
||||
extern double pow ( double x, double y );
|
||||
extern double powi ( double x, int nn );
|
||||
extern double psi ( double x );
|
||||
extern void revers ( double y[], double x[], int n );
|
||||
extern double rgamma ( double x );
|
||||
extern double round ( double x );
|
||||
extern int sprec ( void );
|
||||
extern int dprec ( void );
|
||||
extern int ldprec ( void );
|
||||
extern int shichi ( double x, double *si, double *ci );
|
||||
extern int sici ( double x, double *si, double *ci );
|
||||
extern double simpsn ( double f[], double delta );
|
||||
extern int simq ( double A[], double B[], double X[], int n, int flag, int IPS[] );
|
||||
extern double sin ( double x );
|
||||
extern double cos ( double x );
|
||||
extern double radian ( double d, double m, double s );
|
||||
/*
|
||||
extern int sincos ( double x, double *s, double *c, int flg );
|
||||
*/
|
||||
extern double sindg ( double x );
|
||||
extern double cosdg ( double x );
|
||||
extern double sinh ( double x );
|
||||
extern double spence ( double x );
|
||||
extern double sqrt ( double x );
|
||||
extern double stdtr ( int k, double t );
|
||||
extern double stdtri ( int k, double p );
|
||||
extern double onef2 ( double a, double b, double c, double x, double *err );
|
||||
extern double threef0 ( double a, double b, double c, double x, double *err );
|
||||
extern double struve ( double v, double x );
|
||||
extern double tan ( double x );
|
||||
extern double cot ( double x );
|
||||
extern double tandg ( double x );
|
||||
extern double cotdg ( double x );
|
||||
extern double tanh ( double x );
|
||||
extern double log1p ( double x );
|
||||
extern double expm1 ( double x );
|
||||
extern double cosm1 ( double x );
|
||||
extern double yn ( int n, double x );
|
||||
extern double zeta ( double x, double q );
|
||||
extern double zetac ( double x );
|
||||
extern int drand ( double *a );
|
||||
|
||||
/* polyn.c */
|
||||
extern void polini ( int maxdeg );
|
||||
extern void polprt ( double a[], int na, int d );
|
||||
extern void polclr ( double *a, int n );
|
||||
extern void polmov ( double *a, int na, double *b );
|
||||
extern void polmul ( double a[], int na, double b[], int nb, double c[] );
|
||||
extern void poladd ( double a[], int na, double b[], int nb, double c[] );
|
||||
extern void polsub ( double a[], int na, double b[], int nb, double c[] );
|
||||
extern int poldiv ( double a[], int na, double b[], int nb, double c[] );
|
||||
extern void polsbt ( double a[], int na, double b[], int nb, double c[] );
|
||||
extern double poleva ( double a[], int na, double x );
|
||||
/* polmisc.c */
|
||||
extern void polatn ( double num[], double den[], double ans[], int nn );
|
||||
extern void polsqt ( double pol[], double ans[], int nn );
|
||||
extern void polsin ( double x[], double y[], int nn );
|
||||
extern void polcos ( double x[], double y[], int nn );
|
1327
nist/cephes.c
Normal file
1327
nist/cephes.c
Normal file
File diff suppressed because it is too large
Load diff
1381
nist/dfft.c
Normal file
1381
nist/dfft.c
Normal file
File diff suppressed because it is too large
Load diff
168
nist/matrix.c
Normal file
168
nist/matrix.c
Normal file
|
@ -0,0 +1,168 @@
|
|||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
/*#include "defs.h"
|
||||
#include "proto.h"*/
|
||||
#define MIN(x,y) ((x) > (y) ? (y) : (x))
|
||||
|
||||
#include "matrix.h"
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
R A N K A L G O R I T H M R O U T I N E S
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
int computeRank(int M, int Q, BitField** matrix)
|
||||
{
|
||||
int i;
|
||||
int rank;
|
||||
int m = MIN(M,Q);
|
||||
|
||||
/* FORWARD APPLICATION OF ELEMENTARY ROW OPERATIONS */
|
||||
|
||||
for(i = 0; i < m-1; i++) {
|
||||
if (matrix[i][i].b == 1)
|
||||
perform_elementary_row_operations(0, i, M, Q, matrix);
|
||||
else { /* matrix[i][i] = 0 */
|
||||
if (find_unit_element_and_swap(0, i, M, Q, matrix) == 1)
|
||||
perform_elementary_row_operations(0, i, M, Q, matrix);
|
||||
}
|
||||
}
|
||||
|
||||
/* BACKWARD APPLICATION OF ELEMENTARY ROW OPERATIONS */
|
||||
for(i = m-1; i > 0; i--) {
|
||||
if (matrix[i][i].b == 1)
|
||||
perform_elementary_row_operations(1, i, M, Q, matrix);
|
||||
else { /* matrix[i][i] = 0 */
|
||||
if (find_unit_element_and_swap(1, i, M, Q, matrix) == 1)
|
||||
perform_elementary_row_operations(1, i, M, Q, matrix);
|
||||
}
|
||||
}
|
||||
rank = determine_rank(m,M,Q,matrix);
|
||||
|
||||
return rank;
|
||||
}
|
||||
|
||||
void perform_elementary_row_operations(int flag, int i, int M, int Q,
|
||||
BitField** A)
|
||||
{
|
||||
int j,k;
|
||||
|
||||
switch(flag)
|
||||
{
|
||||
case 0: for(j = i+1; j < M; j++)
|
||||
if (A[j][i].b == 1)
|
||||
for(k = i; k < Q; k++)
|
||||
A[j][k].b = (A[j][k].b + A[i][k].b) % 2;
|
||||
break;
|
||||
|
||||
case 1: for(j = i-1; j >= 0; j--)
|
||||
if (A[j][i].b == 1)
|
||||
for(k = 0; k < Q; k++)
|
||||
A[j][k].b = (A[j][k].b + A[i][k].b) % 2;
|
||||
break;
|
||||
default: fprintf(stderr,"ERROR IN CALL TO perform_elementary_row_operations\n");
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int find_unit_element_and_swap(int flag, int i, int M, int Q, BitField** A)
|
||||
{
|
||||
int index;
|
||||
int row_op = 0;
|
||||
|
||||
switch(flag)
|
||||
{
|
||||
case 0: index = i+1;
|
||||
while ((index < M) && (A[index][i].b == 0))
|
||||
index++;
|
||||
if (index < M)
|
||||
row_op = swap_rows(i,index,Q,A);
|
||||
break;
|
||||
case 1:
|
||||
index = i-1;
|
||||
while ((index >= 0) && (A[index][i].b == 0))
|
||||
index--;
|
||||
if (index >= 0)
|
||||
row_op = swap_rows(i,index,Q,A);
|
||||
break;
|
||||
default: fprintf(stderr,"ERROW IN CALL TO find_unit_element_and_swap\n");
|
||||
break;
|
||||
}
|
||||
return row_op;
|
||||
}
|
||||
|
||||
int swap_rows(int i, int index, int Q, BitField** A)
|
||||
{
|
||||
int p;
|
||||
BitField temp;
|
||||
|
||||
for(p = 0; p < Q; p++) {
|
||||
temp.b = A[i][p].b;
|
||||
A[i][p].b = A[index][p].b;
|
||||
A[index][p].b = temp.b;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int determine_rank(int m, int M, int Q, BitField** A)
|
||||
{
|
||||
int i, j, rank, allZeroes;
|
||||
|
||||
/* DETERMINE RANK, THAT IS, COUNT THE NUMBER OF NONZERO ROWS */
|
||||
|
||||
rank = m;
|
||||
for(i = 0; i < M; i++) {
|
||||
allZeroes = 1;
|
||||
for(j=0; j < Q; j++) {
|
||||
if (A[i][j].b == 1) {
|
||||
allZeroes = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (allZeroes == 1) rank--;
|
||||
}
|
||||
return rank;
|
||||
}
|
||||
|
||||
|
||||
void display_matrix(int M, int Q, BitField** m)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (i = 0; i < M; i++) {
|
||||
for (j = 0; j < Q; j++)
|
||||
fprintf(stderr,"%d ", m[i][j].b);
|
||||
fprintf(stderr,"\n");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void def_matrix(int M, int Q, BitField** m,int k, int *pt, int *PT, int*DATA, int *ARRAY)
|
||||
{
|
||||
int i,j;
|
||||
for (i = 0; i < M; i++)
|
||||
for (j = 0; j < Q; j++) {
|
||||
m[i][j].b = *DATA & 1;
|
||||
(*PT)++;
|
||||
if ((*PT) == 32)
|
||||
{
|
||||
*PT = 0;
|
||||
(*pt)++;
|
||||
*DATA = ARRAY[*pt];
|
||||
}
|
||||
else
|
||||
*DATA = (*DATA) >> 1;
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void delete_matrix(int M, BitField** matrix)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < M; i++)
|
||||
free(matrix[i]);
|
||||
free(matrix);
|
||||
}
|
19
nist/matrix.h
Normal file
19
nist/matrix.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
R A N K A L G O R I T H M F U N C T I O N P R O T O T Y P E S
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
struct bit {
|
||||
unsigned char b:1;
|
||||
};
|
||||
typedef struct bit BitField;
|
||||
|
||||
|
||||
void perform_elementary_row_operations(int,int,int,int,BitField**);
|
||||
int find_unit_element_and_swap(int,int,int,int, BitField**);
|
||||
int swap_rows(int, int, int, BitField**);
|
||||
int determine_rank(int, int, int, BitField**);
|
||||
int computeRank(int,int,BitField**);
|
||||
void define_matrix(int,int,int,BitField**);
|
||||
BitField** create_matrix(int, int);
|
||||
void display_matrix(int, int, BitField**);
|
||||
void def_matrix(int M, int Q, BitField** m,int k, int *pt, int *PT, int*DATA, int *ARRAY);
|
||||
void delete_matrix(int, BitField**);
|
169
nist/mconf.h
Normal file
169
nist/mconf.h
Normal file
|
@ -0,0 +1,169 @@
|
|||
/* mconf.h
|
||||
*
|
||||
* Common include file for math routines
|
||||
*
|
||||
*
|
||||
*
|
||||
* SYNOPSIS:
|
||||
*
|
||||
* #include "mconf.h"
|
||||
*
|
||||
*
|
||||
*
|
||||
* DESCRIPTION:
|
||||
*
|
||||
* This file contains definitions for error codes that are
|
||||
* passed to the common error handling routine mtherr()
|
||||
* (which see).
|
||||
*
|
||||
* The file also includes a conditional assembly definition
|
||||
* for the type of computer arithmetic (IEEE, DEC, Motorola
|
||||
* IEEE, or UNKnown).
|
||||
*
|
||||
* For Digital Equipment PDP-11 and VAX computers, certain
|
||||
* IBM systems, and others that use numbers with a 56-bit
|
||||
* significand, the symbol DEC should be defined. In this
|
||||
* mode, most floating point constants are given as arrays
|
||||
* of octal integers to eliminate decimal to binary conversion
|
||||
* errors that might be introduced by the compiler.
|
||||
*
|
||||
* For little-endian computers, such as IBM PC, that follow the
|
||||
* IEEE Standard for Binary Floating Point Arithmetic (ANSI/IEEE
|
||||
* Std 754-1985), the symbol IBMPC should be defined. These
|
||||
* numbers have 53-bit significands. In this mode, constants
|
||||
* are provided as arrays of hexadecimal 16 bit integers.
|
||||
*
|
||||
* Big-endian IEEE format is denoted MIEEE. On some RISC
|
||||
* systems such as Sun SPARC, double precision constants
|
||||
* must be stored on 8-byte address boundaries. Since integer
|
||||
* arrays may be aligned differently, the MIEEE configuration
|
||||
* may fail on such machines.
|
||||
*
|
||||
* To accommodate other types of computer arithmetic, all
|
||||
* constants are also provided in a normal decimal radix
|
||||
* which one can hope are correctly converted to a suitable
|
||||
* format by the available C language compiler. To invoke
|
||||
* this mode, define the symbol UNK.
|
||||
*
|
||||
* An important difference among these modes is a predefined
|
||||
* set of machine arithmetic constants for each. The numbers
|
||||
* MACHEP (the machine roundoff error), MAXNUM (largest number
|
||||
* represented), and several other parameters are preset by
|
||||
* the configuration symbol. Check the file const.c to
|
||||
* ensure that these values are correct for your computer.
|
||||
*
|
||||
* Configurations NANS, INFINITIES, MINUSZERO, and DENORMAL
|
||||
* may fail on many systems. Verify that they are supposed
|
||||
* to work on your computer.
|
||||
*/
|
||||
|
||||
/*
|
||||
Cephes Math Library Release 2.3: June, 1995
|
||||
Copyright 1984, 1987, 1989, 1995 by Stephen L. Moshier
|
||||
*/
|
||||
|
||||
|
||||
/* Constant definitions for math error conditions
|
||||
*/
|
||||
#ifndef DOMAIN
|
||||
#define DOMAIN 1 /* argument domain error */
|
||||
#define SING 2 /* argument singularity */
|
||||
#define OVERFLOW 3 /* overflow range error */
|
||||
#define UNDERFLOW 4 /* underflow range error */
|
||||
#define TLOSS 5 /* total loss of precision */
|
||||
#define PLOSS 6 /* partial loss of precision */
|
||||
|
||||
#define EDOM 33
|
||||
#define ERANGE 34
|
||||
#endif
|
||||
|
||||
/* Complex numeral. */
|
||||
typedef struct
|
||||
{
|
||||
double r;
|
||||
double i;
|
||||
} cmplx;
|
||||
|
||||
/* Long double complex numeral. */
|
||||
/*
|
||||
typedef struct
|
||||
{
|
||||
long double r;
|
||||
long double i;
|
||||
} cmplxl;
|
||||
*/
|
||||
|
||||
/* Type of computer arithmetic */
|
||||
|
||||
/* PDP-11, Pro350, VAX:
|
||||
*/
|
||||
/* #define DEC 1 */
|
||||
|
||||
/* Intel IEEE, low order words come first:
|
||||
*/
|
||||
/*#define IBMPC 1 */
|
||||
|
||||
/* Motorola IEEE, high order words come first
|
||||
* (Sun 680x0 workstation):
|
||||
*/
|
||||
/* #define MIEEE 1 */
|
||||
|
||||
/* UNKnown arithmetic, invokes coefficients given in
|
||||
* normal decimal format. Beware of range boundary
|
||||
* problems (MACHEP, MAXLOG, etc. in const.c) and
|
||||
* roundoff problems in pow.c:
|
||||
* (Sun SPARCstation)
|
||||
*/
|
||||
#define UNK 1
|
||||
|
||||
/* If you define UNK, then be sure to set BIGENDIAN properly. */
|
||||
#define BIGENDIAN 0
|
||||
|
||||
/* Define this `volatile' if your compiler thinks
|
||||
* that floating point arithmetic obeys the associative
|
||||
* and distributive laws. It will defeat some optimizations
|
||||
* (but probably not enough of them).
|
||||
*
|
||||
* #define VOLATILE volatile
|
||||
*/
|
||||
#define VOLATILE
|
||||
|
||||
/* For 12-byte long doubles on an i386, pad a 16-bit short 0
|
||||
* to the end of real constants initialized by integer arrays.
|
||||
*
|
||||
* #define XPD 0,
|
||||
*
|
||||
* Otherwise, the type is 10 bytes long and XPD should be
|
||||
* defined blank (e.g., Microsoft C).
|
||||
*
|
||||
* #define XPD
|
||||
*/
|
||||
#define XPD 0,
|
||||
|
||||
/* Define to support tiny denormal numbers, else undefine. */
|
||||
#define DENORMAL 1
|
||||
|
||||
/* Define to ask for infinity support, else undefine. */
|
||||
/* #define INFINITIES 1 */
|
||||
|
||||
/* Define to ask for support of numbers that are Not-a-Number,
|
||||
else undefine. This may automatically define INFINITIES in some files. */
|
||||
/* #define NANS 1 */
|
||||
|
||||
/* Define to distinguish between -0.0 and +0.0. */
|
||||
/* #define MINUSZERO 1 */
|
||||
|
||||
/* Define 1 for ANSI C atan2() function
|
||||
See atan.c and clog.c. */
|
||||
#define ANSIC 1
|
||||
|
||||
/* Get ANSI function prototypes, if you want them. */
|
||||
#ifdef __STDC__
|
||||
#define ANSIPROT
|
||||
#include "cephes-protos.h"
|
||||
#else
|
||||
int mtherr();
|
||||
#endif
|
||||
|
||||
/* Variable for error reporting. See mtherr.c. */
|
||||
extern int merror;
|
57
nist/nist.c
Normal file
57
nist/nist.c
Normal file
|
@ -0,0 +1,57 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "nist.h"
|
||||
|
||||
#define _32MB (32 * 1024 * 1024)
|
||||
#define _08MB (8 * 1024 * 1024)
|
||||
#define _04MB (4 * 1024 * 1024)
|
||||
#define _02MB (2 * 1024 * 1024)
|
||||
|
||||
|
||||
static int random_pool1 [_32MB];
|
||||
char basedirname[FILENAME_MAX+1];
|
||||
|
||||
char *GetBaseDir(void)
|
||||
{
|
||||
return basedirname;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *filename = "";
|
||||
FILE *fp = stdin;
|
||||
long result=0;
|
||||
|
||||
if (argc<2 || argc>3) {
|
||||
printf("Usage sts <file> [<template directory>]\n");
|
||||
return 1;
|
||||
}
|
||||
/**
|
||||
* get optional directory name
|
||||
*/
|
||||
basedirname[0] = 0;
|
||||
if (argc>2) {
|
||||
strcat(basedirname, argv[2]);
|
||||
strcat(basedirname, "/");
|
||||
}
|
||||
|
||||
filename = argv[1];
|
||||
if ((fp = fopen(filename, "rb")) == NULL) {
|
||||
printf("Cannot open file %s\n", filename);
|
||||
return 2;
|
||||
}
|
||||
result = fread(random_pool1,sizeof(int),_04MB,fp);
|
||||
fclose(fp);
|
||||
if (result!=_04MB) {
|
||||
printf("16MB sample required %ld != %d\n",result, _04MB);
|
||||
return 3;
|
||||
}
|
||||
if (PackTestF (random_pool1, _04MB, "nist.out") < 8) {
|
||||
if (PackTestL (random_pool1, _04MB, "nist.out") < 8)
|
||||
return 0;
|
||||
return 5;
|
||||
}
|
||||
return 4;
|
||||
}
|
33
nist/nist.h
Normal file
33
nist/nist.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Supply function prototypes for the test suite.
|
||||
*/
|
||||
int PackTestF (int *ARRAY, int ArraySize, char *C);
|
||||
int PackTestL (int *ARRAY, int ArraySize, char *C);
|
||||
|
||||
int ApproximateEntropy (int mmin, int mmax, int n, int *ARRAY);
|
||||
int BlockFrequency (int ArraySize, int m, int *ARRAY);
|
||||
int CumulativeSums (int n, int *ARRAY);
|
||||
int DiscreteFourierTransform (int N, int *ARRAY);
|
||||
int Frequency (int n, int *ARRAY);
|
||||
int LempelZivCompression (int n, int *ARRAY, int *DATA, int *pt, int *PT);
|
||||
int LinearComplexity (int M, int N, int *ARRAY, int PT);
|
||||
int LongestRunOfOnes (int n, int *ARRAY);
|
||||
int NonOverlappingTemplateMatchings (int m, int n, int *ARRAY);
|
||||
int OverlappingTemplateMatchings (int m, int n, int *ARRAY);
|
||||
int RandomExcursions (int n, int *ARRAY);
|
||||
int RandomExcursionsVariant (int n, int *ARRAY);
|
||||
int Rank (int n, int *ARRAY);
|
||||
int Runs (int n, int *ARRAY);
|
||||
int Serial (int m, int n, int *ARRAY, int PT);
|
||||
int UNIVERSAL (int n, int *ARRAY);
|
||||
int Universal (int n, int *ARRAY);
|
||||
|
||||
double psi2 (int m, int n, int *ARRAY, int PT);
|
||||
/**
|
||||
* From dfft.c
|
||||
*/
|
||||
void __ogg_fdrffti(int n, double *wsave, int *ifac);
|
||||
void __ogg_fdrfftf(int n,double *r,double *wsave,int *ifac);
|
||||
|
||||
char *GetBaseDir(void);
|
||||
|
2252
nist/packtest.c
Normal file
2252
nist/packtest.c
Normal file
File diff suppressed because it is too large
Load diff
32
nist/special-functions.c
Normal file
32
nist/special-functions.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
S P E C I A L F U N C T I O N S
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
#define LinuxorUnix
|
||||
#ifdef WIN
|
||||
#ifndef CYGWIN
|
||||
#undef LinuxorUnix
|
||||
/* same libraries are available*/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LinuxorUnix
|
||||
double normal(double x)
|
||||
{
|
||||
double arg, result, sqrt2=1.414213562373095048801688724209698078569672;
|
||||
|
||||
if (x > 0) {
|
||||
arg = x/sqrt2;
|
||||
result = 0.5 * ( 1 + erf(arg) );
|
||||
}
|
||||
else {
|
||||
arg = -x/sqrt2;
|
||||
result = 0.5 * ( 1 - erf(arg) );
|
||||
}
|
||||
return( result);
|
||||
}
|
||||
|
||||
double normal2(double a)
|
||||
{ return (1.0-0.5*erfc(a/sqrt(2.0))); }
|
||||
#endif
|
14
nist/special-functions.h
Normal file
14
nist/special-functions.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
S P E C I A L F U N C T I O N P R O T O T Y P E S
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
double derf_(); /* ERROR FUNCTION */
|
||||
double derfc(); /* COMPLEMENTARY ERROR */
|
||||
double normal(double); /* NORMAL DISTRIBUTION */
|
||||
double normal2(double); /* NORMAL DISTRIBUTION */
|
||||
/*
|
||||
double gser(double,double,double,double);
|
||||
double gcf(double,double,double,double);
|
||||
double gammln(double); LOG GAMMA FUNCTION
|
||||
double gammq(double,double); INCOMPLETE GAMMA FUNCTION
|
||||
*/
|
148
nist/template9
Normal file
148
nist/template9
Normal file
|
@ -0,0 +1,148 @@
|
|||
0 0 0 0 0 0 0 0 1
|
||||
0 0 0 0 0 0 0 1 1
|
||||
0 0 0 0 0 0 1 0 1
|
||||
0 0 0 0 0 0 1 1 1
|
||||
0 0 0 0 0 1 0 0 1
|
||||
0 0 0 0 0 1 0 1 1
|
||||
0 0 0 0 0 1 1 0 1
|
||||
0 0 0 0 0 1 1 1 1
|
||||
0 0 0 0 1 0 0 0 1
|
||||
0 0 0 0 1 0 0 1 1
|
||||
0 0 0 0 1 0 1 0 1
|
||||
0 0 0 0 1 0 1 1 1
|
||||
0 0 0 0 1 1 0 0 1
|
||||
0 0 0 0 1 1 0 1 1
|
||||
0 0 0 0 1 1 1 0 1
|
||||
0 0 0 0 1 1 1 1 1
|
||||
0 0 0 1 0 0 0 1 1
|
||||
0 0 0 1 0 0 1 0 1
|
||||
0 0 0 1 0 0 1 1 1
|
||||
0 0 0 1 0 1 0 0 1
|
||||
0 0 0 1 0 1 0 1 1
|
||||
0 0 0 1 0 1 1 0 1
|
||||
0 0 0 1 0 1 1 1 1
|
||||
0 0 0 1 1 0 0 1 1
|
||||
0 0 0 1 1 0 1 0 1
|
||||
0 0 0 1 1 0 1 1 1
|
||||
0 0 0 1 1 1 0 0 1
|
||||
0 0 0 1 1 1 0 1 1
|
||||
0 0 0 1 1 1 1 0 1
|
||||
0 0 0 1 1 1 1 1 1
|
||||
0 0 1 0 0 0 0 1 1
|
||||
0 0 1 0 0 0 1 0 1
|
||||
0 0 1 0 0 0 1 1 1
|
||||
0 0 1 0 0 1 0 1 1
|
||||
0 0 1 0 0 1 1 0 1
|
||||
0 0 1 0 0 1 1 1 1
|
||||
0 0 1 0 1 0 0 1 1
|
||||
0 0 1 0 1 0 1 0 1
|
||||
0 0 1 0 1 0 1 1 1
|
||||
0 0 1 0 1 1 0 1 1
|
||||
0 0 1 0 1 1 1 0 1
|
||||
0 0 1 0 1 1 1 1 1
|
||||
0 0 1 1 0 0 1 0 1
|
||||
0 0 1 1 0 0 1 1 1
|
||||
0 0 1 1 0 1 0 1 1
|
||||
0 0 1 1 0 1 1 0 1
|
||||
0 0 1 1 0 1 1 1 1
|
||||
0 0 1 1 1 0 1 0 1
|
||||
0 0 1 1 1 0 1 1 1
|
||||
0 0 1 1 1 1 0 1 1
|
||||
0 0 1 1 1 1 1 0 1
|
||||
0 0 1 1 1 1 1 1 1
|
||||
0 1 0 0 0 0 0 1 1
|
||||
0 1 0 0 0 0 1 1 1
|
||||
0 1 0 0 0 1 0 1 1
|
||||
0 1 0 0 0 1 1 1 1
|
||||
0 1 0 0 1 0 0 1 1
|
||||
0 1 0 0 1 0 1 1 1
|
||||
0 1 0 0 1 1 0 1 1
|
||||
0 1 0 0 1 1 1 1 1
|
||||
0 1 0 1 0 0 0 1 1
|
||||
0 1 0 1 0 0 1 1 1
|
||||
0 1 0 1 0 1 0 1 1
|
||||
0 1 0 1 0 1 1 1 1
|
||||
0 1 0 1 1 0 0 1 1
|
||||
0 1 0 1 1 0 1 1 1
|
||||
0 1 0 1 1 1 0 1 1
|
||||
0 1 0 1 1 1 1 1 1
|
||||
0 1 1 0 0 0 1 1 1
|
||||
0 1 1 0 0 1 1 1 1
|
||||
0 1 1 0 1 0 1 1 1
|
||||
0 1 1 0 1 1 1 1 1
|
||||
0 1 1 1 0 1 1 1 1
|
||||
0 1 1 1 1 1 1 1 1
|
||||
1 0 0 0 0 0 0 0 0
|
||||
1 0 0 0 1 0 0 0 0
|
||||
1 0 0 1 0 0 0 0 0
|
||||
1 0 0 1 0 1 0 0 0
|
||||
1 0 0 1 1 0 0 0 0
|
||||
1 0 0 1 1 1 0 0 0
|
||||
1 0 1 0 0 0 0 0 0
|
||||
1 0 1 0 0 0 1 0 0
|
||||
1 0 1 0 0 1 0 0 0
|
||||
1 0 1 0 0 1 1 0 0
|
||||
1 0 1 0 1 0 0 0 0
|
||||
1 0 1 0 1 0 1 0 0
|
||||
1 0 1 0 1 1 0 0 0
|
||||
1 0 1 0 1 1 1 0 0
|
||||
1 0 1 1 0 0 0 0 0
|
||||
1 0 1 1 0 0 1 0 0
|
||||
1 0 1 1 0 1 0 0 0
|
||||
1 0 1 1 0 1 1 0 0
|
||||
1 0 1 1 1 0 0 0 0
|
||||
1 0 1 1 1 0 1 0 0
|
||||
1 0 1 1 1 1 0 0 0
|
||||
1 0 1 1 1 1 1 0 0
|
||||
1 1 0 0 0 0 0 0 0
|
||||
1 1 0 0 0 0 0 1 0
|
||||
1 1 0 0 0 0 1 0 0
|
||||
1 1 0 0 0 1 0 0 0
|
||||
1 1 0 0 0 1 0 1 0
|
||||
1 1 0 0 1 0 0 0 0
|
||||
1 1 0 0 1 0 0 1 0
|
||||
1 1 0 0 1 0 1 0 0
|
||||
1 1 0 0 1 1 0 0 0
|
||||
1 1 0 0 1 1 0 1 0
|
||||
1 1 0 1 0 0 0 0 0
|
||||
1 1 0 1 0 0 0 1 0
|
||||
1 1 0 1 0 0 1 0 0
|
||||
1 1 0 1 0 1 0 0 0
|
||||
1 1 0 1 0 1 0 1 0
|
||||
1 1 0 1 0 1 1 0 0
|
||||
1 1 0 1 1 0 0 0 0
|
||||
1 1 0 1 1 0 0 1 0
|
||||
1 1 0 1 1 0 1 0 0
|
||||
1 1 0 1 1 1 0 0 0
|
||||
1 1 0 1 1 1 0 1 0
|
||||
1 1 0 1 1 1 1 0 0
|
||||
1 1 1 0 0 0 0 0 0
|
||||
1 1 1 0 0 0 0 1 0
|
||||
1 1 1 0 0 0 1 0 0
|
||||
1 1 1 0 0 0 1 1 0
|
||||
1 1 1 0 0 1 0 0 0
|
||||
1 1 1 0 0 1 0 1 0
|
||||
1 1 1 0 0 1 1 0 0
|
||||
1 1 1 0 1 0 0 0 0
|
||||
1 1 1 0 1 0 0 1 0
|
||||
1 1 1 0 1 0 1 0 0
|
||||
1 1 1 0 1 0 1 1 0
|
||||
1 1 1 0 1 1 0 0 0
|
||||
1 1 1 0 1 1 0 1 0
|
||||
1 1 1 0 1 1 1 0 0
|
||||
1 1 1 1 0 0 0 0 0
|
||||
1 1 1 1 0 0 0 1 0
|
||||
1 1 1 1 0 0 1 0 0
|
||||
1 1 1 1 0 0 1 1 0
|
||||
1 1 1 1 0 1 0 0 0
|
||||
1 1 1 1 0 1 0 1 0
|
||||
1 1 1 1 0 1 1 0 0
|
||||
1 1 1 1 0 1 1 1 0
|
||||
1 1 1 1 1 0 0 0 0
|
||||
1 1 1 1 1 0 0 1 0
|
||||
1 1 1 1 1 0 1 0 0
|
||||
1 1 1 1 1 0 1 1 0
|
||||
1 1 1 1 1 1 0 0 0
|
||||
1 1 1 1 1 1 0 1 0
|
||||
1 1 1 1 1 1 1 0 0
|
||||
1 1 1 1 1 1 1 1 0
|
Loading…
Add table
Add a link
Reference in a new issue