Changeset 9442dc in git
- Timestamp:
- Jun 26, 1998, 6:14:26 PM (26 years ago)
- Branches:
- (u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
- Children:
- 2266ecccffc7f96b6aeac2e03cb376d4dca7573d
- Parents:
- f23b9a9642dd6bf45b6a2fe22d7942d7e05f6999
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/int_pp.cc
rf23b9a r9442dc 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: int_pp.cc,v 1. 8 1997-12-17 11:42:41schmidt Exp $ */2 /* $Id: int_pp.cc,v 1.9 1998-06-26 16:14:26 schmidt Exp $ */ 3 3 4 4 #include <config.h> … … 125 125 #endif /* NOSTREAMIO */ 126 126 127 bool InternalPrimePower::isZero() const 128 { 129 return mpz_cmp_si( &thempi, 0 ) == 0; 130 } 131 132 bool InternalPrimePower::isOne() const 133 { 134 return mpz_cmp_si( &thempi, 1 ) == 0; 135 } 127 //{{{ bool InternalPrimePower::isOne, isZero () const 128 // docu: see CanonicalForm::isOne(), CanonicalForm::isZero() 129 bool 130 InternalPrimePower::isOne () const 131 { 132 return mpz_cmp_ui( &thempi, 1 ) == 0; 133 } 134 135 bool 136 InternalPrimePower::isZero () const 137 { 138 return mpz_sgn( &thempi ) == 0; 139 } 140 //}}} 136 141 137 142 bool InternalPrimePower::is_imm() const … … 156 161 } 157 162 158 InternalCF* InternalPrimePower::neg() 163 //{{{ InternalCF * InternalPrimePower::neg () 164 // docu: see CanonicalForm::operator -() 165 InternalCF * 166 InternalPrimePower::neg () 159 167 { 160 168 if ( getRefCount() > 1 ) { … … 164 172 mpz_sub( &dummy, &primepow, &thempi ); 165 173 return new InternalPrimePower( dummy ); 166 } 167 else { 174 } else { 168 175 mpz_sub( &thempi, &primepow, &thempi ); 169 176 return this; 170 177 } 171 178 } 179 //}}} 172 180 173 181
Note: See TracChangeset
for help on using the changeset viewer.