Discussion about integer overflow

Int this case we are intentionally telling the language to behave in such a way, it is no accident, and even in these cases Matlab/Octave return their maximum values which would be the equivalent of Inf.

octave:1> x = uint8(128)
x = 128
octave:2> x^100000
ans = 255
1 Like