Bill Allombert on Sat, 20 Feb 2021 17:17:43 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: f( x + O(x) ) or f(x) + O(x) ? |
On Sat, Feb 20, 2021 at 03:36:37PM +0000, Jacques Gélinas wrote: > In a previous post, I used this oneliner to get the vector of > Maclaurin coefficients of a function: > > maclv(f,k) = Vec( f( x+O(x^(k+1)) ) ); > > The boundary case k=0 should return f(0) as in > maclv( cosh, 0) == [1] > maclv( sinc, 0) == [1] > > But this yields an incorrect result for this modified Riemann Xi function, > > Xi(x) = my(s=1/2+x); Pi^(-s/2)*gamma(1+s/2)*(s-1)*zeta(s); zeta is wrong: ? zeta(1/2+x+O(x)) %32 = -1.9884831127532564396510949587415908792*x+O(x^2) ? zeta(1/2+x+O(x^2)) %33 = -1.4603545088095868128894991525152980125-3.9226461392091517274715314467145995137*x+O(x^2) The real bug is ? 1 + O(x) == O(x) %1 = 1 The first "bad" commit is this one: commit 55a851fb843be85f15b46231a1431f2ffaef84da Author: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> Date: Thu Mar 12 19:07:24 2020 +0100 65- problems with gequal(t_SER or t_POL) [#2188] inexact coefs or const wrt. some variables. E.g. S=x+O(x^2);T=S+O(y); S == T -> 0 Cheers, Bill