Oh, a solution is simple.

I got

(35) -> coefficients l0

   (35)  [0, 0, 0, 0]

So

(36) -> zero? removeZeroes l0

   (36)  true

Unfortunately, UnivariateTaylorSeries has no "removeZeroes". Maybe it
should be added?

(54) -> tx := x :: T

   (54)  x

        Type: UnivariateTaylorSeries(Fraction(Integer),x,0)
(55) -> t := truncate(sin tx, 7)

             1  3    1   5     1   7
   (55)  x - - x  + --- x  - ---- x
             6      120      5040

          Type: UnivariateTaylorSeries(Fraction(Integer),x,0)
(56) -> tt := t-t

   (56)  0

          Type: UnivariateTaylorSeries(Fraction(Integer),x,0)
(57) -> coefficients tt

   (57)  [0, 0, 0, 0, 0, 0, 0, 0]
                             Type: Stream(Fraction(Integer))
(58) -> zero?(tt)

   (58)  false
                                  Type: Boolean

The following can, of course, be explained, but it looks strange to me.

(63) -> (tt =0)@Boolean

   (63)  true

And if I truncate at 20, then (tt =0)@Boolean also returns false.
Nevertheless, I don't think that it is a good idea that zero? and x=0
behave differently.

Ralf



On 10/21/20 9:51 PM, Ralf Hemmecke wrote:
> It is clear that in general there is no decidable zero test for power
> series, however, we have the function truncate: (%, INT) -> % that
> basically creates a finite series. I hoped that it were possible to use
> UnivariateLaurentSeries together with this truncate function to
> essentially work with Laurent polynomials. I ran into a problem that I
> did not expect.
> 
> With the attached file I get.
> 
> (9) -> zero? l0
> 
>    (9)  false
> 
> (13) -> zero? t0
> 
>    (13)  false
> 
> In fact, I consider this a bug. It is clearly possible to decide that l0
> and t0 are 0 since their corresponding stream should be finite and at
> most contain zeros.
> 
> Waldek, I can look into it if you also want the above return true.
> 
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/5445cee4-8c58-4545-56b2-799764651373%40hemmecke.org.

Reply via email to