[GiNaC-devel] Patch

Jan private jrheinlaender at gmx.de
Thu Sep 2 08:45:14 CEST 2010


Hello Alexei,

here is my first try at a patch (GiNaC 1.5.8.) Please let me know if it
is OK this way

Jan

----------------------------
1. Problem: MSVC chokes on "or" and "not"
2. Replaced with "||" and "!"

--- clifford.cpp.orig	2010-09-02 07:40:19 +0000
+++ clifford.cpp	2010-09-02 07:42:42 +0000
@@ -1291,11 +1291,11 @@
 	if (algebraic) // check if algebraic method is applicable
 		for (unsigned int i = 0; i < D; i++) 
 			if (pow(c.subs(mu == i, subs_options::no_pattern), 2).is_zero() 
-				or (not is_a<numeric>(pow(c.subs(mu == i,
subs_options::no_pattern), 2))))
+				|| (! is_a<numeric>(pow(c.subs(mu == i, subs_options::no_pattern),
2))))
 				algebraic = false;
 	lst V; 
 	ex v0 = remove_dirac_ONE(canonicalize_clifford(e
+clifford_prime(e)).normal())/2;
-	if (not v0.is_zero())
+	if (! v0.is_zero())
 		V.append(v0);
 	ex e1 = canonicalize_clifford(e - v0 *
dirac_ONE(ex_to<clifford>(c).get_representation_label())); 
 	if (algebraic) {
@@ -1312,7 +1312,7 @@
 			e1 = canonicalize_clifford(expand_dummy_sum(e, true));
 			V.remove_all();
 			v0 = remove_dirac_ONE(canonicalize_clifford(e1
+clifford_prime(e1)).normal())/2;
-			if (not v0.is_zero()) {
+			if (! v0.is_zero()) {
 				V.append(v0);
 				e1 = canonicalize_clifford(e1 - v0 *
dirac_ONE(ex_to<clifford>(c).get_representation_label())); 
 			}





More information about the GiNaC-devel mailing list