-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add benchmarks for GCD when input is Gaussian Integer #97
Conversation
@oscarbenjamin These errors occurs, Do We need to change these?
|
This is because of the new asv release. I'm not sure if this is fixed now. |
Looks like it still fails. |
The domain should just be returned by the
|
def make_poly(self, n): | ||
x, y1, y2, y3, y4, y5, y6 = syms = symbols("x y1 y2 y3 y4 y5 y6") | ||
x, y1, y2, y3, y4, y5 = syms = symbols("x y1 y2 y3 y4 y5") | ||
|
||
d = (-x + I*y1)*n | ||
|
||
f = ((-I*(x)**4 - (x)**3 + I*(x)**2 + (x) + -I*(y2 + 1) - y1*(y3 + 1) - | ||
2*y1*y2 - 5*y1*(y2 + 1) - y1*(y3 + 1) - | ||
I*y4 + I*y6 + -y1*(y2 + 1) - 3*y1*y3 - y1*(y3 + 1) - I*y5 - | ||
2*y1*y2 - 7*y1*(y2 + 1) - 3*y1*y3 - 5*y1*(y3 + 1) - I*(y4 + y5) - | ||
y1*y2 - 2*y1*(y2 + 1) - y1*y3 - 3*y1*(y3 + 1) - I*(-y4 + y5) + | ||
y1*(y2 + 1) + -y1*y2 - 5*y1*y3 - y1*(y3 + 1) - I*y5 + -I*y6 - | ||
3*y1*(y2 + 1) - y1*y3 - 7*y1*(y3 + 1) + I*y5 + -y1*y2 + y1*(y3 + 1) | ||
+ 5*y1*(y3 + 1) + -y1*y2 - y1*(y2 + 1) - y1*y3 + y1*y2 + y1*y3 + | ||
7*y1*(y3 + 1) + y1*(y2 + 1) + y1*y3)*d) | ||
|
||
g = ((-I*(x)**4 - (x)**3 + I*(x)**2 + (x) + -I*(y2 + 1) - y1*(y3 + 1) - | ||
7*y1*y2 - y1*(y2 + 1) - y1*(y3 + 1) - | ||
I*y4 + I*y6 - y1*(y2 + 1) - 3*y1*y3 - y1*(y3 + 1) - I*y5 - | ||
y1*y2 - 7*y1*(y2 + 1) - 5*y1*y3 - 2*y1*(y3 + 1) - I*(y4 + y5) - | ||
3*y1*y2 - 5*y1*(y2 + 1) - 9*y1*y3 - 7*y1*(y3 + 1) - | ||
I*(-y4 + y5) + y1*(y2 + 1) + -y1*y2 - y1*y3 - y1*(y3 + 1) - | ||
I*y5 + -I*y6 + -y1*(y2 + 1) - y1*y3 - y1*(y3 + 1) + I*y5 - 3*y1*y2 | ||
+ y1*(y3 + 1) + y1*(y3 + 1) + -y1*y2 - y1*(y2 + 1) - y1*y3 + | ||
y1*y2 + y1*y3 + y1*(y3 + 1) + y1*(y2 + 1) + y1*y3)*d) | ||
f = (-I*x**n - 2*y1*y3 - I*(-y2 + n) - I*(y4 + y5))*d | ||
|
||
return f, g, d, syms, ZZ_I | ||
g = (-I*x**(n + 1) - 2*y1*(y3 + n) - I*(-y2 + n + 1) - I*(y4 + y5))*d | ||
|
||
return f, g, d, syms, ZZ_I |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has the example been changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the revised example, I identified duplicate terms, and when I simplified the expression, it resulted in a shorter and more concise form
Why is sympy_benchmarks/benchmarks/polys.py Line 325 in 6aac380
|
This PR adds the benchmarks for the subresultants PRS method.
Related Issue:
#88
See sympy/sympy#25442