Changeset 47dc5ea in git
- Timestamp:
- Mar 5, 2012, 10:09:04 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 69fdf90b08eb79adafd1cd78ccee33b8748b3c85
- Parents:
- c729f26220e3c5188b3151f01a80a302441e8dfd
- git-author:
- Martin Lee <martinlee84@web.de>2012-03-05 22:09:04+01:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-04-04 14:42:26+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/facMul.cc
rc729f2 r47dc5ea 404 404 (hasFirstAlgVar (F, alpha) || hasFirstAlgVar (G, alpha))) 405 405 { 406 if (b.getp() != 0) 407 { 408 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 409 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 410 ZZ_pE::init (NTLmipo); 411 ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo); 412 ZZ_pEX NTLf= convertFacCF2NTLZZ_pEX (F, NTLmipo); 413 mul (NTLf, NTLf, NTLg); 414 return b (convertNTLZZ_pEX2CF (NTLf, F.mvar(), alpha)); 415 } 406 416 CanonicalForm result= mulFLINTQa (F, G, alpha); 407 417 return result; … … 427 437 #endif 428 438 if (b.getp() != 0) 439 { 440 if (!F.inBaseDomain() && !G.inBaseDomain()) 441 { 442 if (hasFirstAlgVar (G, alpha) || hasFirstAlgVar (F, alpha)) 443 { 444 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 445 if (F.inCoeffDomain() && !G.inCoeffDomain()) 446 { 447 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 448 ZZ_pE::init (NTLmipo); 449 ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo); 450 ZZ_pX NTLf= convertFacCF2NTLZZpX (F); 451 mul (NTLg, to_ZZ_pE (NTLf), NTLg); 452 return b (convertNTLZZ_pEX2CF (NTLg, G.mvar(), alpha)); 453 } 454 else if (!F.inCoeffDomain() && G.inCoeffDomain()) 455 { 456 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 457 ZZ_pE::init (NTLmipo); 458 ZZ_pX NTLg= convertFacCF2NTLZZpX (G); 459 ZZ_pEX NTLf= convertFacCF2NTLZZ_pEX (F, NTLmipo); 460 mul (NTLf, NTLf, to_ZZ_pE (NTLg)); 461 return b (convertNTLZZ_pEX2CF (NTLf, F.mvar(), alpha)); 462 } 463 else 464 { 465 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 466 ZZ_pE::init (NTLmipo); 467 ZZ_pX NTLg= convertFacCF2NTLZZpX (G); 468 ZZ_pX NTLf= convertFacCF2NTLZZpX (F); 469 ZZ_pE result; 470 mul (result, to_ZZ_pE (NTLg), to_ZZ_pE (NTLf)); 471 return b (convertNTLZZpX2CF (rep (result), alpha)); 472 } 473 } 474 } 429 475 return b (F*G); 476 } 430 477 return F*G; 431 478 } … … 512 559 else 513 560 { 561 if (b.getp() != 0) 562 { 563 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 564 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 565 ZZ_pE::init (NTLmipo); 566 ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo); 567 ZZ_pEX NTLf= convertFacCF2NTLZZ_pEX (F, NTLmipo); 568 rem (NTLf, NTLf, NTLg); 569 return b (convertNTLZZ_pEX2CF (NTLf, F.mvar(), alpha)); 570 } 514 571 CanonicalForm Q, R; 515 572 newtonDivrem (F, G, Q, R); … … 580 637 { 581 638 if (b.getp() != 0) 639 { 640 if (!F.inBaseDomain() || !G.inBaseDomain()) 641 { 642 Variable alpha; 643 hasFirstAlgVar (F, alpha); 644 hasFirstAlgVar (G, alpha); 645 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 646 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 647 ZZ_pE::init (NTLmipo); 648 ZZ_pX NTLg= convertFacCF2NTLZZpX (G); 649 ZZ_pX NTLf= convertFacCF2NTLZZpX (F); 650 ZZ_pE result; 651 div (result, to_ZZ_pE (NTLg), to_ZZ_pE (NTLf)); 652 return b (convertNTLZZpX2CF (rep (result), alpha)); 653 } 582 654 return b(div (F,G)); 655 } 583 656 return div (F, G); 584 657 } … … 586 659 { 587 660 if (b.getp() != 0) 661 { 662 if (!G.inBaseDomain()) 663 { 664 Variable alpha; 665 hasFirstAlgVar (G, alpha); 666 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 667 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 668 ZZ_pE::init (NTLmipo); 669 ZZ_pX NTLg= convertFacCF2NTLZZpX (G); 670 ZZ_pEX NTLf= convertFacCF2NTLZZ_pEX (F, NTLmipo); 671 div (NTLf, NTLf, to_ZZ_pE (NTLg)); 672 return b (convertNTLZZ_pEX2CF (NTLf, F.mvar(), alpha)); 673 } 588 674 return b(div (F,G)); 675 } 589 676 return div (F, G); 590 677 } … … 614 701 else 615 702 { 703 if (b.getp() != 0) 704 { 705 ZZ_p::init (convertFacCF2NTLZZ (b.getpk())); 706 ZZ_pX NTLmipo= to_ZZ_pX (convertFacCF2NTLZZX (getMipo (alpha))); 707 ZZ_pE::init (NTLmipo); 708 ZZ_pEX NTLg= convertFacCF2NTLZZ_pEX (G, NTLmipo); 709 ZZ_pEX NTLf= convertFacCF2NTLZZ_pEX (F, NTLmipo); 710 div (NTLf, NTLf, NTLg); 711 return b (convertNTLZZ_pEX2CF (NTLf, F.mvar(), alpha)); 712 } 616 713 CanonicalForm Q; 617 714 newtonDiv (F, G, Q);
Note: See TracChangeset
for help on using the changeset viewer.