# about >> in C



## killwin (Apr 15, 2010)

Hello

whell i have 


```
unsigned int width = 1024
printf("%f\n", (float)(width >> 1));
```

result 512 it's OK.

But


```
unsigned int width = 1024
printf("%f\n", (float)(-(width >> 1)));
```

Result a big number ??? Whay ???

Thanks


----------



## psycho (Apr 15, 2010)

did you try just using int, without unsigned. Maybe it solves problem?


----------



## killwin (Apr 15, 2010)

*solved*

yes; it's solved. And it was verry simple. x(


----------

