Using 255 shades for pixels is only a concept. It was introduced because byte values are easy to store and access, and use little space in memory.
Sometimes it's too much (binary images) and sometimes this is not enough: professional cameras often use 10-14 bits (1024-4096 shades) to store color information. So the value of white is device-dependent.
To cope with this arbitrary maximum, it's already a good idea to use floating-point values. 0 means black, 1 means white, and 0.1234 is always ~12% grey.
In image processing, pixel values can mean other things than grey values, too: probabilities (e.g. to have an object at the given position), normalized vectors, derivatives, etc, which are all non-integer values. Some formulas need normalized values between 0 and 1 as input values. Some formulas even result complex numbers (like the Fourier transform).
The only thing to remember is that displaying needs values between 0..255, so finally you'll have to normalize the image (look for the min/max values, multiply every pixel with 255/(max-min) and take the integer part)
Furthermore, non-integer pixel coordinates are also justified sometimes. For example, when you zoom an image by 20%, every coordinate will be:
x' = x*1.2
y' = y*1.2
which are non-integer values. The fractional part is important for interpolation: for example the pixel at coordinate x=1.2
will be interpolated as 80% pixel x=1
and 20% the pixel x=2
.