MATLAB: Matlab2017b why uint32(255)/128 = 2

MATLABuint32

Matlab2017b why uint32(255)/128 = 2?

Best Answer

Operations on integer data types are carried out as if converted to double with the results rounded when converted back.
(Operations are not necessarily actually carried out in double: uint64 does not drop down to double accuracy for example)