MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: sum of binomials .. bug ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70490] Re: sum of binomials .. bug ?
  • From: "ben" <benjamin.friedrich at gmail.com>
  • Date: Wed, 18 Oct 2006 04:16:12 -0400 (EDT)
  • References: <eh20si$2ms$1@smc.vnet.net>

Dear Yann,

got the same bug on linux,
even

f[k_] := Sum[Binomial[2 - k, i], {i, 0, 1 - k}]
x = 1; f[x] Clear[x]; f[x] /. x -> 1

gives wrong results.

Bye
Ben

yann_che2 at yahoo.fr schrieb:

> Hi everyone,
>
> on Mathematica 5.2 (mac os x), experimenting sums of binomials, i tried
> the following:
>
> In[6]:=   f[k_] := Sum[Binomial[21 - k, i], {i, 0, 10 - k}]
> In[7]:=   x = 3; f[x]
> Out[7]:= 63004
> In[8]:=   Clear[x] ; f[x] /. x -> 3
> Out[8]:= 262144
> In[9]:=   Clear[x] ; f[x]
> Out[9]:= 2^(21-x)
>
>
> does anyone know why Out[7] and Out[8] give different results ? do you
> think it is a bug ? i searched everywhere in the forums but couldn't
> find anything that helped.
> do you have a clue ?
> 
> yann


  • Prev by Date: Re: Graphics/PlotRange/LaTeX/Psfrag
  • Next by Date: Re: Algorithm in NDSolve and FindMinimum
  • Previous by thread: Re: sum of binomials .. bug ?
  • Next by thread: Re: sum of binomials .. bug ?