Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b7a289

Browse filesBrowse files
authored
Update Poly.h
quoRem --> quoRemSlow
1 parent 5c4becd commit 8b7a289
Copy full SHA for 8b7a289

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
  • Implementations/content/numerical/Polynomials
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎Implementations/content/numerical/Polynomials/Poly.h

Copy file name to clipboardExpand all lines: Implementations/content/numerical/Polynomials/Poly.h
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ poly operator*(const poly& l, const poly& r) {
5858
}
5959
poly& operator*=(poly& l, const poly& r) { return l = l*r; }
6060

61-
pair<poly,poly> quoRem(poly a, poly b) {
61+
pair<poly,poly> quoRemSlow(poly a, poly b) {
6262
remz(a); remz(b); assert(sz(b));
6363
T lst = b.bk, B = T(1)/lst; each(t,a) t *= B;
6464
each(t,b) t *= B;
@@ -69,11 +69,11 @@ pair<poly,poly> quoRem(poly a, poly b) {
6969
return {q,a}; // quotient, remainder
7070
}
7171
poly operator%(const poly& a, const poly& b) {
72-
return quoRem(a,b).s; }
72+
return quoRemSlow(a,b).s; }
7373
/**poly operator/(const poly& a, const poly& b) {
74-
return quoRem(a,b).f; }
74+
return quoRemSlow(a,b).f; }
7575
poly a = {1,3,5,8,6,0,0,0,0}, b = {1,5,1};
76-
ps(quoRem(a,b)); a = 2*a, b = 2*b; ps(quoRem(a,b));
76+
ps(quoRemSlow(a,b)); a = 2*a, b = 2*b; ps(quoRemSlow(a,b));
7777
poly gcd(poly a, poly b) { return b == poly{} ? a : gcd(b,a%b); }*/
7878
T resultant(poly a, poly b) { // R(A,B)
7979
// =b_m^n*prod_{j=1}^mA(mu_j)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.