]> www.ginac.de Git - ginac.git/commitdiff
* This is a deliberately silly commit. release_0-7-3
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 28 Feb 2001 23:30:45 +0000 (23:30 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 28 Feb 2001 23:30:45 +0000 (23:30 +0000)
ginac/expairseq.cpp
ginac/mul.cpp

index 3e84134b3ca29b58aac94ea56b9dacd66774f077..bad422cd55570e9f273ddbe7e21bb5f1f8912312 100644 (file)
@@ -1301,6 +1301,9 @@ void expairseq::drop_coeff_0_terms(epvector::iterator &first_numeric,
        GINAC_ASSERT(i==current-seq.begin());
 }
 
+/** True if one of the coeffs vanishes, otherwise false.
+ *  This would be an invariant violation, so this should only be used for
+ *  debugging purposes. */
 bool expairseq::has_coeff_0(void) const
 {
        for (epvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
index 70c161c241bb94bfa4d65fb6a64d5d6fa59afaea..887a9169908207f1e196479ecdcc7ddcc617a77f 100644 (file)
@@ -303,7 +303,7 @@ ex mul::coeff(const symbol & s, int n) const
        if (n==0) {
                // product of individual coeffs
                // if a non-zero power of s is found, the resulting product will be 0
-               epvector::const_iterator it=seq.begin();
+               epvector::const_iterator it = seq.begin();
                while (it!=seq.end()) {
                        coeffseq.push_back(recombine_pair_to_ex(*it).coeff(s,n));
                        ++it;
@@ -311,15 +311,15 @@ ex mul::coeff(const symbol & s, int n) const
                coeffseq.push_back(overall_coeff);
                return (new mul(coeffseq))->setflag(status_flags::dynallocated);
        }
-                
+       
        epvector::const_iterator it=seq.begin();
-       bool coeff_found=0;
+       bool coeff_found = 0;
        while (it!=seq.end()) {
-               ex t=recombine_pair_to_ex(*it);
-               ex c=t.coeff(s,n);
+               ex t = recombine_pair_to_ex(*it);
+               ex c = t.coeff(s,n);
                if (!c.is_zero()) {
                        coeffseq.push_back(c);
-                       coeff_found=1;
+                       coeff_found = 1;
                } else {
                        coeffseq.push_back(t);
                }