Re: euler(0,1) shows Maple bugs are really ubiquitous
From: Peter Luschny (peter.luschny_at_gmx.net)
Date: 03/17/05
- Next message: W. Mueckenheim: "Re: Of course Cantors diagonlisation is ok was Re: Where's respect?...."
- Previous message: Robin Chapman: "Re: Factoring integers on a classical computer"
- In reply to: Vladimir Bondarenko: "Re: euler(0,1) shows Maple bugs are really ubiquitous"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Mar 2005 10:08:54 +0100
> Vladimir Bondarenko" wrote:
> Hi Maple customers all over the world,
> After 10 years of its existent, in Maple 9.5.2 the bug with
> euler(0,1) reported by Peter was fixed...
> euler(0,1);
> -------------------- (2004) Maple 9.5.2 ----------------------
> 1
Hurrah, Maple quality improves! ;-)
PL> Well, I do not know how Maplesoft defines euler(s,z),
PL> s not an integer, therefore I will take my own approach.
PL> E := proc(s,z) z^s*(4^(s+1)*Zeta(0,-s,1/(4*z))
PL> - 2^(s+1)*Zeta(0,-s,1/(2*z))) end:
Just to explain a little bit, what this function does:
it is a generalization of the Euler numbers and gives
us a way to compute the Euler numbers with Maple without
using the Maple 'euler' function, which is known to be buggy
in almost all Maple releases, as your foregoing posting shows.
> seq(E(i,1),i=0..10);
> seq(euler(i),i=0..10);
1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521
1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521
> seq(2^i*E(i,1/2)/i!,i=0..11);
> seq(2^i*euler(i,1)/i!,i=0..11);
-17 62 -1382
1, 1, 0, -1/3, 0, 2/15, 0, ---, 0, ----, 0, ------
315 2835 155925
-17 62 -1382
-1, 1, 0, -1/3, 0, 2/15, 0, ---, 0, ----, 0, ------
315 2835 155925
> series(1+tanh(x),x,12);
3 5 17 7 62 9 1382 11
1 + x - 1/3 x + 2/15 x - --- x + ---- x - ------ x + ..
315 2835 155925
Note that the Maple coders did not even use such a well known relation
as the one given between the expansion of 1 + tanh(x) and the Euler
polynomials to check their code! 'Test Driven Development' does not
seem to be much appreciated in Waterloo.
In an test driven development Maple's 'Decadium Bug' would not
have even reached the beta build (sorry for you, Vladimir ;-)
However, a workaround for a Maple bug might again be buggy
because of another Maple bug, as we have seen:
Maple (VR5) computes E(0,1) = 1 and limit(E(s,1),s=0,real) = -2.
By the way, Mathematica 5.0 does it right:
In[1] = F[s_, z_] := z^s(4^(s+1)Zeta[-s,1/(4z)]- 2^(s+1)Zeta[-s,1/(2z)])
In[3] = F[0,1] Out[3]= 1
In[4] = Limit[F[s,1],s->0] Out[4]= 1
In[5] = Limit[F[s,1],s->0,Direction->-1] Out[5]= 1
In[6] = Limit[F[s,1],s->0,Direction->1] Out[6]= 1
Ok, this is the first part of the story. The second part
follows immediately. We have not looked at the Euler
polynomials yet.
First the definition:
EP := proc(s,z) z^s*E(s,1/(2*z)) end;
The meaning is clear:
> seq(EP(i,z),i=0..4);
2 2 3 3 4
1, z - 1/2, z - z, 1/4 - 3/2 z + z , z - 2 z + z ,
> seq(euler(i,z),i=0..4);
2 2 3 3 4
1, z - 1/2, z - z, 1/4 - 3/2 z + z , z - 2 z + z ,
VB> Here is the bug, alive and kickin'!
VB> limit(euler(z,1), z=0); -> -1
But what does limit(euler(z,1), z=0) mean, exactly?
Now our version:
limit(EP(z,1), z=0); -> 1
It works! Even with good ol' buggy Maple! ;-)
And we have assigned an exact meaning to the limit:
lim EP(z,1) = lim (2 - 4*2^z) Zeta(-z) = 1
z->0 z->0
Regards Peter
- Next message: W. Mueckenheim: "Re: Of course Cantors diagonlisation is ok was Re: Where's respect?...."
- Previous message: Robin Chapman: "Re: Factoring integers on a classical computer"
- In reply to: Vladimir Bondarenko: "Re: euler(0,1) shows Maple bugs are really ubiquitous"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|