]> www.ginac.de Git - ginac.git/blobdiff - check/exam_clifford.cpp
canonicalize_clifford() was omitting some ONEs
[ginac.git] / check / exam_clifford.cpp
index 71f49dba88f9526cd360c377a5609ee437086e8a..b6ec71e455317bccb9b56eed2e96372f35ac47a3 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test GiNaC's Clifford algebra objects. */
 
 /*
  *  Here we test GiNaC's Clifford algebra objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2004 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
  *
  *  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
@@ -44,7 +44,7 @@ static unsigned check_equal_simplify(const ex &e1, const ex &e2)
        return 0;
 }
 
        return 0;
 }
 
-static unsigned clifford_check1(void)
+static unsigned clifford_check1()
 {
        // checks general identities and contractions
 
 {
        // checks general identities and contractions
 
@@ -80,7 +80,7 @@ static unsigned clifford_check1(void)
        return result;
 }
 
        return result;
 }
 
-static unsigned clifford_check2(void)
+static unsigned clifford_check2()
 {
        // checks identities relating to gamma5
 
 {
        // checks identities relating to gamma5
 
@@ -99,7 +99,7 @@ static unsigned clifford_check2(void)
        return result;
 }
 
        return result;
 }
 
-static unsigned clifford_check3(void)
+static unsigned clifford_check3()
 {
        // checks traces
 
 {
        // checks traces
 
@@ -187,7 +187,7 @@ static unsigned clifford_check3(void)
        return result;
 }
 
        return result;
 }
 
-static unsigned clifford_check4(void)
+static unsigned clifford_check4()
 {
        // simplify_indexed()/dirac_trace() cross-checks
 
 {
        // simplify_indexed()/dirac_trace() cross-checks
 
@@ -221,7 +221,7 @@ static unsigned clifford_check4(void)
        return result;
 }
 
        return result;
 }
 
-static unsigned clifford_check5(void)
+static unsigned clifford_check5()
 {
        // canonicalize_clifford() checks
 
 {
        // canonicalize_clifford() checks
 
@@ -232,7 +232,7 @@ static unsigned clifford_check5(void)
        ex e;
 
        e = dirac_gamma(mu) * dirac_gamma(nu) + dirac_gamma(nu) * dirac_gamma(mu);
        ex e;
 
        e = dirac_gamma(mu) * dirac_gamma(nu) + dirac_gamma(nu) * dirac_gamma(mu);
-       result += check_equal(canonicalize_clifford(e), 2*lorentz_g(mu, nu));
+       result += check_equal(canonicalize_clifford(e), 2*dirac_ONE()*lorentz_g(mu, nu));
 
        e = (dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(lam)
           + dirac_gamma(nu) * dirac_gamma(lam) * dirac_gamma(mu)
 
        e = (dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(lam)
           + dirac_gamma(nu) * dirac_gamma(lam) * dirac_gamma(mu)
@@ -249,7 +249,7 @@ static unsigned clifford_check5(void)
        return result;
 }
 
        return result;
 }
 
-unsigned exam_clifford(void)
+unsigned exam_clifford()
 {
        unsigned result = 0;
        
 {
        unsigned result = 0;