Hi Martin, hi Waldek,

I just stumpled over the behaviour below.
The result is not wrong in the case of algebraic numbers, but I wonder why the resulting recurrence is not "normalized" in some way.

OK, one cannot simply take out the "gcd" of the coefficients, because that wouldn´t work for AN without recognizing that the numbers in the recurrence are actually integers.

Can you explain your design decision or is it just an oversight and there is room for improvement?

Ralf


%%% (1) -> cq := [(1/2)^k for k in 0..20]

   (1)
       1  1  1   1   1   1   1    1    1     1     1     1     1     1
   [1, -, -, -, --, --, --, ---, ---, ---, ----, ----, ----, ----, -----,
       2  4  8  16  32  64  128  256  512  1024  2048  4096  8192  16384
      1      1       1       1       1       1
    -----, -----, ------, ------, ------, -------]
    32768  65536  131072  262144  524288  1048576
Type: List(Fraction(Integer))
%%% (2) -> sq := guessRec(cq, functionName=='co).1

   (2)  [co(n): - 2 co(n + 1) + co(n) = 0, co(0) = 1]
Type: Expression(Integer)
%%% (3) -> ca := [((1/2)::AN)^k for k in 0..20]

   (3)
       1  1  1   1   1   1   1    1    1     1     1     1     1     1
   [1, -, -, -, --, --, --, ---, ---, ---, ----, ----, ----, ----, -----,
       2  4  8  16  32  64  128  256  512  1024  2048  4096  8192  16384
      1      1       1       1       1       1
    -----, -----, ------, ------, ------, -------]
    32768  65536  131072  262144  524288  1048576
Type: List(AlgebraicNumber)
%%% (4) -> sa := guessRec(ca, functionName=='co).1

   (4)
   [
     co(n):
- 738578176637708424660750 co(n + 1) + 369289088318854212330375 co(n) = 0
     ,
    co(0) = 1]
Type: Expression(Integer)

--
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/bcecd869-4d02-4446-9960-8796549cdebf%40hemmecke.org.

Reply via email to