From: Christian Bauer Date: Mon, 31 Jan 2000 21:32:23 +0000 (+0000) Subject: - sources now include "ginac.h" instead of , changed Makefile.am X-Git-Tag: release_0-5-0~22 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=35267c690dfa19cdb1ddafa3c1d2c5e3640f6891 - sources now include "ginac.h" instead of , changed Makefile.am to add ../ginac to include path --- diff --git a/check/Makefile.am b/check/Makefile.am index 5c251ed2..3e1ed8bd 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -7,5 +7,6 @@ check_ginac_SOURCES = paranoia_check.cpp numeric_output.cpp \ matrix_checks.cpp series_expansion.cpp lortensor_check.cpp \ fcntimer.cpp main.cpp check.h check_ginac_LDADD = ../ginac/libginac.la +INCLUDES = -I$(srcdir)/../ginac CLEANFILES = result.out EXTRA_DIST = result.ref run_checks diff --git a/check/Makefile.in b/check/Makefile.in index 41fe7c47..539353cc 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -108,6 +108,7 @@ check_PROGRAMS = check_ginac check_ginac_SOURCES = paranoia_check.cpp numeric_output.cpp numeric_consist.cpp powerlaws.cpp expand_subs.cpp inifcns_consist.cpp differentiation.cpp poly_gcd.cpp normalization.cpp lsolve_onedim.cpp matrix_checks.cpp series_expansion.cpp lortensor_check.cpp fcntimer.cpp main.cpp check.h check_ginac_LDADD = ../ginac/libginac.la +INCLUDES = -I$(srcdir)/../ginac CLEANFILES = result.out EXTRA_DIST = result.ref run_checks mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -252,7 +253,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/check/differentiation.cpp b/check/differentiation.cpp index ad91add8..307bd59a 100644 --- a/check/differentiation.cpp +++ b/check/differentiation.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/expand_subs.cpp b/check/expand_subs.cpp index 4c2236ac..419cea7f 100644 --- a/check/expand_subs.cpp +++ b/check/expand_subs.cpp @@ -31,7 +31,7 @@ */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/inifcns_consist.cpp b/check/inifcns_consist.cpp index 34a97b69..c30ddefe 100644 --- a/check/inifcns_consist.cpp +++ b/check/inifcns_consist.cpp @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/lortensor_check.cpp b/check/lortensor_check.cpp index b8543e4b..c153ee49 100644 --- a/check/lortensor_check.cpp +++ b/check/lortensor_check.cpp @@ -21,7 +21,7 @@ */ #include -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/lsolve_onedim.cpp b/check/lsolve_onedim.cpp index 097a0122..99311240 100644 --- a/check/lsolve_onedim.cpp +++ b/check/lsolve_onedim.cpp @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/matrix_checks.cpp b/check/matrix_checks.cpp index cfc81fa0..9e907ec3 100644 --- a/check/matrix_checks.cpp +++ b/check/matrix_checks.cpp @@ -21,7 +21,7 @@ */ #include -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/normalization.cpp b/check/normalization.cpp index 7144c278..4a212988 100644 --- a/check/normalization.cpp +++ b/check/normalization.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/numeric_consist.cpp b/check/numeric_consist.cpp index 7d836e30..5839da10 100644 --- a/check/numeric_consist.cpp +++ b/check/numeric_consist.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/numeric_output.cpp b/check/numeric_output.cpp index f2390d2b..6b3a2599 100644 --- a/check/numeric_output.cpp +++ b/check/numeric_output.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/paranoia_check.cpp b/check/paranoia_check.cpp index 1926ada9..b7552dcd 100644 --- a/check/paranoia_check.cpp +++ b/check/paranoia_check.cpp @@ -23,15 +23,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; #endif // ndef NO_NAMESPACE_GINAC // The very first pair of historic problems had its roots in power.cpp and was -// finally resolved on April 27th. (Fixing the first on April 23rd actually -// introduced the second.) +// finally resolved on April 27th 1999. (Fixing the first on April 23rd +// actually introduced the second.) static unsigned paranoia_check1(void) { unsigned result = 0; @@ -95,8 +95,9 @@ static unsigned paranoia_check2(void) return result; } -// The third bug was introduced on May 18, discovered on May 19 and fixed that -// same day. It worked when x was substituted by 1 but not with other numbers: +// The third bug was introduced on May 18th 1999, discovered on May 19 and +// fixed that same day. It worked when x was substituted by 1 but not with +// other numbers: static unsigned paranoia_check3(void) { unsigned result = 0; @@ -125,7 +126,7 @@ static unsigned paranoia_check3(void) return result; } -// The fourth bug was also discovered on May 19 and fixed immediately: +// The fourth bug was also discovered on May 19th 1999 and fixed immediately: static unsigned paranoia_check4(void) { unsigned result = 0; @@ -150,7 +151,7 @@ static unsigned paranoia_check4(void) return result; } -// The fifth oops was discovered on May 20 and fixed a day later: +// The fifth oops was discovered on May 20th 1999 and fixed a day later: static unsigned paranoia_check5(void) { unsigned result = 0; @@ -169,7 +170,7 @@ static unsigned paranoia_check5(void) return result; } -// This one was discovered on Jun 1 and fixed the same day: +// This one was discovered on Jun 1st 1999 and fixed the same day: static unsigned paranoia_check6(void) { unsigned result = 0; @@ -186,8 +187,8 @@ static unsigned paranoia_check6(void) return result; } -// This one was introduced on June 1 by some aggressive manual optimization. -// Discovered and fixed on June 2. +// This one was introduced on June 1st 1999 by some aggressive manual +// optimization. Discovered and fixed on June 2nd. static unsigned paranoia_check7(void) { unsigned result = 0; @@ -206,8 +207,8 @@ static unsigned paranoia_check7(void) } // This one was a result of the rewrite of mul::max_coefficient when we -// introduced the overall_coefficient field in expairseq objects on Oct 1. -// Fixed on Oct 4. +// introduced the overall_coefficient field in expairseq objects on Oct 1st +// 1999. Fixed on Oct 4th. static unsigned paranoia_check8(void) { unsigned result = 0; @@ -225,6 +226,26 @@ static unsigned paranoia_check8(void) return result; } +// This one was a result of a modification to frac_cancel() & Co. to avoid +// expanding the numerator and denominator when bringing them from Q[X] to +// Z[X]. multiply_lcm() forgot to multiply the x-linear term with the LCM of +// the coefficient's denominators (2 in this case). Introduced on Jan 25th +// 2000 and fixed on Jan 31th. +static unsigned paranoia_check9(void) +{ + unsigned result = 0; + symbol x("x"); + + ex e = (exp(-x)-2*x*exp(-x)+pow(x,2)/2*exp(-x))/exp(-x); + ex f = e.normal(); + + if (!f.is_equal(1-2*x+pow(x,2)/2)) { + clog << "normal(" << e << ") returns " << f << " instead of 1-2*x+1/2*x^2\n"; + ++result; + } + return result; +} + unsigned paranoia_check(void) { unsigned result = 0; @@ -240,6 +261,7 @@ unsigned paranoia_check(void) result += paranoia_check6(); result += paranoia_check7(); result += paranoia_check8(); + result += paranoia_check9(); if (!result) { cout << " passed "; diff --git a/check/poly_gcd.cpp b/check/poly_gcd.cpp index 1e25add7..0e6780c8 100644 --- a/check/poly_gcd.cpp +++ b/check/poly_gcd.cpp @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/powerlaws.cpp b/check/powerlaws.cpp index 83ea03da..e885369c 100644 --- a/check/powerlaws.cpp +++ b/check/powerlaws.cpp @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC; diff --git a/check/run_checks b/check/run_checks index 1c9e6bab..8d3adcbb 100755 --- a/check/run_checks +++ b/check/run_checks @@ -2,4 +2,4 @@ echo "Running checks..." ./check_ginac 2>result.out echo "Comparing output..." -cmp result.ref result.out +cmp ${srcdir}/result.ref result.out diff --git a/check/series_expansion.cpp b/check/series_expansion.cpp index 6d482baa..4cd16970 100644 --- a/check/series_expansion.cpp +++ b/check/series_expansion.cpp @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include "ginac.h" #ifndef NO_NAMESPACE_GINAC using namespace GiNaC;