On 11/29/18 3:48 AM, Andrey G. Grozin wrote:
> On Wed, 28 Nov 2018, Ralf Hemmecke wrote:
>> Suppose, p is an infinite powerseries and p' is it's inverse. Then
>> c=p*p' is a series that only has zero coefficients after the constant
>> term.
>>
>> Then creating the stream of (coefficient, exponent)-pairs, i.e. calling
>> terms(c) leads to a stream that cannot compute its second entry.
>>
>> http://fricas.github.io/api/UnivariatePowerSeriesCategory.html#l-univariate-power-series-category-terms
>>
> I suppose the same is true for sinx^2+cosx^2, where sinx and cosx are
> the series for sin(x) and cos(x), right?

>From the type of series that you get, certainly. But the problem ist not
the series itself, it comes from what "terms" has to return. In other
words, if for c=p*p' or c=sinx^2+cosx^2, then one can compute
coefficient(c, n) for any natural number n without any problem. The
internal representation of the series makes this possible even in the
case of SparseUnivariateTaylorSeries, which is supposed to store only
non-zero terms. The trick is that internally, it stores additionally a
value that corresponds to the biggest power it is ever asked for.
Since that entry is ignored by the returned stream of "terms", the above
problem arises. It's, of course, bad for naive programming, but unavoidable.

So instead of "series terms c", one would have to do something like
"series coefficients c". Bad luck, if the (other) series you work with
are very very sparse. My original problem, for example, was to create
from f(n) a subseries f(m*n) for some natural number m.

> 
> Andrey
> 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to