Dirk Laurie on Sat, 16 Aug 2014 22:19:20 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Fwd: Vec() and leading zeros of generating function
|
- To: "pari-users@pari.math.u-bordeaux.fr" <pari-users@pari.math.u-bordeaux.fr>
- Subject: Fwd: Vec() and leading zeros of generating function
- From: Dirk Laurie <dirk.laurie@gmail.com>
- Date: Sat, 16 Aug 2014 22:19:12 +0200
- Delivery-date: Sat, 16 Aug 2014 22:19:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DlC3ptEid8ZQtWt7Vaw6wJ0sPqPvUEt124K+ZFW1Z4A=; b=iQNteFN7AjUfVLrm+bKQ6bDtepQqxBAapdHy6DXdaXeljgY+yV8hXHkx8OlbSZl7Vp svNtubAmmBOQgYqzitfdzCAWza34Iqtf2WlOYI4l5gn4gpvo/LKapsOZASJ9vr+yF9M1 aetT49lHzFYshLayW1CBdGE8clz0UeoQ8d7xmdy2ledsxVChl68T5wb63x+rERUWahYY inMU4ZN4NtEGeXB28rBUhHla3iRjUlVBzdDtOtKXn5AFtMthwvADfKZMvroOfuF+abzc CEDkDONNtgLP+zG113x2t7A6m4ywefPR9KLR0s318ROJmrWnK2InuBLmx7LBgann/Xfo 6gsg==
- In-reply-to: <CABcj=tmy4gsp7yn2zUE0TNpRwTvi4+u=0fF78kQQ=nFPqtGKng@mail.gmail.com>
- References: <87r40hugz1.fsf@blah.blah> <CABcj=tk_SJRKAkfVHqxzqb-6w8eMfPJKx=eWwJJUQmb5BzbUZA@mail.gmail.com> <CABcj=tmy4gsp7yn2zUE0TNpRwTvi4+u=0fF78kQQ=nFPqtGKng@mail.gmail.com>
2014-08-16 8:12 GMT+02:00 Dirk Laurie <dirk.laurie@gmail.com>:
> 2014-08-16 7:43 GMT+02:00 Kevin Ryde <user42_kevin@yahoo.com.au>:
>>My main use has been to compare against expected or desired
>> values, so
>>
>> want = [1, -1, 1, -1]
>> Vec(1/(1+x) + O(x^length(want))) == want || error("oops")
>>
>> I see some Pol(Vecrev()) can turn the values into a poly for the
>> compare, but poly -> values helps for printing the values too.
>
> I would do that job by
>
> expr1 = 1/(1+x)
> expr2 = 1-x+x^2-x^3
> if(expr1-expr2-O(x^4),"different","equal")
Wth (poldegree(expr2)+1) instead of 4 if you need
to make it automatic.