Hello,

We have the following specification for the series function.

http://fricas.github.io/api/UnivariateLaurentSeriesCategory.html#l-univariate-laurent-series-category-series

Well, it looks a bit vague for my taste, but I would say that

http://axiom-wiki.newsynthesis.org/SandBoxBugLaurentSeries

demonstrates a bug in UnivariateLaurentSeries.

For the record also attached to this mail.

Ralf

===============================================================

echo ')read "buglaurent.input"'|fricas -nosman > buglaurent.out

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Z==>Integer; Q==>Fraction Z
z: Symbol := 'z; P==>UnivariatePolynomial(z,Q)
t:P := monomial(1,1)
p:P := (1-t)*(1-t^2)*(1-t^3)
L==>UnivariateLaurentSeries(Q,z,0)
R ==> Record(k: Z, c: Q)
l: List R := reverse [[degree m, leadingCoefficient m]$R for m in monomials p]
series(l)$L

l1: List R := [[n, if n=5 then 0 else n/1]$R for n in 1..7]
series(l1)$L

-- It seems weird that the resulting series is aborted at a non-existing
-- coefficient in the input list.
l2: List R := [[n, n/1]$R for n in 1..7|n~=5]
series(l2)$L

-- There is obviously also a bug here, because the zero coefficient
-- should have been removed.
-- I would, however, accept such a result if the specification of
-- 
"series":http://fricas.github.io/api/UnivariateLaurentSeriesCategory.html#l-univariate-laurent-series-category-series
-- were made precise as to rely on the input stream not to contain
-- zero coefficients.


S ==> SparseUnivariateLaurentSeries(Q,z,0)
series(l)$S
series(l1)$S
series(l2)$S

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Checking for foreign routines
AXIOM="/home/hemmecke/g/fricas-bisect/install/lib/fricas/target/x86_64-unknown-linux"
spad-lib="/home/hemmecke/g/fricas-bisect/install/lib/fricas/target/x86_64-unknown-linux/lib/libspad.so"
foreign routines found
openServer result -2
                       FriCAS Computer Algebra System 
          Version: FriCAS 3b640a58565eaaac9a1d22923fb6db1e23973c67
                   Timestamp: Sun Nov  9 11:50:05 CET 2014
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
 
(1) -> Z==>Integer; Q==>Fraction Z
 
                                                                   Type: Void
z: Symbol := 'z; P==>UnivariatePolynomial(z,Q)
 
                                                                   Type: Void
t:P := monomial(1,1)
 

   (3)  z
                              Type: UnivariatePolynomial(z,Fraction(Integer))
p:P := (1-t)*(1-t^2)*(1-t^3)
 

           6    5    4    2
   (4)  - z  + z  + z  - z  - z + 1
                              Type: UnivariatePolynomial(z,Fraction(Integer))
L==>UnivariateLaurentSeries(Q,z,0)
 
                                                                   Type: Void
R ==> Record(k: Z, c: Q)
 
                                                                   Type: Void
l: List R := reverse [[degree m, leadingCoefficient m]$R for m in monomials p]
 

   (7)
   [[k= 0,c= 1], [k= 1,c= - 1], [k= 2,c= - 1], [k= 4,c= 1], [k= 5,c= 1],
    [k= 6,c= - 1]]
                          Type: List(Record(k: Integer,c: Fraction(Integer)))
series(l)$L
 

                 2
   (8)  1 - z - z
                         Type: UnivariateLaurentSeries(Fraction(Integer),z,0)

l1: List R := [[n, if n=5 then 0 else n/1]$R for n in 1..7]
 

   (9)
   [[k= 1,c= 1], [k= 2,c= 2], [k= 3,c= 3], [k= 4,c= 4], [k= 5,c= 0],
    [k= 6,c= 6], [k= 7,c= 7]]
                          Type: List(Record(k: Integer,c: Fraction(Integer)))
series(l1)$L
 

               2     3     4     6     7
   (10)  z + 2z  + 3z  + 4z  + 6z  + 7z
                         Type: UnivariateLaurentSeries(Fraction(Integer),z,0)

-- It seems weird that the resulting series is aborted at a non-existing
-- coefficient in the input list.
l2: List R := [[n, n/1]$R for n in 1..7|n~=5]
 

   (11)
   [[k= 1,c= 1],[k= 2,c= 2],[k= 3,c= 3],[k= 4,c= 4],[k= 6,c= 6],[k= 7,c= 7]]
                          Type: List(Record(k: Integer,c: Fraction(Integer)))
series(l2)$L
 

               2     3     4
   (12)  z + 2z  + 3z  + 4z
                         Type: UnivariateLaurentSeries(Fraction(Integer),z,0)

-- There is obviously also a bug here, because the zero coefficient
-- should have been removed.
-- I would, however, accept such a result if the specification of
-- 
"series":http://fricas.github.io/api/UnivariateLaurentSeriesCategory.html#l-univariate-laurent-series-category-series
-- were made precise as to rely on the input stream not to contain
-- zero coefficients.


S ==> SparseUnivariateLaurentSeries(Q,z,0)
 
                                                                   Type: Void
series(l)$S
 

                  2    4    5    6
   (14)  1 - z - z  + z  + z  - z
                   Type: SparseUnivariateLaurentSeries(Fraction(Integer),z,0)
series(l1)$S
 

               2     3     4     5     6     7
   (15)  z + 2z  + 3z  + 4z  + 0z  + 6z  + 7z
                   Type: SparseUnivariateLaurentSeries(Fraction(Integer),z,0)
series(l2)$S
 

               2     3     4     6     7
   (16)  z + 2z  + 3z  + 4z  + 6z  + 7z
                   Type: SparseUnivariateLaurentSeries(Fraction(Integer),z,0)
(17) -> 

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to