for ( int i=0, float f=n; i<n; i++,f*=.5 )
   {
   /* loop body */
   }