Skip to content

Commit

Permalink
qualify gcd calls
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot committed Feb 28, 2024
1 parent 1847a46 commit 2504625
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Polynomial/test/Polynomial/test_polynomial.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,12 @@ void unigcdres(CGAL::Field_tag) {
h /= h.unit_part();
POLY d;

d = gcd(f, g);
d = CGAL::gcd(f, g);
assert( d == POLY(NT(1)) );
assert( prs_resultant(f, g) == NT(230664271L)/NT(759375L) ); // Maple

POLY fh(f*h), gh(g*h);
d = gcd(fh, gh);
d = CGAL::gcd(fh, gh);
assert( d == h );
assert( prs_resultant(fh, gh) == NT(0) );

Expand All @@ -429,12 +429,12 @@ void unigcdres(CGAL::Integral_domain_tag) {
POLY d;
NT c(42);

d = gcd((-c)*f, c*g);
d = CGAL::gcd((-c)*f, c*g);
assert( d == POLY(c) );
assert( prs_resultant(f, g) == NT(230664271L) ); // as computed by Maple

POLY fh(f*h), gh(g*h);
d = gcd((-c)*fh, c*gh);
d = CGAL::gcd((-c)*fh, c*gh);
assert( d == c*h );
assert( prs_resultant(fh, gh) == NT(0) );

Expand Down Expand Up @@ -476,14 +476,14 @@ void bigcdres(CGAL::Field_tag) {
h /= h.unit_part();
POLY2 d;

d = gcd(f, g);
d = CGAL::gcd(f, g);
assert( d == POLY2(1) );
POLY1 r(NT(1444), NT(-1726), NT(3295), NT(-2501), NT(560));
r /= NT(225);
assert( prs_resultant(f, g) == r ); // says Maple

POLY2 fh(f*h), gh(g*h);
d = gcd(fh, gh);
d = CGAL::gcd(fh, gh);
assert( d == h );
assert( prs_resultant(fh, gh) == POLY1(0) );
}
Expand All @@ -502,13 +502,13 @@ void bigcdres(CGAL::Integral_domain_tag) {
POLY1(NT(9), NT(7)), POLY1(NT(7)));
POLY2 c(42), d;

d = gcd(-c*f, c*g);
d = CGAL::gcd(-c*f, c*g);
assert( d == c );
POLY1 r(NT(1444), NT(-1726), NT(3295), NT(-2501), NT(560));
assert( prs_resultant(f, g) == r ); // says Maple

POLY2 fh(f*h), gh(g*h);
d = gcd(-c*fh, c*gh);
d = CGAL::gcd(-c*fh, c*gh);
assert( d == c*h );
assert( prs_resultant(fh, gh) == POLY1(0) );
}
Expand Down

0 comments on commit 2504625

Please sign in to comment.