Changeset dc89d7 in git
- Timestamp:
- Mar 27, 2019, 1:36:45 PM (4 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 3f34dc89054e843e5e05cc00a73dba2270ad5886
- Parents:
- a0351f4ddb55f888234786beb265c2d73504e810
- Location:
- libpolys/polys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/flintconv.cc
ra0351f4 rdc89d7 55 55 number convFlintNSingN (fmpq_t f, const coeffs cf) 56 56 { 57 #if __FLINT_RELEASE > 20502 57 58 number z; 58 59 if (nCoeff_is_Q(cf)) … … 77 78 n_Delete(&na,cf); 78 79 n_Delete(&nb,cf); 80 mpz_clear(a); 81 mpz_clear(b); 79 82 } 80 83 n_Normalize(z,cf); 81 84 return z; 85 #else 86 WerrorS("not implemented"); 87 return NULL; 88 #endif 82 89 } 83 90 … … 128 135 } 129 136 137 void convSingNFlintNN(fmpq_t re, fmpq_t im, number n, const coeffs cf) 138 { 139 number n_2=n_RePart(n,cf); 140 convSingNFlintN(re,n_2,cf); 141 n_Delete(&n_2,cf); 142 n_2=n_ImPart(n,cf); 143 convSingNFlintN(im,n_2,cf); 144 n_Delete(&n_2,cf); 145 } 146 130 147 void convSingPFlintP(fmpq_poly_t res, poly p, const ring r) 131 148 { … … 140 157 fmpq_poly_set_coeff_fmpq(res,p_GetExp(p,1,r),c); 141 158 fmpq_clear(c); 159 pIter(p); 160 } 161 } 162 163 void convSingImPFlintP(fmpq_poly_t res, poly p, const ring r) 164 { 165 int d=p_GetExp(p,1,r); 166 fmpq_poly_init2(res,d+1); 167 _fmpq_poly_set_length (res, d + 1); 168 while(p!=NULL) 169 { 170 number n=n_ImPart(pGetCoeff(p),r->cf); 171 fmpq_t c; 172 convSingNFlintN(c,n,r->cf); 173 fmpq_poly_set_coeff_fmpq(res,p_GetExp(p,1,r),c); 174 fmpq_clear(c); 175 n_Delete(&n,r->cf); 142 176 pIter(p); 143 177 } -
libpolys/polys/flintconv.h
ra0351f4 rdc89d7 44 44 void convSingNFlintN(fmpz_t f, number n); 45 45 void convSingNFlintN(fmpq_t f, number n, const coeffs cf); 46 void convSingNFlintNN(fmpq_t re, fmpq_t im, number n, const coeffs cf); 46 47 number convFlintNSingN (fmpz_t f); 47 48 number convFlintNSingN (fmpq_t f, const coeffs cf); 48 49 void convSingPFlintP(fmpq_poly_t res, poly p, const ring r); 50 void convSingImPFlintP(fmpq_poly_t res, poly p, const ring r); 49 51 poly convFlintPSingP(fmpq_poly_t f, const ring r); 50 52
Note: See TracChangeset
for help on using the changeset viewer.