Changeset bbf7a8 in git
- Timestamp:
- May 18, 2010, 3:21:14 PM (14 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 719c71a80093859b748e9f65da9029c763e2f8d6
- Parents:
- b6f4bd27ea728a5ffe0529654d02f15c6f6fa2fe
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2010-05-18 15:21:14+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:52:57+01:00
- Location:
- coeffs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/coeffs.h
rb6f4bd2 rbbf7a8 127 127 /// Inline: a := b 128 128 void (*nInpMult)(number &a, number b, const coeffs r); 129 number (*nInit_bigint)(number i, const coeffs src, const coeffs dummy); 129 /// maps the bigint i into the coeffs dst 130 number (*nInit_bigint)(number i, const coeffs dst); 130 131 131 132 #ifdef LDEBUG -
coeffs/longrat.cc
rb6f4bd2 rbbf7a8 293 293 } 294 294 number re=nlRInit(1); 295 mpz_set_d( &(re->z),f);295 mpz_set_d(re->z,f); 296 296 memcpy(&(re->n),&h1,sizeof(h1)); 297 297 re->s=0; /* not normalized */ … … 370 370 if (res->s==0) 371 371 nlNormalize(res,dst); 372 else if (mpz_size1( &res->z)<=MP_SMALL)372 else if (mpz_size1(res->z)<=MP_SMALL) 373 373 { 374 374 // res is new, res->ref is 1 … … 2456 2456 return z; 2457 2457 } 2458 2459 static BOOLEAN nlCoeffsEqual(const coeffs r, n_coeffType n, int parameter) 2460 { 2461 /* test, if r is an instance of nInitCoeffs(n,parameter) */ 2462 return (n==n_Q); 2463 } 2464 2458 2465 void nlInitChar(coeffs r, int ch) 2459 2466 { 2460 r->cfInitChar=nlInitChar;2467 //r->cfInitChar=nlInitChar; 2461 2468 r->cfKillChar=NULL; 2462 2469 r->cfSetChar=NULL; 2463 2464 r->cfDelete= nlDelete; 2465 r->nNormalize=nlNormalize; 2466 r->cfInit = nlInit; 2467 r->n_Int = nlInt; 2470 r->nCoeffIsEqual=nlCoeffsEqual; 2471 2472 r->nMult = nlMult; 2473 r->nSub = nlSub; 2468 2474 r->nAdd = nlAdd; 2469 r->nSub = nlSub;2470 r->nMult = nlMult;2471 r->nInpMult=nlInpMult;2472 2475 r->nDiv = nlDiv; 2473 r->nExactDiv= nlExactDiv;2474 2476 r->nIntDiv= nlIntDiv; 2475 2477 r->nIntMod= nlIntMod; 2478 r->nExactDiv= nlExactDiv; 2479 r->cfInit = nlInit; 2480 r->nPar = ndPar; 2481 r->nParDeg = ndParDeg; 2482 r->nSize = nlSize; 2483 r->n_Int = nlInt; 2484 #ifdef HAVE_RINGS 2485 r->nDivComp = NULL; // only for ring stuff 2486 r->nIsUnit = NULL; // only for ring stuff 2487 r->nGetUnit = NULL; // only for ring stuff 2488 r->nExtGcd = NULL; // only for ring stuff 2489 #endif 2476 2490 r->nNeg = nlNeg; 2477 2491 r->nInvers= nlInvers; 2478 r->cfCopy = nlCopy; 2492 r->cfCopy = nl_Copy; 2493 r->nRePart = nl_Copy; 2494 r->nImPart = ndReturn0; 2495 r->cfWrite = nlWrite; 2496 r->nRead = nlRead; 2497 r->nNormalize=nlNormalize; 2479 2498 r->nGreater = nlGreater; 2499 #ifdef HAVE_RINGS 2500 r->nDivBy = NULL; // only for ring stuff 2501 #endif 2480 2502 r->nEqual = nlEqual; 2481 2503 r->nIsZero = nlIsZero; … … 2483 2505 r->nIsMOne = nlIsMOne; 2484 2506 r->nGreaterZero = nlGreaterZero; 2485 r->cfWrite = nlWrite;2486 r->nRead = nlRead;2487 2507 r->nPower = nlPower; 2508 r->cfGetDenom = nlGetDenom; 2509 r->cfGetNumerator = nlGetNumerator; 2488 2510 r->nGcd = nlGcd; 2489 2511 r->nLcm = nlLcm; 2512 r->cfDelete= nlDelete; 2490 2513 r->cfSetMap = nlSetMap; 2491 r->n Size = nlSize;2492 r-> cfGetDenom = nlGetDenom;2493 r-> cfGetNumerator = nlGetNumerator;2514 r->nName = ndName; 2515 r->nInpMult=nlInpMult; 2516 r->nInit_bigint=nl_Copy; 2494 2517 #ifdef LDEBUG 2518 // debug stuff 2495 2519 r->nDBTest=nlDBTest; 2496 2520 #endif 2521 2522 // the variables: 2523 r->nNULL = INT_TO_SR(0); 2524 r->type = n_Q; 2525 r->ch = 0; 2526 r->has_simple_Alloc=FALSE; 2527 r->has_simple_Inverse=FALSE; 2497 2528 } 2498 2529 #if 0 -
coeffs/numbers.cc
rb6f4bd2 rbbf7a8 113 113 114 114 // not yet ready: 115 /*--------------------- Q -----------------*/116 if (nField_is_Q(r))117 {118 r->nInit_bigint=nl_Copy;119 }120 115 #if 0 /* vertagt*/ 121 116 /*--------------------- Q_a/ Zp_a -----------------*/
Note: See TracChangeset
for help on using the changeset viewer.