]> www.ginac.de Git - ginac.git/commitdiff
- dramatic speedup for characteristic polynomials of numerical matrices.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 30 Mar 2000 00:09:13 +0000 (00:09 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 30 Mar 2000 00:09:13 +0000 (00:09 +0000)
- 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.

32 files changed:
Makefile.in
NEWS
aclocal.m4
check/Makefile.am
check/Makefile.in
check/check_matrices.cpp
check/exam_inifcns.cpp
check/exam_pseries.cpp
check/time_lw_M1.cpp
check/time_lw_Q.cpp [new file with mode: 0644]
check/time_lw_Qprime.cpp [new file with mode: 0644]
check/times.cpp
check/times.h
check/times.ref
cint/Makefile.in
configure
doc/Makefile.in
doc/reference/Makefile.in
doc/tutorial/Makefile.in
doc/tutorial/ginac.texi
ginac/Makefile.in
ginac/constant.cpp
ginac/constant.h
ginac/inifcns_gamma.cpp
ginac/input_lexer.ll
ginac/matrix.cpp
ginac/matrix.h
ginac/numeric.cpp
ginac/numeric.h
ginsh/Makefile.in
ginsh/ginsh_lexer.ll
tools/Makefile.in

index c65826461046cea7b5f6b551444f2259ee4e70bd..1ab8391310b4f11aeba8c7fb60b556b77c5f648e 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
diff --git a/NEWS b/NEWS
index 25d89c6a7ddf4c3727f354014c2a19825dd5e029..9c503db49875bde2b4fa9f0c6f45bbe7c7f1c77c 100644 (file)
--- 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.)
   - 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.
 * #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.
index dd8a1c229dda2f064eaa2a275f987d75efea43ce..099e24f86e965ddc661d1f239538ed8f722be7c0 100644 (file)
@@ -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 \
 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
 || 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
 
 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"
 # 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.
 
 # 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
 *-*-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_MSG_RESULT(no)
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
 AC_PROG_LD_GNU
 ])
 
 AC_PROG_LD_GNU
 ])
 
@@ -609,14 +613,13 @@ else
 fi])
 NM="$ac_cv_path_NM"
 AC_MSG_RESULT([$NM])
 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=
 ])
 
 # 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
   ;;
 *-*-beos* | *-*-cygwin*)
   # These system don't have libm
   ;;
index 7083c694e850303deeeadd510ed722a6b3c85f91..f343811ef76e136ce0d11130fe2cfd0d8bd3a5a8 100644 (file)
@@ -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_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
 times_LDADD = ../ginac/libginac.la
 INCLUDES = -I$(srcdir)/../ginac
 CLEANFILES = exams.out checks.out times.out
index b577c2fd2e68af623b48cb78a3375edae64dd2ed..042f44f8fdf40781e4aa756c40fa352b11a53cce 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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
 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
 
 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 \
 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@
 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_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)
 
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index ec7efefc523132fae8b701c2864a674d26c3927e..5721a942921e3c60d77f6ded561896ec70b0ce62 100644 (file)
@@ -28,13 +28,13 @@ static unsigned matrix_determinants(void)
     unsigned result = 0;
     symbol a("a");
 
     unsigned result = 0;
     symbol a("a");
 
-    for (int size=3; size<16; ++size) {
+    for (int size=3; size<17; ++size) {
         matrix A(size,size);
         matrix A(size,size);
+        for (int r=0; r<size-1; ++r) {
+            // populate one element in each row:
+            A.set(r,unsigned(rand()%size),dense_univariate_poly(a,5));
+        }
         for (int c=0; c<size; ++c) {
         for (int c=0; c<size; ++c) {
-            for (int r=0;r<size-1; ++r)
-                // populate 10 percent of the entries, the rest remains 0:
-                if (!(int)(10.0*rand()/(RAND_MAX+1.0)))
-                    A.set(r,c,dense_univariate_poly(a,5));
             // set the last line to a linear combination of two other lines
             // to guarantee that the determinant vanishes:
             A.set(size-1,c,A(0,c)-A(size-2,c));
             // set the last line to a linear combination of two other lines
             // to guarantee that the determinant vanishes:
             A.set(size-1,c,A(0,c)-A(size-2,c));
index bdb5e7d7c9cfc60350eb41f855447d4dda3ae651..823e25ecc46f01490195e16ef3ba45b7217b9206 100644 (file)
@@ -198,7 +198,7 @@ unsigned exam_inifcns(void)
     result += inifcns_consist_gamma();  cout << '.' << flush;
     result += inifcns_consist_psi();  cout << '.' << flush;
     result += inifcns_consist_zeta();  cout << '.' << flush;
     result += inifcns_consist_gamma();  cout << '.' << flush;
     result += inifcns_consist_psi();  cout << '.' << flush;
     result += inifcns_consist_zeta();  cout << '.' << flush;
-
+    
     if (!result) {
         cout << " passed " << endl;
         clog << "(no output)" << endl;
     if (!result) {
         cout << " passed " << endl;
         clog << "(no output)" << endl;
index 78a55e2da2d865b4f23b79849b229a80320e9563..1857385f912a647d97c0bab918e0f66a6ad22df5 100644 (file)
@@ -157,28 +157,28 @@ static unsigned exam_series5(void)
     e = tgamma(2*x);
     d = pow(x+1,-1)*numeric(1,4) +
         pow(x+1,0)*(numeric(3,4) -
     e = tgamma(2*x);
     d = pow(x+1,-1)*numeric(1,4) +
         pow(x+1,0)*(numeric(3,4) -
-                    numeric(1,2)*gamma) +
+                    numeric(1,2)*Euler) +
         pow(x+1,1)*(numeric(7,4) -
         pow(x+1,1)*(numeric(7,4) -
-                    numeric(3,2)*gamma +
-                    numeric(1,2)*pow(gamma,2) +
+                    numeric(3,2)*Euler +
+                    numeric(1,2)*pow(Euler,2) +
                     numeric(1,12)*pow(Pi,2)) +
         pow(x+1,2)*(numeric(15,4) -
                     numeric(1,12)*pow(Pi,2)) +
         pow(x+1,2)*(numeric(15,4) -
-                    numeric(7,2)*gamma -
-                    numeric(1,3)*pow(gamma,3) +
+                    numeric(7,2)*Euler -
+                    numeric(1,3)*pow(Euler,3) +
                     numeric(1,4)*pow(Pi,2) +
                     numeric(1,4)*pow(Pi,2) +
-                    numeric(3,2)*pow(gamma,2) -
-                    numeric(1,6)*pow(Pi,2)*gamma -
+                    numeric(3,2)*pow(Euler,2) -
+                    numeric(1,6)*pow(Pi,2)*Euler -
                     numeric(2,3)*zeta(3)) +
                     numeric(2,3)*zeta(3)) +
-        pow(x+1,3)*(numeric(31,4) - pow(gamma,3) -
-                    numeric(15,2)*gamma +
-                    numeric(1,6)*pow(gamma,4) +
-                    numeric(7,2)*pow(gamma,2) +
+        pow(x+1,3)*(numeric(31,4) - pow(Euler,3) -
+                    numeric(15,2)*Euler +
+                    numeric(1,6)*pow(Euler,4) +
+                    numeric(7,2)*pow(Euler,2) +
                     numeric(7,12)*pow(Pi,2) -
                     numeric(7,12)*pow(Pi,2) -
-                    numeric(1,2)*pow(Pi,2)*gamma -
+                    numeric(1,2)*pow(Pi,2)*Euler -
                     numeric(2)*zeta(3) +
                     numeric(2)*zeta(3) +
-                    numeric(1,6)*pow(gamma,2)*pow(Pi,2) +
+                    numeric(1,6)*pow(Euler,2)*pow(Pi,2) +
                     numeric(1,40)*pow(Pi,4) +
                     numeric(1,40)*pow(Pi,4) +
-                    numeric(4,3)*zeta(3)*gamma) +
+                    numeric(4,3)*zeta(3)*Euler) +
         Order(pow(x+1,4));
     result += check_series(e, -1, d, 4);
     
         Order(pow(x+1,4));
     result += check_series(e, -1, d, 4);
     
index d3dabe69b4b6f3bdc7cfd67fdf08eb202c260781..ea021969568172effed248733f144f7b99c09ba4 100644 (file)
@@ -27,7 +27,7 @@ static unsigned test(void)
 {
     // Determinant of a sparse matrix that comes up in graph theory:
     symbol x1("x1"), x2("x2"), x3("x3"), x4("x4"), x5("x5");
 {
     // Determinant of a sparse matrix that comes up in graph theory:
     symbol x1("x1"), x2("x2"), x3("x3"), x4("x4"), x5("x5");
-    ex w[26][11] = {
+    static ex w[26][11] = {
         { 1,  1,  1,  7, x4, 12, x3, 17, x2, 22, x1},
         { 2,  2,  1,  8, x4, 13, x3, 18, x2, 23, x1},
         { 3,  3,  1,  9, x4, 14, x3, 19, x2, 24, x1},
         { 1,  1,  1,  7, x4, 12, x3, 17, x2, 22, x1},
         { 2,  2,  1,  8, x4, 13, x3, 18, x2, 23, x1},
         { 3,  3,  1,  9, x4, 14, x3, 19, x2, 24, x1},
@@ -65,41 +65,11 @@ static unsigned test(void)
     }
     ex det = m.determinant();
     // The result should have been:
     }
     ex det = m.determinant();
     // The result should have been:
-    ex cmp = -12*pow(x1*x5,2)*x4-12*x1*pow(x2*x4,2)-12*x3*pow(x4*x5,2)
-        -pow(x5,3)*pow(x4,2)-12*x1*pow(x4*x5,2)-12*x2*pow(x4*x5,2)
-        -pow(x4,3)*pow(x5,2)-2*pow(x5,3)*x4*x3-2*pow(x4,3)*x5*x3
-        -36*x3*x1*pow(x5,2)*x4-36*x3*x1*pow(x4,2)*x5-12*pow(x3*x5,2)*x4
-        -12*pow(x3*x4,2)*x5-36*x3*x2*pow(x5,2)*x4-36*x3*x2*pow(x4,2)*x5
-        -36*x1*x5*pow(x3,2)*x4-36*x2*x5*pow(x3,2)*x4-12*x1*pow(x3*x5,2)
-        -12*x1*pow(x3*x4,2)-pow(x3,3)*pow(x5,2)-pow(x3,3)*pow(x4,2)
-        -2*pow(x3,3)*x5*x4-12*x2*pow(x3*x5,2)-12*x2*pow(x3*x4,2)
-        -12*x1*pow(x2*x5,2)-12*pow(x2*x5,2)*x4-12*pow(x2*x4,2)*x5
-        -12*pow(x2*x5,2)*x3-12*pow(x2*x4,2)*x3-12*pow(x2*x3,2)*x5
-        -12*pow(x2*x3,2)*x4-pow(x3,2)*pow(x5,3)-pow(x3,2)*pow(x4,3)
-        -2*pow(x5,3)*x4*x2-2*pow(x4,3)*x5*x2-2*x3*pow(x5,3)*x2
-        -2*x3*pow(x4,3)*x2-2*pow(x3,3)*x5*x2-2*pow(x3,3)*x4*x2
-        -2*pow(x2,3)*x5*x4-36*x2*x1*pow(x5,2)*x4-36*x2*x1*pow(x4,2)*x5
-        -120*x2*x1*x5*x4*x3-36*x2*x1*pow(x5,2)*x3-36*x2*x1*pow(x4,2)*x3
-        -36*x2*x1*pow(x3,2)*x5-36*x2*x1*pow(x3,2)*x4-36*pow(x2,2)*x5*x4*x3
-        -36*pow(x1,2)*x5*x4*x3-12*pow(x1*x5,2)*x3-12*pow(x1*x4,2)*x3
-        -12*pow(x1*x3,2)*x5-12*pow(x1*x3,2)*x4-12*pow(x1*x5,2)*x2
-        -12*pow(x1*x4,2)*x2-12*pow(x1*x3,2)*x2-12*pow(x1*x2,2)*x5
-        -12*pow(x1*x2,2)*x4-12*pow(x1*x2,2)*x3-pow(x2,2)*pow(x5,3)
-        -pow(x2,2)*pow(x4,3)-pow(x2,2)*pow(x3,3)-36*x1*x5*pow(x2,2)*x4
-        -36*x1*x5*pow(x2,2)*x3-36*x1*x4*pow(x2,2)*x3-36*x2*pow(x1,2)*x5*x4
-        -pow(x2,3)*pow(x5,2)-pow(x2,3)*pow(x4,2)-pow(x2,3)*pow(x3,2)
-        -2*pow(x2,3)*x5*x3-2*pow(x2,3)*x4*x3-12*x1*pow(x2*x3,2)
-        -12*pow(x1*x4,2)*x5-pow(x1,3)*pow(x5,2)-pow(x1,3)*pow(x4,2)
-        -pow(x1,3)*pow(x3,2)-pow(x1,3)*pow(x2,2)-pow(x1,2)*pow(x5,3)
-        -pow(x1,2)*pow(x4,3)-pow(x1,2)*pow(x3,3)-pow(x1,2)*pow(x2,3)
-        -36*x2*x3*pow(x1,2)*x5-36*x2*x3*pow(x1,2)*x4-2*pow(x5,3)*x4*x1
-        -2*pow(x4,3)*x5*x1-2*x3*pow(x5,3)*x1-2*x3*pow(x4,3)*x1
-        -2*pow(x3,3)*x5*x1-2*pow(x3,3)*x4*x1-2*x2*pow(x5,3)*x1
-        -2*x2*pow(x4,3)*x1-2*x2*pow(x3,3)*x1-2*pow(x2,3)*x5*x1
-        -2*pow(x2,3)*x4*x1-2*pow(x2,3)*x3*x1-2*pow(x1,3)*x5*x4
-        -2*pow(x1,3)*x5*x3-2*pow(x1,3)*x5*x2-2*pow(x1,3)*x4*x3
-        -2*pow(x1,3)*x4*x2-2*pow(x1,3)*x3*x2;
-    if (det!=cmp) {
+    const char *cmp = "-12*x2^2*x5^2*x4-12*x1*x5^2*x3^2-x5^3*x4^2-12*x1*x5^2*x4^2-12*x2*x5^2*x4^2-12*x3*x5^2*x4^2-x4^3*x5^2-36*x3*x1*x5^2*x4-36*x3*x1*x4^2*x5-36*x3*x2*x5^2*x4-36*x3*x2*x4^2*x5-2*x5^3*x4*x2-12*x3^2*x5^2*x4-12*x3^2*x4^2*x5-2*x5^3*x4*x3-2*x4^3*x5*x3-12*x1*x5^2*x2^2-36*x1*x5*x3^2*x4-36*x2*x5*x3^2*x4-x3^3*x5^2-x3^3*x4^2-2*x3^3*x5*x4-12*x2^2*x4^2*x5-12*x2*x5^2*x3^2-12*x2*x4^2*x3^2-12*x1*x4^2*x3^2-x3^2*x5^3-x3^2*x4^3-2*x4^3*x5*x2-2*x3*x5^3*x2-2*x3*x4^3*x2-2*x3^3*x5*x2-2*x3^3*x4*x2-2*x2^3*x5*x4-2*x2^3*x5*x3-2*x2^3*x4*x3-36*x2^2*x5*x4*x3-36*x2*x1*x5^2*x4-36*x2*x1*x4^2*x5-120*x2*x1*x5*x4*x3-36*x2*x1*x5^2*x3-36*x2*x1*x4^2*x3-36*x2*x1*x3^2*x5-36*x2*x1*x3^2*x4-12*x2^2*x5^2*x3-12*x2^2*x4^2*x3-12*x2^2*x3^2*x5-12*x2^2*x3^2*x4-2*x1^3*x4*x3-2*x1^3*x4*x2-2*x1^3*x3*x2-2*x1^3*x5*x2-36*x1^2*x5*x4*x3-36*x2*x1^2*x5*x4-36*x2*x3*x1^2*x5-36*x2*x3*x1^2*x4-x1^3*x5^2-x1^3*x4^2-x1^3*x3^2-x1^3*x2^2-x2^2*x5^3-x2^2*x4^3-x2^2*x3^3-12*x1*x4^2*x2^2-12*x1*x3^2*x2^2-12*x1^2*x5^2*x4-12*x1^2*x4^2*x5-12*x1^2*x5^2*x3-12*x1^2*x4^2*x3-12*x1^2*x3^2*x5-12*x1^2*x3^2*x4-12*x1^2*x5^2*x2-12*x1^2*x4^2*x2-12*x1^2*x3^2*x2-12*x1^2*x2^2*x5-12*x1^2*x2^2*x4-12*x1^2*x2^2*x3-2*x5^3*x4*x1-2*x4^3*x5*x1-2*x3*x5^3*x1-2*x3*x4^3*x1-2*x3^3*x5*x1-2*x3^3*x4*x1-2*x2*x5^3*x1-2*x2*x4^3*x1-2*x2*x3^3*x1-2*x2^3*x5*x1-2*x2^3*x4*x1-2*x2^3*x3*x1-2*x1^3*x5*x4-2*x1^3*x5*x3-36*x1*x5*x2^2*x4-36*x1*x5*x2^2*x3-36*x1*x4*x2^2*x3-x1^2*x5^3-x1^2*x4^3-x1^2*x3^3-x2^3*x5^2-x2^3*x4^2-x2^3*x3^2-x1^2*x2^3";
+    istrstream cmpstrm(cmp,strlen(cmp));
+    ex cmpex = lst(x1,x2,x3,x4,x5);
+    cmpstrm >> cmpex;
+    if (det!=cmpex) {
         clog << "The determinant was miscalculated" << endl;
         return 1;
     }
         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 (file)
index 0000000..0c29dfb
--- /dev/null
@@ -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 (file)
index 0000000..b60ba11
--- /dev/null
@@ -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;
+}
index 0d0007ec04ca57fb3ec2a396b99910e703767743..9542c84ed09376e51463f65921549d790aa00b03 100644 (file)
@@ -148,6 +148,20 @@ int main()
         ++result;
     }
     
         ++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) {
     if (result) {
         cout << "Error: something went wrong. ";
         if (result == 1) {
index a49c0f41bb84e50b6ef5f7025a4bd4af3c248a02..74d3474e49d4adcd4e5c537ca2d8f7eeb4bbe54f 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <sys/resource.h>
 #include <stdlib.h>
 
 #include <sys/resource.h>
 #include <stdlib.h>
+#include <strstream>
 #include <vector>
 
 #include "ginac.h"
 #include <vector>
 
 #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_O();
 unsigned time_lw_P();
 unsigned time_lw_Pprime();
+unsigned time_lw_Q();
+unsigned time_lw_Qprime();
 
 #endif // ndef CHECKS_H
 
 #endif // ndef CHECKS_H
index 54827f06dc6c7179d8d579442f6417ca23889f42..6fa65da8a271e9c5007cff7c0842ac5c6ea63c2b 100644 (file)
@@ -38,3 +38,7 @@
 (no output)
 -------Lewis-Wester test P' (det of less sparse rank 101)
 (no output)
 (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)
index 3e762ac45e9cf2bdbf1955b3e2273b0a1e056449..a494a339fdf260e72d0499a38e21793321cdbd82 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 7d002ff2620e27940c8bdc0e689fba163b4465d4..ecd447e902fabc0edf195a1cdfb2604a329758c7 100755 (executable)
--- 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_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 $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
 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 $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
 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
 
 NM="$ac_cv_path_NM"
 echo "$ac_t""$NM" 1>&6
 
-
 echo $ac_n "checking whether ln -s works""... $ac_c" 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
 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
 
 
 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"
 # 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.
 
 # 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.
 *-*-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"
     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
   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 <<EOF
 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 <<EOF
-#line 1680 "configure"
+#line 1683 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1687: \"$ac_link\") 1>&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
   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 \
 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
 || { 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
 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=
 # 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 <<EOF
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1804 "configure"
+#line 1807 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 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
   :
 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 <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1821 "configure"
+#line 1824 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 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
   :
 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 <<EOF
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1838 "configure"
+#line 1841 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <assert.h>
 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
   :
 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
 # 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
 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
 # 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
 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
   *) 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
 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 <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1949 "configure"
+#line 1952 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1956,7 +1959,7 @@ int main() {
 yywrap()
 ; return 0; }
 EOF
 yywrap()
 ; return 0; }
 EOF
-if { (eval echo configure:1960: \"$ac_link\") 1>&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
   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
 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
 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
 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
 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 <<EOF
 ac_save_LIBS="$LIBS"
 LIBS="$LIBS $LEXLIB"
 cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2019 "configure"
 #include "confdefs.h"
 `cat $LEX_OUTPUT_ROOT.c`
 int main() {
 
 ; return 0; }
 EOF
 #include "confdefs.h"
 `cat $LEX_OUTPUT_ROOT.c`
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2023: \"$ac_link\") 1>&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
   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
 # 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
 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 $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
 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 <<EOF
   ac_cv_sizeof_long=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2117 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2121,7 +2124,7 @@ main()
   exit(0);
 }
 EOF
   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
 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 $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
 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 <<EOF
   ac_cv_sizeof_long_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 2153 "configure"
+#line 2156 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2160,7 +2163,7 @@ main()
   exit(0);
 }
 EOF
   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
 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 $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
 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 <<EOF
   ac_cv_sizeof_long_double=12
 else
   cat > conftest.$ac_ext <<EOF
-#line 2192 "configure"
+#line 2195 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2199,7 +2202,7 @@ main()
   exit(0);
 }
 EOF
   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
 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
 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
 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
-#line 2240 "configure"
+#line 2243 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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
 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
 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
-#line 2280 "configure"
+#line 2283 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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
 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 <<EOF
 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 <<EOF
-#line 2327 "configure"
+#line 2330 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2349,7 +2352,7 @@ $ac_func();
 
 ; return 0; }
 EOF
 
 ; return 0; }
 EOF
-if { (eval echo configure:2353: \"$ac_link\") 1>&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
   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
     :
 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
 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 <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2389 "configure"
+#line 2392 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2399,7 +2402,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:2403: \"$ac_link\") 1>&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
   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
 
     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
 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 <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2433 "configure"
+#line 2436 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2443,7 +2446,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:2447: \"$ac_link\") 1>&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
   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
 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
 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 <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2482 "configure"
+#line 2485 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2492,7 +2495,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:2496: \"$ac_link\") 1>&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
   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 $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
 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 <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lstdc++  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2543 "configure"
+#line 2546 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2553,7 +2556,7 @@ int main() {
 cout()
 ; return 0; }
 EOF
 cout()
 ; return 0; }
 EOF
-if { (eval echo configure:2557: \"$ac_link\") 1>&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
   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
 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
 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
-#line 2594 "configure"
+#line 2597 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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
 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
 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
-#line 2635 "configure"
+#line 2638 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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
 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
 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
-#line 2677 "configure"
+#line 2680 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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
 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
 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
-#line 2714 "configure"
+#line 2717 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 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*
 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 $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
     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 <<EOF
         case "${ac_cv_header_cln_cln_h}" in
         "yes")
             cat > conftest.$ac_ext <<EOF
-#line 2763 "configure"
+#line 2766 "configure"
 #include "confdefs.h"
 #include <cln/cl_integer.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <cln/cl_integer.h>
 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
   rm -rf conftest*
   ginac_cv_lib_cln_link="-lcln"
 else
@@ -2779,14 +2782,14 @@ rm -f conftest*
             ;;
         *)
             cat > conftest.$ac_ext <<EOF
             ;;
         *)
             cat > conftest.$ac_ext <<EOF
-#line 2783 "configure"
+#line 2786 "configure"
 #include "confdefs.h"
 #include <cl_integer.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
 #include "confdefs.h"
 #include <cl_integer.h>
 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
   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
 # 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
 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
 # 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
 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
 # 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
 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
 # 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
 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
 # 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
 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
   # 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
 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
   # 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
 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%@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
 s%@LN_S@%$LN_S%g
 s%@LIBTOOL@%$LIBTOOL%g
 s%@LEX@%$LEX%g
index 86782bd739345b17199b0adac12faf3a7ed84b21..f7d7934f0d6d44ba740b4846a456da8cbb6899f0 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index bc1ddcc7648e90146c860ce717332b708a7e0a33..021b10eacdb18827f6d75b17627482d2f7bc2d5d 100644 (file)
@@ -85,7 +85,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -99,7 +98,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 56c89ab6f5982a3fe68715f606ca6fd21cc08465..ddb714928624d5f09b9317acb73df31bcef68d45 100644 (file)
@@ -84,7 +84,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -98,7 +97,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index ae19fbaaaf9915903156a7c507cd4e32ee4a68cc..d8970b5bc3ed41b11d49801227f159720a3a3254 100644 (file)
@@ -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
 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
 
 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),
 @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
 
 @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
 @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
 
 
 @end itemize
 
index 53b3d16f864cc38f20bbbff282e31a487408ffe1..24464f6c0236a32503f943f906c5ac5bc8491d43 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index b1b9237a1a486b26345c489cb73bcb9bfd131e91..56d096da796974af7039f50c5e52c15479e48e78 100644 (file)
@@ -125,8 +125,8 @@ ex constant::unarchive(const archive_node &n, const lst &sym_lst)
             return Pi;
         else if (s == Catalan.name)
             return Catalan;
             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
         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);
 
 /**  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(). */
 /** 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
 const constant Catalan("Catalan", CatalanEvalf);
 
 #ifndef NO_NAMESPACE_GINAC
index aa917e54b8510e735d22138a50618c810f467980..4d456bd3754c596c5b3ed65f96e9fcd2a58d9f8a 100644 (file)
@@ -92,10 +92,9 @@ private:
 extern const constant some_constant;
 extern const type_info & typeid_constant;
 
 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 Pi;
 extern const constant Catalan;
-extern const constant gamma;
+extern const constant Euler;
 
 #ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
 
 #ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
index 9e1b48f4d75bf106a184e5a1b2285dbb2d21ec59..b28c246253258e0980a1fbbdc7ad50eefdc769ef 100644 (file)
@@ -314,11 +314,11 @@ static ex psi1_eval(const ex & x)
         if (nx.is_integer()) {
             // integer case 
             if (nx.is_positive()) {
         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();
                 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"));
             } 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()) {
         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();
                 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)
             } 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).
     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));
 
                           series_func(psi2_series).
                           overloaded(2));
 
index eebdae4ae418030b4bbee9d736bc6e2298cc1368..e0e9b468a1186c37f3e98a01574d011b96c7f1be 100644 (file)
@@ -78,7 +78,7 @@ AN    [0-9a-zA-Z_]
 
                        /* special values */
 Pi                     yylval = Pi; return T_LITERAL;
 
                        /* 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;
 Catalan                        yylval = Catalan; return T_LITERAL;
 FAIL                   yylval = *new fail(); return T_LITERAL;
 I                      yylval = I; return T_NUMBER;
index f219f27de0c3dcb1432bcc7d944b4ef8bcd63dcc..0296c18340df9f16b746298df6c61577ba5c050b 100644 (file)
@@ -30,6 +30,8 @@
 #include "lst.h"
 #include "utils.h"
 #include "debugmsg.h"
 #include "lst.h"
 #include "utils.h"
 #include "debugmsg.h"
+#include "power.h"
+#include "symbol.h"
 
 #ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
 
 #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);
 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)
 }
 
 void matrix::destroy(bool call_parent)
@@ -105,7 +107,7 @@ matrix::matrix(unsigned r, unsigned c)
     m.resize(r*c, _ex0());
 }
 
     m.resize(r*c, _ex0());
 }
 
-// protected
+ // protected
 
 /** Ctor from representation, for internal use only. */
 matrix::matrix(unsigned r, unsigned c, const exvector & m2)
 
 /** 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);
         throw (std::logic_error("matrix::mul(): incompatible matrices"));
     
     exvector prod(row*other.col);
-    for (unsigned i=0; i<row; ++i) {
-        for (unsigned j=0; j<other.col; ++j) {
-            for (unsigned l=0; l<col; ++l) {
-                prod[i*other.col+j] += m[i*col+l] * other.m[l*other.col+j];
-            }
+    
+    for (unsigned r1=0; r1<row; ++r1) {
+        for (unsigned c=0; c<col; ++c) {
+            if (m[r1*col+c].is_zero())
+                continue;
+            for (unsigned r2=0; r2<other.col; ++r2)
+                prod[r1*other.col+r2] += m[r1*col+c] * other.m[c*other.col+r2];
         }
     }
     return matrix(row, other.col, prod);
         }
     }
     return matrix(row, other.col, prod);
@@ -467,17 +471,19 @@ ex matrix::determinant(void) const
         }
     }
     
         }
     }
     
-    if (numeric_flag)
+    if (numeric_flag)  // purely numeric matrix
         return determinant_numeric();
     
         return determinant_numeric();
     
-    if (5*sparse_count<row*col) {     // MAGIC, maybe 10 some bright day?
+    // Does anybody really know when a matrix is sparse?
+    if (4*sparse_count<row*col) {  // < row/2 non-zero elements average in row
         matrix M(*this);
         matrix M(*this);
-        // int sign = M.division_free_elimination();
         int sign = M.fraction_free_elimination();
         int sign = M.fraction_free_elimination();
+        if (!sign)
+            return _ex0();
         if (normal_flag)
         if (normal_flag)
-            return sign*M(row-1,col-1).normal();
+            return sign * M(row-1,col-1).normal();
         else
         else
-            return sign*M(row-1,col-1).expand();
+            return sign * M(row-1,col-1).expand();
     }
     
     // Now come the minor expansion schemes.  We always develop such that the
     }
     
     // Now come the minor expansion schemes.  We always develop such that the
@@ -539,24 +545,55 @@ ex matrix::trace(void) const
 }
 
 
 }
 
 
-/** Characteristic Polynomial.  The characteristic polynomial of a matrix M is
- *  defined as the determiant of (M - lambda * 1) where 1 stands for the unit
- *  matrix of the same dimension as M.  This method returns the characteristic
- *  polynomial as a new expression.
+/** Characteristic Polynomial.  Following mathematica notation the
+ *  characteristic polynomial of a matrix M is defined as the determiant of
+ *  (M - lambda * 1) where 1 stands for the unit matrix of the same dimension
+ *  as M.  Note that some CASs define it with a sign inside the determinant
+ *  which gives rise to an overall sign if the dimension is odd.  This method
+ *  returns the characteristic polynomial collected in powers of lambda as a
+ *  new expression.
  *
  *  @return    characteristic polynomial as new expression
  *  @exception logic_error (matrix not square)
  *  @see       matrix::determinant() */
  *
  *  @return    characteristic polynomial as new expression
  *  @exception logic_error (matrix not square)
  *  @see       matrix::determinant() */
-ex matrix::charpoly(const ex & lambda) const
+ex matrix::charpoly(const symbol & lambda) const
 {
     if (row != col)
         throw (std::logic_error("matrix::charpoly(): matrix not square"));
     
 {
     if (row != col)
         throw (std::logic_error("matrix::charpoly(): matrix not square"));
     
+    bool numeric_flag = true;
+    for (exvector::const_iterator r=m.begin(); r!=m.end(); ++r) {
+        if (!(*r).info(info_flags::numeric)) {
+            numeric_flag = false;
+        }
+    }
+    
+    // The pure numeric case is traditionally rather common.  Hence, it is
+    // trapped and we use Leverrier's algorithm which goes as row^3 for
+    // every coefficient.  The expensive section is the matrix multiplication,
+    // maybe this can be sped up even more?
+    if (numeric_flag) {
+        matrix B(*this);
+        ex c = B.trace();
+        ex poly = power(lambda,row)-c*power(lambda,row-1);
+        for (unsigned i=1; i<row; ++i) {
+            for (unsigned j=0; j<row; ++j)
+                B.m[j*col+j] -= c;
+            B = this->mul(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<col; ++r)
         M.m[r*col+r] -= lambda;
     
     matrix M(*this);
     for (unsigned r=0; r<col; ++r)
         M.m[r*col+r] -= lambda;
     
-    return (M.determinant());
+    return M.determinant().collect(lambda);
 }
 
 
 }
 
 
@@ -865,31 +902,6 @@ ex matrix::determinant_numeric(void) const
 }
 
 
 }
 
 
-/*  Leverrier algorithm for large matrices having at least one symbolic entry.
- *  This routine is only called internally by matrix::determinant(). The
- *  algorithm is very bad for symbolic matrices since it returns expressions
- *  that are quite hard to expand. */
-/*ex matrix::determinant_leverrier(const matrix & M)
- *{
- *    GINAC_ASSERT(M.rows()==M.cols());  // cannot happen, just in case...
- *    
- *    matrix B(M);
- *    matrix I(M.row, M.col);
- *    ex c=B.trace();
- *    for (unsigned i=1; i<M.row; ++i) {
- *        for (unsigned j=0; j<M.row; ++j)
- *            I.m[j*M.col+j] = c;
- *        B = M.mul(B.sub(I));
- *        c = B.trace()/ex(i+1);
- *    }
- *    if (M.row%2) {
- *        return c;
- *    } else {
- *        return -c;
- *    }
- *}*/
-
-
 ex matrix::determinant_minor_sparse(void) const
 {
     // for small matrices the algorithm does not make any sense:
 ex matrix::determinant_minor_sparse(void) const
 {
     // for small matrices the algorithm does not make any sense:
@@ -1046,22 +1058,6 @@ ex matrix::determinant_minor_dense(void) const
 }
 
 
 }
 
 
-/*  Determinant using a simple Bareiss elimination scheme.  Suited for
- *  sparse matrices.
- *
- *  @return the determinant as a new expression (in expanded form)
- *  @see matrix::determinant() */
-ex matrix::determinant_bareiss(void) const
-{
-    matrix M(*this);
-    int sign = M.fraction_free_elimination();
-    if (sign)
-        return sign*M(row-1,col-1);
-    else
-        return _ex0();
-}
-
-
 /** Determinant built by application of the full permutation group.  This
  *  routine is only called internally by matrix::determinant().
  *  NOTE: it is probably inefficient in all cases and may be eliminated. */
 /** Determinant built by application of the full permutation group.  This
  *  routine is only called internally by matrix::determinant().
  *  NOTE: it is probably inefficient in all cases and may be eliminated. */
index 60931cc54a3e5d71d8ce6077cbfaae538c5b628b..65eebde91697a504f7c03f72e205cbe32cd0272c 100644 (file)
@@ -89,7 +89,7 @@ public:
     matrix transpose(void) const;
     ex determinant(void) const;
     ex trace(void) const;
     matrix transpose(void) const;
     ex determinant(void) const;
     ex trace(void) const;
-    ex charpoly(const ex & lambda) const;
+    ex charpoly(const symbol & lambda) const;
     matrix inverse(void) const;
     matrix fraction_free_elim(const matrix & vars, const matrix & v) const;
     matrix solve(const matrix & vars, const matrix & rhs) const;
     matrix inverse(void) const;
     matrix fraction_free_elim(const matrix & vars, const matrix & v) const;
     matrix solve(const matrix & vars, const matrix & rhs) const;
@@ -98,7 +98,6 @@ protected:
     ex determinant_numeric(void) const;
     ex determinant_minor_sparse(void) const;
     ex determinant_minor_dense(void) const;
     ex determinant_numeric(void) const;
     ex determinant_minor_sparse(void) const;
     ex determinant_minor_dense(void) const;
-    ex determinant_bareiss(void) const;
     ex determinant_perm(void) const;
     int gauss_elimination(void);
     int fraction_free_elimination(void);
     ex determinant_perm(void) const;
     int gauss_elimination(void);
     int fraction_free_elimination(void);
@@ -153,7 +152,7 @@ inline ex determinant(const matrix & m)
 inline ex trace(const matrix & m)
 { return m.trace(); }
 
 inline ex trace(const matrix & m)
 { return m.trace(); }
 
-inline ex charpoly(const matrix & m, const ex & lambda)
+inline ex charpoly(const matrix & m, const symbol & lambda)
 { return m.charpoly(lambda); }
 
 inline matrix inverse(const matrix & m)
 { return m.charpoly(lambda); }
 
 inline matrix inverse(const matrix & m)
index 191dee5dafcb1a8448f5abd75167b2944e6648a7..30e19fc746bf7020526f08a31141afd1a1facb45 100644 (file)
@@ -1739,7 +1739,7 @@ ex PiEvalf(void)
 
 
 /** Floating point evaluation of Euler's constant gamma. */
 
 
 /** Floating point evaluation of Euler's constant gamma. */
-ex gammaEvalf(void)
+ex EulerEvalf(void)
 { 
     return numeric(::cl_eulerconst(cl_default_float_format));  // -> CLN
 }
 { 
     return numeric(::cl_eulerconst(cl_default_float_format));  // -> CLN
 }
index 3306eeadf7a0819daa2271b20ee266508edb983c..ff63e42d87db80d05bb8ed40f26a54e9b722f456 100644 (file)
@@ -323,7 +323,7 @@ inline numeric denom(const numeric & x)
 // numeric evaluation functions for class constant objects:
 
 ex PiEvalf(void);
 // numeric evaluation functions for class constant objects:
 
 ex PiEvalf(void);
-ex gammaEvalf(void);
+ex EulerEvalf(void);
 ex CatalanEvalf(void);
 
 
 ex CatalanEvalf(void);
 
 
index 7fad8dcc6eedbd1673622108af6387e34e23b1e4..5bd33c8e4fc3290beadccfb5d8c0ed8370ec5868 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index ed093299d85067027e759cb360aa7405d99a872a..7f78a2dd3f97ec72cd0f0d4992c8047cff825f34 100644 (file)
@@ -60,7 +60,7 @@ AN    [0-9a-zA-Z_]
 
                        /* special values */
 Pi                     yylval = Pi; return T_LITERAL;
 
                        /* 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;
 Catalan                        yylval = Catalan; return T_LITERAL;
 FAIL                   yylval = *new fail(); return T_LITERAL;
 I                      yylval = I; return T_NUMBER;
index 392fb729da89fefea731a2c844091c2a24386903..0f42a2cdc71a13c0c2ee7bf18633b388e6331134 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
 LEX = @LEX@
 LIBGINACCINT = @LIBGINACCINT@
 LIBTERMCAP = @LIBTERMCAP@
@@ -96,7 +95,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
 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 \
        @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 \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \