Try *something* like
(%i1) mypow(a,b) := if a=0 and b= 0 then 1 else a^b;
paldn(m,s) :=
(sum(binomial(2*m-i,i)*mypow(s,i),i,0,m-1))/(sum(binomial(2*m-i,i)*mypow(s,i),i,0,m));
gain(m,s) := abs(paldn(m,s));
pairs: makelist([0.1*omega, gain(2,%i*omega)],omega,0,5);
(%o1) mypow(a,b):=if a=0 and b=0 then 1 else a^b
(%i2)
(%o2)
paldn(m,s):=sum(binom(2*m-i,i)*mypow(s,i),i,0,m-1)/sum(binom(2*m-i,i)*mypow(s,i),i,0,m)
(%i3)
(%o3) gain(m,s):=abs(paldn(m,s))
(%i4)
(%o4)
[[0,1],[0.1,sqrt(10)/3],[0.2,sqrt(37)/(3*sqrt(5))],[0.3,sqrt(82)/sqrt(145)],[0.4,sqrt(145)/(3*sqrt(41))],[0.5,sqrt(226)/(3*sqrt(89))]]
(%i5)
Notes:
(1) In Maxima, 0^0 signals an error. I'm guessing you want 0^0 -> 1. Thus
the function mypow. If you don't like this, peel off the first term from
each sum.
(2) I'll allow somebody else to explain why your version didn't work as
you expected. But Maxima functions are much easier to understand
when they depend on fewer global variables. I switched your global 's'
to an function argument.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To: maxima at math.utexas.edu
>From: Hugo Coolens
>Sent by: maxima-bounces at math.utexas.edu
>Date: 12/23/2006 08:58AM
>Subject: newbie question, forcing
>numeric result
>
>I want Maxima produce some numerical results as
>follows:
>paldn(m) :=
>(sum(binomial(2*m-i,i)*s^i,i,0,m-1))/(sum(binomia
>l(2*m-i,i)*s^i,i,0,m));
>s : %i*omega;
>gain(m) := abs(paldn(m));
>pairs: makelist([0.1*omega, gain(2)],omega,0,5);
>
>unfortunately this produces a symbolic expression
>in omega, I tried
>float(gain(2)) in stead of gain(2) but still no
>numerical result.
>
>How should I convince Maxima to produce a
>numerical result?
>
>hugo
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxim
>a