# fraction as index number?

given these inputs x = 4, S = [1 2 3 4 5 6 7 8 9 10], and n = 10

 search (x,S,n) {
i = 1
j = n
while i < j {
m = [(i+j)/2]
if x > Sm then i=n+1
else j = m
end
if x = Si then location = i
else location = 0


This algorithm is from my discrete math hw. I'm confused as to what Sm would equal on the first iteration because m would be $\frac{11}{2}$. If i use a fraction as the index do I round down? Is there a general rule for this? Am I making any sense? Help pls

-
$[x]$ ($x$ in square brackets) means the integer part of $x$; for ex., $[3.2]=3$. –  user35603 Apr 18 '14 at 19:19

$$[11/2]=[5.5]=5$$