yes, variable>>1 is the same as variable/2. >> is a bnary shift. so if a=8 for example, thats 00001000 in binary. when u shift it all 1 place to the right (>>1), you get 00000100 which is 4 (i.e. you have halved the value).
I notice you have some (1/2)'s in your modified program, but im afraid that wont work either. PBP will calculate that 1/2 (or 1>>1) as 0. 1 is represented in binary as 00000001 and if you shift that right 1 place you get 00000000.
Remember that time[lmt] is an allways going to be an integer (whole number). Therefore there is no point in checking if it is equal to 1.5 since it will never be 1.5.
Bookmarks