-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
series yields wrong result #12589
Comments
This comment has been minimized.
This comment has been minimized.
comment:6
Still there in 6.6. |
Stopgaps: todo |
comment:9
This looks like an int overflow problem. A more minimal case is:
EDIT: Note that log_2(7635497409) = 32.8... |
comment:10
Note that in Pynac/GiNaC the |
comment:11
Replying to @rwst:
Being stucked with this bug is not an option either... What else can we do? |
comment:12
Replying to @dkrenn:
Mathematically you are dealing with so-called "lacunar" or "super-sparse" series. Changing from 32bit to 64bit does not resolve it in principle if it were possible with existing Sage functionality, try this:
so apparently Sage's sparse power series ring can represent monomials with bigint degree but not a bigint series order term. Representing or computing a full series lastly can involve memory problems for whatever reason. However, if you request |
comment:13
I wrote earlier:
Maybe it is possible to check the expression for bigint exponents and, if so, call a special algorithm like lazy series. There are likely to be special cases of series expansion algorithms in the future, anyway, e.g. a call to fast univariate expansion via flint. |
comment:14
Replying to @rwst:
Presently, we are silently getting wrong results, though. A good step forward would be if we'd get an "overflow error" rather than a series expansion that seems to have 0-terms in order 0, 1. |
This comment has been minimized.
This comment has been minimized.
comment:16
Replying to @dkrenn:
We could adapt a polynomial/series package that supports unlimited exponents: |
comment:17
The behaviour of this test case changed somewhat. With Sage-8.1.beta6 it takes minutes to output |
comment:18
Replying to @dkrenn:
Actually, Pynac master now supports taking any non-symbolic real degree. I'm not sure atm how this can be used to make progress with this ticket. |
comment:19
Replying to @rwst:
However 2. can only be resolved with a dedicated sparse polynomial package. Actually if 1. #23925 is done; and 2. Pynac normalizes rational functions before developing series; then this ticket can be considered done because we will get a SIGABRT exception because of memory error from Singular+FLINT. This would avoid setting a hard limit on exponents, shifting the responsibility to the polynomial package. |
This comment has been minimized.
This comment has been minimized.
comment:21
There is need for a hard limit. FLINT allows only long exponents in functions accessing their Note that expansion of polynomials only uses Singular above a certain size, so e.g. expansion of small products with less than 400 terms overall works fine:
|
comment:22
With pynac-0.7.12 we have now:
Note that |
The following was posted on the public bug reports from the notebook interface by Clemens Heuberger on 1/4/2011 and on sage-support. In the latter other code examples were posted.
f.series(q,2)
for thef
defined below yieldsOrder(q^2)
which is incorrect, asf.subs(q=0)
equals1
(which is correct).CC: @cheuberg @rwst
Component: symbolics
Keywords: series, order, symbolics
Stopgaps: todo
Issue created by migration from https://trac.sagemath.org/ticket/12589
The text was updated successfully, but these errors were encountered: