Hi Waldek,

I need some help or at least a hint.

I'm currently investigating why I got...

On 02/18/2016 12:47 AM, Ralf Hemmecke wrote:
> Heap exhausted during garbage collection: 608 bytes available, 992
> requested.

It is anyway strange that the problem appears during garbage collection,
but that doesn't seem to be the real problem, since I don't think that I
am should be using that much memory.

I recomputed mod 1009 and the problem still appears. In fact, at the
moment I am probably very close. It looks like the series implementation
(multiplication) is troublesome.

At some point in the computation, I multiply a laurent series of order
-2 with itself. And, when printed it shows me something of order -2827.

Let me explain the output.

[MEM t, q^(-2)+O(q^(-1))]         -- original series
[MEM gt, 2]                       -- its grade (= -ord)
[MEM t2, O(q^(-2827))]            -- this is how t2:=t*t is printed
[MEM gt2, 4]                      -- grade of t*t
[MEM t2-2, q^(-4)+O(q^(-3))]      -- print t2 again
[MEM lct2, 1]                     -- leading coefficient of t2
[MEM t2, [2, 0, 5, 4, 36, 36, 72, 957]] -- the first 8 coefficients
[MEM t4, O(q^(-5659))]            -- t4=t2*t2

The thing is that t is of Finite0Series, which is (in fact) just this

-------------------------------
Finite0Series(C: CommutativeRing, var: Symbol, cen: C): Exports == Impl
where
  UTS ==> UnivariateTaylorSeries(C, var, cen)
  ULS ==> UnivariateLaurentSeries(C, var, cen)
  Exports ==> Join(UnivariateLaurentSeriesConstructorCategory(C, UTS),
                   QEtaAlgebra C) with
    coerce: Variable(var) -> %
      ++ \spad{coerce(var)} converts the series variable \spad{var} into a
      ++ Laurent series.
    coerce: ULS -> %
  Impl ==> ULS add
    Rep ==> ULS
    coerce(v : Variable(var)): % == monomial(1, 1)
    coerce(s: ULS): % == per s
    zero?(x: %): Boolean == order(x, 1) > 0
    qetaGrade(x: %): Z == -order(x, 0)
    qetaCoefficient(x: %, k: Z): C == coefficient(x, -k)
    qetaLeadingCoefficient(x: %): C == leadingCoefficient x
-------------------------------

So the multiplication is identical to UnivariateLaurentSeries.
After calling the "order" function on t2, the "true" order of t2 should
be stored in the datastructure of t2, after it figured out that some
coefficient is non-zero, right?

I really don't understand why t4=t2*t2 still prints as O(q^(-5659)). The
program crashes with the "heap exhausted" error while computing the
order of t4.

I'll now dig deeper into the code, but I don't think it should happen
that the product of two series of order -2 should result in something
that believes its order might be -2827. Or am I wrong?

Help!

Ralf

-- 
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