Changeset f9bd3d in git
- Timestamp:
- Feb 16, 2012, 5:14:39 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- d3d3168d8614852a68310698973f95ecc6a54139
- Parents:
- 1ade963c1847f591acd6148d1fd1e76d97c688fd
- git-author:
- Martin Lee <martinlee84@web.de>2012-02-16 17:14:39+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
r1ade96 rf9bd3d 407 407 } 408 408 else if (!F.inCoeffDomain() && !G.inCoeffDomain()) 409 { 410 if (b.getp() != 0) 411 return b (mulFLINTQ (F, G)); 409 412 return mulFLINTQ (F, G); 413 } 410 414 #endif 415 if (b.getp() != 0) 416 return b (F*G); 411 417 return F*G; 412 418 } … … 451 457 { 452 458 if (F.inCoeffDomain() && G.isUnivariate()) 459 { 460 if (b.getp() != 0) 461 return b(F); 453 462 return F; 463 } 454 464 else if (F.inCoeffDomain() && G.inCoeffDomain()) 465 { 466 if (b.getp() != 0) 467 return b(F%G); 455 468 return mod (F, G); 469 } 456 470 else if (F.isUnivariate() && G.inCoeffDomain()) 471 { 472 if (b.getp() != 0) 473 return b(F%G); 457 474 return mod (F,G); 475 } 458 476 459 477 if (getCharacteristic() == 0) … … 462 480 Variable alpha; 463 481 if (!hasFirstAlgVar (F, alpha) && !hasFirstAlgVar (G, alpha)) 482 { 483 if (b.getp() != 0) 484 { 485 ZZ NTLpk= power_ZZ (b.getp(), b.getk()); 486 ZZ_p::init (NTLpk); 487 ZZX ZZf= convertFacCF2NTLZZX (F); 488 ZZX ZZg= convertFacCF2NTLZZX (G); 489 ZZ_pX NTLf= to_ZZ_pX (ZZf); 490 ZZ_pX NTLg= to_ZZ_pX (ZZg); 491 rem (NTLf, NTLf, NTLg); 492 return b (convertNTLZZX2CF (to_ZZX (NTLf), F.mvar())); 493 } 464 494 return modFLINTQ (F, G); 495 } 465 496 else 466 497 { … … 470 501 } 471 502 #else 503 if (b.getp() != 0) 504 { 505 ZZ NTLpk= power_ZZ (b.getp(), b.getk()); 506 ZZ_p::init (NTLpk); 507 ZZX ZZf= convertFacCF2NTLZZX (F); 508 ZZX ZZg= convertFacCF2NTLZZX (G); 509 ZZ_pX NTLf= to_ZZ_pX (ZZf); 510 ZZ_pX NTLg= to_ZZ_pX (ZZg); 511 rem (NTLf, NTLf, NTLg); 512 return b (convertNTLZZX2CF (to_ZZX (NTLf), F.mvar())); 513 } 472 514 return mod (F, G); 473 515 #endif … … 514 556 { 515 557 if (F.inCoeffDomain() && G.isUnivariate()) 558 { 559 if (b.getp() != 0) 560 return b(F); 516 561 return F; 562 } 517 563 else if (F.inCoeffDomain() && G.inCoeffDomain()) 564 { 565 if (b.getp() != 0) 566 return b(div (F,G)); 518 567 return div (F, G); 568 } 519 569 else if (F.isUnivariate() && G.inCoeffDomain()) 520 return div (F,G); 570 { 571 if (b.getp() != 0) 572 return b(div (F,G)); 573 return div (F, G); 574 } 521 575 522 576 if (getCharacteristic() == 0) … … 525 579 Variable alpha; 526 580 if (!hasFirstAlgVar (F, alpha) && !hasFirstAlgVar (G, alpha)) 581 { 582 if (b.getp() != 0) 583 { 584 ZZ NTLpk= power_ZZ (b.getp(), b.getk()); 585 ZZ_p::init (NTLpk); 586 ZZX ZZf= convertFacCF2NTLZZX (F); 587 ZZX ZZg= convertFacCF2NTLZZX (G); 588 ZZ_pX NTLf= to_ZZ_pX (ZZf); 589 ZZ_pX NTLg= to_ZZ_pX (ZZg); 590 div (NTLf, NTLf, NTLg); 591 return b (convertNTLZZX2CF (to_ZZX (NTLf), F.mvar())); 592 } 527 593 return divFLINTQ (F,G); 594 } 528 595 else 529 596 { … … 533 600 } 534 601 #else 602 if (b.getp() != 0) 603 { 604 ZZ NTLpk= power_ZZ (b.getp(), b.getk()); 605 ZZ_p::init (NTLpk); 606 ZZX ZZf= convertFacCF2NTLZZX (F); 607 ZZX ZZg= convertFacCF2NTLZZX (G); 608 ZZ_pX NTLf= to_ZZ_pX (ZZf); 609 ZZ_pX NTLg= to_ZZ_pX (ZZg); 610 div (NTLf, NTLf, NTLg); 611 return b (convertNTLZZX2CF (to_ZZX (NTLf), F.mvar())); 612 } 535 613 return div (F, G); 536 614 #endif
Note: See TracChangeset
for help on using the changeset viewer.