		/** Ratio Summation Notation **/
/*A: K McIsaac*/
/*S: University of Western Australia, Nedlands 6009, Australia*/
/*D: October 1985*/
/*K: Ratio, Summation, Horner */
/*B: Should be an SMP internal function */

/*: R[$a,$b,{$i,$start,$end,$step}]
	the R sum of $a and $b wrt to $i form $start to $end in steps $step.
	b0 + a1(b1 + a2(b2 + a3(b3 + ..... )))).*/

_Sum[Smp] : {Inf,}
R_:Tier;
R[$a,{$i,$start,$end}] :: R[$a,1,{$i,$start,$end,1}]
R[$a,$b,{$i,$start,$end}] :: R[$a,$b,{$i,$start,$end,1}]
R[$a,$b,{$i,$start,$end_=$end<$start,$step}] :: 0
R[$a,$b,{$i,$start,$end_=Natp[$end-$start+1]&~Symbp[$end-$start+1],$step}] ::\
		(Lcl[%Tn,%Sum]; %Tn : 1; %Sum : S[$b,$i->0];\
		Do[$i,$start,$end,$step,%Tn : %Tn*$a;%Sum : %Sum  + %Tn $b])

/*B: Enters infinite loop if  $end -$start + 1 is a Natural number but not a 
     number, ie n_=Natp[n].*/
