Macaulay2 Engine
Loading...
Searching...
No Matches

◆ testIsRelativelyPrime()

void testIsRelativelyPrime ( )

Definition at line 343 of file franzi-brp-test.cpp.

344{
345 BRP f = BRP(2) * BRP(8) + BRP(7);
346 if (BRP::isRelativelyPrime(f.LT(), BRP(8).LT()))
347 {
348 cout << "error" << endl;
349 }
350 if (BRP::isRelativelyPrime(BRP(8).LT(), f.LT()))
351 {
352 cout << "error" << endl;
353 }
354 if (BRP::isRelativelyPrime(BRP(2).LT(), f.LT()))
355 {
356 cout << "error" << endl;
357 }
358 if (!BRP::isRelativelyPrime(f.LT(), BRP(1).LT()))
359 {
360 cout << "error" << endl;
361 }
362 if (!BRP::isRelativelyPrime(BRP(1).LT(), f.LT()))
363 {
364 cout << "error" << endl;
365 }
366 if (!BRP::isRelativelyPrime(BRP(1).LT(), BRP(0).LT()))
367 { // x, 1
368 cout << "error" << endl;
369 }
370 if (!BRP::isRelativelyPrime(f.LT(), BRP(0).LT()))
371 { // f, 1
372 cout << "error" << endl;
373 }
374}
brMonomial LT() const
static bool isRelativelyPrime(const brMonomial &a, const brMonomial &b)
Boolean (F_2-coefficient) polynomial stored as an ordered list of square-free monomials.
const int LT
Definition style.hpp:39

References BRP::isRelativelyPrime(), BRP::LT(), and LT.

Referenced by main().