From a43a2fe7d9df31529647c66dcfb9cad544ffd369 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 30 Mar 2000 00:09:13 +0000 Subject: [PATCH] - dramatic speedup for characteristic polynomials of numerical matrices. - speedup for matrix multiplication of somewhat sparse matrices. - gamma -> Euler (sorry 4 that, again). - two new tests (Q and Q') from Lewis' and Wester's testsuite. - fixed compilation desaster in timing M1 by using the new parser. - had a glass of beer. --- Makefile.in | 4 +- NEWS | 2 +- aclocal.m4 | 13 +-- check/Makefile.am | 3 +- check/Makefile.in | 13 ++- check/check_matrices.cpp | 10 +-- check/exam_inifcns.cpp | 2 +- check/exam_pseries.cpp | 28 +++---- check/time_lw_M1.cpp | 42 ++-------- check/time_lw_Q.cpp | 74 +++++++++++++++++ check/time_lw_Qprime.cpp | 89 ++++++++++++++++++++ check/times.cpp | 14 ++++ check/times.h | 3 + check/times.ref | 4 + cint/Makefile.in | 4 +- configure | 171 +++++++++++++++++++------------------- doc/Makefile.in | 4 +- doc/reference/Makefile.in | 4 +- doc/tutorial/Makefile.in | 4 +- doc/tutorial/ginac.texi | 15 ++-- ginac/Makefile.in | 4 +- ginac/constant.cpp | 8 +- ginac/constant.h | 3 +- ginac/inifcns_gamma.cpp | 10 +-- ginac/input_lexer.ll | 2 +- ginac/matrix.cpp | 118 +++++++++++++------------- ginac/matrix.h | 5 +- ginac/numeric.cpp | 2 +- ginac/numeric.h | 2 +- ginsh/Makefile.in | 4 +- ginsh/ginsh_lexer.ll | 2 +- tools/Makefile.in | 4 +- 32 files changed, 403 insertions(+), 264 deletions(-) create mode 100644 check/time_lw_Q.cpp create mode 100644 check/time_lw_Qprime.cpp diff --git a/Makefile.in b/Makefile.in index c6582646..1ab83913 100644 --- a/Makefile.in +++ b/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -361,7 +359,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/NEWS b/NEWS index 25d89c6a..9c503db4 100644 --- a/NEWS +++ b/NEWS @@ -7,7 +7,7 @@ This file records noteworthy changes. - series(f(x),x,p[,o]) -> series(f(x),x==p,o) - gamma() -> tgamma() (The true Gamma function, there is now also log(tgamma()), called lgamma(), in accord with ISO/IEC 9899:1999.) - - EulerGamma -> gamma + - EulerGamma -> Euler * #include'ing ginac.h defines the preprocessor symbols GINACLIB_MAJOR_VERSION, GINACLIB_MINOR_VERSION, and GINACLIB_MICRO_VERSION with the respective GiNaC library version numbers. diff --git a/aclocal.m4 b/aclocal.m4 index dd8a1c22..099e24f8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -297,7 +297,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig @@ -329,6 +329,11 @@ AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -347,7 +352,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext @@ -563,7 +568,6 @@ else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_SUBST(LD) AC_PROG_LD_GNU ]) @@ -609,14 +613,13 @@ else fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) -AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= -case "$host" in +case "$lt_target" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; diff --git a/check/Makefile.am b/check/Makefile.am index 7083c694..f343811e 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -13,7 +13,8 @@ times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp \ time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp \ time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp \ time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp \ - time_lw_Pprime.cpp timer.cpp times.cpp times.h + time_lw_Pprime.cpp time_lw_Q.cpp time_lw_Qprime.cpp \ + timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac CLEANFILES = exams.out checks.out times.out diff --git a/check/Makefile.in b/check/Makefile.in index b577c2fd..042f44f8 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -113,7 +111,7 @@ exams_LDADD = ../ginac/libginac.la checks_SOURCES = check_numeric.cpp check_inifcns.cpp check_matrices.cpp check_lsolve.cpp genex.cpp checks.cpp checks.h checks_LDADD = ../ginac/libginac.la -times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp time_lw_Pprime.cpp timer.cpp times.cpp times.h +times_SOURCES = time_dennyfliegner.cpp time_gammaseries.cpp time_vandermonde.cpp time_toeplitz.cpp time_lw_A.cpp time_lw_B.cpp time_lw_C.cpp time_lw_D.cpp time_lw_E.cpp time_lw_F.cpp time_lw_G.cpp time_lw_H.cpp time_lw_IJKL.cpp time_lw_M1.cpp time_lw_O.cpp time_lw_P.cpp time_lw_Pprime.cpp time_lw_Q.cpp time_lw_Qprime.cpp timer.cpp times.cpp times.h times_LDADD = ../ginac/libginac.la INCLUDES = -I$(srcdir)/../ginac @@ -141,7 +139,7 @@ times_OBJECTS = time_dennyfliegner.o time_gammaseries.o \ time_vandermonde.o time_toeplitz.o time_lw_A.o time_lw_B.o time_lw_C.o \ time_lw_D.o time_lw_E.o time_lw_F.o time_lw_G.o time_lw_H.o \ time_lw_IJKL.o time_lw_M1.o time_lw_O.o time_lw_P.o time_lw_Pprime.o \ -timer.o times.o +time_lw_Q.o time_lw_Qprime.o timer.o times.o times_DEPENDENCIES = ../ginac/libginac.la times_LDFLAGS = CXXFLAGS = @CXXFLAGS@ @@ -172,8 +170,9 @@ DEP_FILES = .deps/check_inifcns.P .deps/check_lsolve.P \ .deps/time_lw_C.P .deps/time_lw_D.P .deps/time_lw_E.P .deps/time_lw_F.P \ .deps/time_lw_G.P .deps/time_lw_H.P .deps/time_lw_IJKL.P \ .deps/time_lw_M1.P .deps/time_lw_O.P .deps/time_lw_P.P \ -.deps/time_lw_Pprime.P .deps/time_toeplitz.P .deps/time_vandermonde.P \ -.deps/timer.P .deps/times.P +.deps/time_lw_Pprime.P .deps/time_lw_Q.P .deps/time_lw_Qprime.P \ +.deps/time_toeplitz.P .deps/time_vandermonde.P .deps/timer.P \ +.deps/times.P SOURCES = $(exams_SOURCES) $(checks_SOURCES) $(times_SOURCES) OBJECTS = $(exams_OBJECTS) $(checks_OBJECTS) $(times_OBJECTS) @@ -287,7 +286,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/check/check_matrices.cpp b/check/check_matrices.cpp index ec7efefc..5721a942 100644 --- a/check/check_matrices.cpp +++ b/check/check_matrices.cpp @@ -28,13 +28,13 @@ static unsigned matrix_determinants(void) unsigned result = 0; symbol a("a"); - for (int size=3; size<16; ++size) { + for (int size=3; size<17; ++size) { matrix A(size,size); + for (int r=0; r> cmpex; + if (det!=cmpex) { clog << "The determinant was miscalculated" << endl; return 1; } diff --git a/check/time_lw_Q.cpp b/check/time_lw_Q.cpp new file mode 100644 index 00000000..0c29dfb0 --- /dev/null +++ b/check/time_lw_Q.cpp @@ -0,0 +1,74 @@ +/** @file time_lw_Q.cpp + * + * Test Q from the paper "Comparison of Polynomial-Oriented CAS" by Robert H. + * Lewis and Michael Wester. */ + +/* + * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "times.h" +#include "time_lw_w101n.h" + +static unsigned test(void) +{ + matrix m(101,101); + symbol lambda("lambda"); + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<10; ++c) { + m.set(r, + unsigned(ex_to_numeric(w101_numeric[r][2*c+1]).to_int()-1), + w101_numeric[r][2*c+2]); + } + } + ex cp = m.charpoly(lambda); + + if (cp.coeff(lambda,96) != numeric("75287520")) { + clog << "characteristic polynomial miscalculated as " << cp << endl; + return 1; + } + return 0; +} + +unsigned time_lw_Q(void) +{ + unsigned result = 0; + unsigned count = 0; + timer rolex; + double time = .0; + + cout << "timing Lewis-Wester test Q (charpoly(P))" << flush; + clog << "-------Lewis-Wester test Q (charpoly(P))" << endl; + + rolex.start(); + // correct for very small times: + do { + result = test(); + ++count; + } while ((time=rolex.read())<0.1 && !result); + cout << '.' << flush; + + if (!result) { + cout << " passed "; + clog << "(no output)" << endl; + } else { + cout << " failed "; + } + cout << int(1000*(time/count))*0.001 << 's' << endl; + + return result; +} diff --git a/check/time_lw_Qprime.cpp b/check/time_lw_Qprime.cpp new file mode 100644 index 00000000..b60ba11b --- /dev/null +++ b/check/time_lw_Qprime.cpp @@ -0,0 +1,89 @@ +/** @file time_lw_Qprime.cpp + * + * Test Q' from the paper "Comparison of Polynomial-Oriented CAS" by Robert H. + * Lewis and Michael Wester. */ + +/* + * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "times.h" +#include "time_lw_w101n.h" + +static unsigned test(void) +{ + matrix m(101,101); + symbol lambda("lambda"); + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<10; ++c) { + m.set(r, + unsigned(ex_to_numeric(w101_numeric[r][2*c+1]).to_int()-1), + w101_numeric[r][2*c+2]); + } + } + matrix m2(m); + ex a; + for (unsigned r=0; r<101; ++r) { + a = m2(r,0); + for (unsigned c=0; c<100; ++c) { + m2.set(r,c,m2(r,c+1)); + } + m2.set(r,100,a); + } + for (unsigned r=0; r<101; ++r) { + for (unsigned c=0; c<101; ++c) { + if (!m(r,c).is_zero()) + m2.set(r,c,m(r,c)); + } + } + ex cp = m2.charpoly(lambda); + + if (cp.coeff(lambda,0) != numeric("140816284877507872414776")) { + clog << "characteristic polynomial miscalculated as " << cp << endl; + return 1; + } + return 0; +} + +unsigned time_lw_Qprime(void) +{ + unsigned result = 0; + unsigned count = 0; + timer rolex; + double time = .0; + + cout << "timing Lewis-Wester test Q' (charpoly(P'))" << flush; + clog << "-------Lewis-Wester test Q' (charpoly(P'))" << endl; + + rolex.start(); + // correct for very small times: + do { + result = test(); + ++count; + } while ((time=rolex.read())<0.1 && !result); + cout << '.' << flush; + + if (!result) { + cout << " passed "; + clog << "(no output)" << endl; + } else { + cout << " failed "; + } + cout << int(1000*(time/count))*0.001 << 's' << endl; + + return result; +} diff --git a/check/times.cpp b/check/times.cpp index 0d0007ec..9542c84e 100644 --- a/check/times.cpp +++ b/check/times.cpp @@ -148,6 +148,20 @@ int main() ++result; } + try { + result += time_lw_Q(); + } catch (const exception &e) { + cout << "Error: caught exception " << e.what() << endl; + ++result; + } + + try { + result += time_lw_Qprime(); + } catch (const exception &e) { + cout << "Error: caught exception " << e.what() << endl; + ++result; + } + if (result) { cout << "Error: something went wrong. "; if (result == 1) { diff --git a/check/times.h b/check/times.h index a49c0f41..74d3474e 100644 --- a/check/times.h +++ b/check/times.h @@ -25,6 +25,7 @@ #include #include +#include #include #include "ginac.h" @@ -64,5 +65,7 @@ unsigned time_lw_M1(); unsigned time_lw_O(); unsigned time_lw_P(); unsigned time_lw_Pprime(); +unsigned time_lw_Q(); +unsigned time_lw_Qprime(); #endif // ndef CHECKS_H diff --git a/check/times.ref b/check/times.ref index 54827f06..6fa65da8 100644 --- a/check/times.ref +++ b/check/times.ref @@ -38,3 +38,7 @@ (no output) -------Lewis-Wester test P' (det of less sparse rank 101) (no output) +-------Lewis-Wester test Q (charpoly(P)) +(no output) +-------Lewis-Wester test Q' (charpoly(P')) +(no output) diff --git a/cint/Makefile.in b/cint/Makefile.in index 3e762ac4..a494a339 100644 --- a/cint/Makefile.in +++ b/cint/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -342,7 +340,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/configure b/configure index 7d002ff2..ecd447e9 100755 --- a/configure +++ b/configure @@ -1550,9 +1550,8 @@ else echo "$ac_t""no" 1>&6 fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } - echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1556: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1555: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1568,7 +1567,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1572: checking for BSD-compatible nm" >&5 +echo "configure:1571: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1603,9 +1602,8 @@ fi NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 - echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1609: checking whether ln -s works" >&5 +echo "configure:1607: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1626,6 +1624,11 @@ else fi +case "$target" in +NONE) lt_target="$host" ;; +*) lt_target="$target" ;; +esac + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" @@ -1646,11 +1649,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$host" in +case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1653 "configure"' > conftest.$ac_ext - if { (eval echo configure:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1656 "configure"' > conftest.$ac_ext + if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1671,19 +1674,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1675: checking whether the C compiler needs -belf" >&5 +echo "configure:1678: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1761,7 +1764,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1785,7 +1788,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1789: checking how to run the C preprocessor" >&5 +echo "configure:1792: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1800,13 +1803,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1817,13 +1820,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1834,13 +1837,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1870,7 +1873,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1874: checking for $ac_word" >&5 +echo "configure:1877: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1903,7 +1906,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1907: checking for $ac_word" >&5 +echo "configure:1910: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1937,7 +1940,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1941: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1944: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1945,7 +1948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1979,7 +1982,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:1983: checking lex output file root" >&5 +echo "configure:1986: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2000,7 +2003,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:2004: checking whether yytext is a pointer" >&5 +echo "configure:2007: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2012,14 +2015,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -2045,7 +2048,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2049: checking for $ac_word" >&5 +echo "configure:2052: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2102,7 +2105,7 @@ fi echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2106: checking size of long" >&5 +echo "configure:2109: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2110,7 +2113,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -2121,7 +2124,7 @@ main() exit(0); } EOF -if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2141,7 +2144,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:2145: checking size of long long" >&5 +echo "configure:2148: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2149,7 +2152,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -2160,7 +2163,7 @@ main() exit(0); } EOF -if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -2180,7 +2183,7 @@ EOF echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:2184: checking size of long double" >&5 +echo "configure:2187: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2188,7 +2191,7 @@ else ac_cv_sizeof_long_double=12 else cat > conftest.$ac_ext < main() @@ -2199,7 +2202,7 @@ main() exit(0); } EOF -if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -2231,17 +2234,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2235: checking for $ac_hdr" >&5 +echo "configure:2238: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2271,17 +2274,17 @@ for ac_hdr in readline/readline.h readline/history.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2275: checking for $ac_hdr" >&5 +echo "configure:2278: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2318,12 +2321,12 @@ LIBTERMCAP= for ac_func in tgetent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2322: checking for $ac_func" >&5 +echo "configure:2325: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2377,7 +2380,7 @@ if test "x$ac_cv_func_tgetent" = "xyes"; then : else echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:2381: checking for tgetent in -lncurses" >&5 +echo "configure:2384: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2385,7 +2388,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2421,7 +2424,7 @@ fi if test -z "$LIBTERMCAP"; then echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:2425: checking for tgetent in -ltermcap" >&5 +echo "configure:2428: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2429,7 +2432,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2470,7 +2473,7 @@ fi save_LIBS=$LIBS LIBS="$LIBTERMCAP $LIBS" echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:2474: checking for readline in -lreadline" >&5 +echo "configure:2477: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2478,7 +2481,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2531,7 +2534,7 @@ LIBS=$save_LIBS echo $ac_n "checking for cout in -lstdc++""... $ac_c" 1>&6 -echo "configure:2535: checking for cout in -lstdc++" >&5 +echo "configure:2538: checking for cout in -lstdc++" >&5 ac_lib_var=`echo stdc++'_'cout | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2539,7 +2542,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lstdc++ $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2585,17 +2588,17 @@ for ac_hdr in iostream vector map string list typeinfo iterator stdexcept algori do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2589: checking for $ac_hdr" >&5 +echo "configure:2592: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2626,17 +2629,17 @@ for ac_hdr in sstream strstream do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2630: checking for $ac_hdr" >&5 +echo "configure:2633: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2668,17 +2671,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2672: checking for $ac_hdr" >&5 +echo "configure:2675: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2705,17 +2708,17 @@ for ac_hdr in cln.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2709: checking for $ac_hdr" >&5 +echo "configure:2712: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2750,7 +2753,7 @@ done echo $ac_n "checking for doublefactorial in -lcln""... $ac_c" 1>&6 -echo "configure:2754: checking for doublefactorial in -lcln" >&5 +echo "configure:2757: checking for doublefactorial in -lcln" >&5 saved_LIBS="${LIBS}" if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2759,14 +2762,14 @@ else case "${ac_cv_header_cln_cln_h}" in "yes") cat > conftest.$ac_ext < int main() { doublefactorial(2); ; return 0; } EOF -if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ginac_cv_lib_cln_link="-lcln" else @@ -2779,14 +2782,14 @@ rm -f conftest* ;; *) cat > conftest.$ac_ext < int main() { doublefactorial(2); ; return 0; } EOF -if { (eval echo configure:2790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ginac_cv_lib_cln_link="-lcln" else @@ -2827,7 +2830,7 @@ GINACLIB_LIBS=$LIBS # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2831: checking for $ac_word" >&5 +echo "configure:2834: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2863,7 +2866,7 @@ fi # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2867: checking for $ac_word" >&5 +echo "configure:2870: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2899,7 +2902,7 @@ fi # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2903: checking for $ac_word" >&5 +echo "configure:2906: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2935,7 +2938,7 @@ fi # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2939: checking for $ac_word" >&5 +echo "configure:2942: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2971,7 +2974,7 @@ fi # Extract the first word of "fig2dev", so it can be a program name with args. set dummy fig2dev; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2975: checking for $ac_word" >&5 +echo "configure:2978: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3039,7 +3042,7 @@ if test "x$with_cint" != "xno"; then # Extract the first word of "cint", so it can be a program name with args. set dummy cint; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3043: checking for $ac_word" >&5 +echo "configure:3046: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CINT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3075,7 +3078,7 @@ fi # Extract the first word of "makecint", so it can be a program name with args. set dummy makecint; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3079: checking for $ac_word" >&5 +echo "configure:3082: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKECINT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3314,8 +3317,6 @@ s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g -s%@LD@%$LD%g -s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@LEX@%$LEX%g diff --git a/doc/Makefile.in b/doc/Makefile.in index 86782bd7..f7d7934f 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -275,7 +273,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/reference/Makefile.in b/doc/reference/Makefile.in index bc1ddcc7..021b10ea 100644 --- a/doc/reference/Makefile.in +++ b/doc/reference/Makefile.in @@ -85,7 +85,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -99,7 +98,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -171,7 +169,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/tutorial/Makefile.in b/doc/tutorial/Makefile.in index 56c89ab6..ddb71492 100644 --- a/doc/tutorial/Makefile.in +++ b/doc/tutorial/Makefile.in @@ -84,7 +84,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -98,7 +97,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -328,7 +326,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index ae19fbaa..d8970b5b 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -577,8 +577,11 @@ possible random input. Third, some @emph{timings} are performed, which benchmark some predefined problems with different sizes and display the CPU time used in seconds. Each individual test should return a message @samp{passed}. This is mostly intended to be a QA-check if something -was broken during development, not a sanity check of your system. -Another intent is to allow people to fiddle around with optimization. +was broken during development, not a sanity check of your system. Some +of the tests in sections @emph{checks} and @emph{timings} may require +insane amounts of memory and CPU time. Feel free to kill them if your +machine catches fire. Another quite important intent is to allow people +to fiddle around with optimization. Generally, the top-level Makefile runs recursively to the subdirectories. It is therfore safe to go into any subdirectory @@ -1879,7 +1882,7 @@ nice for novice programmers, but dangerous. @item development tools: powerful development tools exist for C++, like fancy editors (e.g. with automatic indentation and syntax highlighting), -debuggers, visualization tools, documentation tools... +debuggers, visualization tools, documentation generators... @item modularization: C++ programs can easily be split into modules by @@ -1922,9 +1925,9 @@ system (i.e. @emph{Yacas}). @item efficiency: often large parts of a program do not need symbolic calculations at all. Why use large integers for loop variables or -arbitrary precision arithmetics where double accuracy is sufficient? -For pure symbolic applications, GiNaC is comparable in speed with other -CAS. +arbitrary precision arithmetics where @code{int} and @code{double} are +sufficient? For pure symbolic applications, GiNaC is comparable in +speed with other CAS. @end itemize diff --git a/ginac/Makefile.in b/ginac/Makefile.in index 53b3d16f..24464f6c 100644 --- a/ginac/Makefile.in +++ b/ginac/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -317,7 +315,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/ginac/constant.cpp b/ginac/constant.cpp index b1b9237a..56d096da 100644 --- a/ginac/constant.cpp +++ b/ginac/constant.cpp @@ -125,8 +125,8 @@ ex constant::unarchive(const archive_node &n, const lst &sym_lst) return Pi; else if (s == Catalan.name) return Catalan; - else if (s == gamma.name) - return gamma; + else if (s == Euler.name) + return Euler; else throw (std::runtime_error("unknown constant '" + s + "' in archive")); } else @@ -243,10 +243,10 @@ const type_info & typeid_constant=typeid(some_constant); /** Pi. (3.14159...) Diverts straight into CLN for evalf(). */ const constant Pi("Pi", PiEvalf); -/** Catalan's constant. (0.91597...) Diverts straight into CLN for evalf(). */ -const constant gamma("gamma", gammaEvalf); /** Euler's constant. (0.57721...) Sometimes called Euler-Mascheroni constant. * Diverts straight into CLN for evalf(). */ +const constant Euler("Euler", EulerEvalf); +/** Catalan's constant. (0.91597...) Diverts straight into CLN for evalf(). */ const constant Catalan("Catalan", CatalanEvalf); #ifndef NO_NAMESPACE_GINAC diff --git a/ginac/constant.h b/ginac/constant.h index aa917e54..4d456bd3 100644 --- a/ginac/constant.h +++ b/ginac/constant.h @@ -92,10 +92,9 @@ private: extern const constant some_constant; extern const type_info & typeid_constant; -// extern const numeric I; extern const constant Pi; extern const constant Catalan; -extern const constant gamma; +extern const constant Euler; #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC diff --git a/ginac/inifcns_gamma.cpp b/ginac/inifcns_gamma.cpp index 9e1b48f4..b28c2462 100644 --- a/ginac/inifcns_gamma.cpp +++ b/ginac/inifcns_gamma.cpp @@ -314,11 +314,11 @@ static ex psi1_eval(const ex & x) if (nx.is_integer()) { // integer case if (nx.is_positive()) { - // psi(n) -> 1 + 1/2 +...+ 1/(n-1) - gamma + // psi(n) -> 1 + 1/2 +...+ 1/(n-1) - Euler numeric rat(0); for (numeric i(nx+_num_1()); i.is_positive(); --i) rat += i.inverse(); - return rat-gamma; + return rat-Euler; } else { // for non-positive integers there is a pole: throw (std::domain_error("psi_eval(): simple pole")); @@ -327,11 +327,11 @@ static ex psi1_eval(const ex & x) if ((_num2()*nx).is_integer()) { // half integer case if (nx.is_positive()) { - // psi((2m+1)/2) -> 2/(2m+1) + 2/2m +...+ 2/1 - gamma - 2log(2) + // psi((2m+1)/2) -> 2/(2m+1) + 2/2m +...+ 2/1 - Euler - 2log(2) numeric rat(0); for (numeric i((nx+_num_1())*_num2()); i.is_positive(); i-=_num2()) rat += _num2()*i.inverse(); - return rat-gamma-_ex2()*log(_ex2()); + return rat-Euler-_ex2()*log(_ex2()); } else { // use the recurrence relation // psi(-m-1/2) == psi(-m-1/2+1) - 1 / (-m-1/2) @@ -505,7 +505,7 @@ const unsigned function_index_psi2 = function::register_new(function_options("psi"). eval_func(psi2_eval). evalf_func(psi2_evalf). - derivative_func(psi2_deriv). + derivative_func(psi2_deriv). series_func(psi2_series). overloaded(2)); diff --git a/ginac/input_lexer.ll b/ginac/input_lexer.ll index eebdae4a..e0e9b468 100644 --- a/ginac/input_lexer.ll +++ b/ginac/input_lexer.ll @@ -78,7 +78,7 @@ AN [0-9a-zA-Z_] /* special values */ Pi yylval = Pi; return T_LITERAL; -gamma yylval = gamma; return T_LITERAL; +Euler yylval = Euler; return T_LITERAL; Catalan yylval = Catalan; return T_LITERAL; FAIL yylval = *new fail(); return T_LITERAL; I yylval = I; return T_NUMBER; diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index f219f27d..0296c183 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -30,6 +30,8 @@ #include "lst.h" #include "utils.h" #include "debugmsg.h" +#include "power.h" +#include "symbol.h" #ifndef NO_NAMESPACE_GINAC namespace GiNaC { @@ -78,9 +80,9 @@ const matrix & matrix::operator=(const matrix & other) void matrix::copy(const matrix & other) { inherited::copy(other); - row=other.row; - col=other.col; - m=other.m; // use STL's vector copying + row = other.row; + col = other.col; + m = other.m; // STL's vector copying invoked here } void matrix::destroy(bool call_parent) @@ -105,7 +107,7 @@ matrix::matrix(unsigned r, unsigned c) m.resize(r*c, _ex0()); } -// protected + // protected /** Ctor from representation, for internal use only. */ matrix::matrix(unsigned r, unsigned c, const exvector & m2) @@ -378,11 +380,13 @@ matrix matrix::mul(const matrix & other) const throw (std::logic_error("matrix::mul(): incompatible matrices")); exvector prod(row*other.col); - for (unsigned i=0; imul(B); + c = B.trace()/ex(i+1); + poly -= c*power(lambda,row-i-1); + } + if (row%2) + return -poly; + else + return poly; + } + matrix M(*this); for (unsigned r=0; r CLN } diff --git a/ginac/numeric.h b/ginac/numeric.h index 3306eead..ff63e42d 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -323,7 +323,7 @@ inline numeric denom(const numeric & x) // numeric evaluation functions for class constant objects: ex PiEvalf(void); -ex gammaEvalf(void); +ex EulerEvalf(void); ex CatalanEvalf(void); diff --git a/ginsh/Makefile.in b/ginsh/Makefile.in index 7fad8dcc..5bd33c8e 100644 --- a/ginsh/Makefile.in +++ b/ginsh/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -318,7 +316,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/ginsh/ginsh_lexer.ll b/ginsh/ginsh_lexer.ll index ed093299..7f78a2dd 100644 --- a/ginsh/ginsh_lexer.ll +++ b/ginsh/ginsh_lexer.ll @@ -60,7 +60,7 @@ AN [0-9a-zA-Z_] /* special values */ Pi yylval = Pi; return T_LITERAL; -gamma yylval = gamma; return T_LITERAL; +Euler yylval = Euler; return T_LITERAL; Catalan yylval = Catalan; return T_LITERAL; FAIL yylval = *new fail(); return T_LITERAL; I yylval = I; return T_NUMBER; diff --git a/tools/Makefile.in b/tools/Makefile.in index 392fb729..0f42a2cd 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@ GINACLIB_VERSION = @GINACLIB_VERSION@ GINSH_LIBS = @GINSH_LIBS@ LATEX = @LATEX@ -LD = @LD@ LEX = @LEX@ LIBGINACCINT = @LIBGINACCINT@ LIBTERMCAP = @LIBTERMCAP@ @@ -96,7 +95,6 @@ MAINT = @MAINT@ MAKECINT = @MAKECINT@ MAKEINDEX = @MAKEINDEX@ MAKEINFO = @MAKEINFO@ -NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ @@ -301,7 +299,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ -- 2.44.0