MATLAB: Largest three digit number in Matlab

brain teaserpuzzleteaser

Hello, my professor asked us this question as a sort of a trick question and I can't seem to wrap my head around it. The most obvious choice is "999", but my professor said that is't the answer. My second choice was "Inf", but infinity isn't actually a number so that wouldn't work. Finally, I thought of "realmax", but that wouldn't work either since it contains more than three digits. I'm really curious to know what it could be…

Best Answer

9e+99?
However that number cannot be represented exactly in MATLAB.
9^(9^9) is another possibility but I suspect it cannot be represented exactly either.
2^52 is exactly representable. A good question would be whether any values between that and 2^53-1 can be represented in 3 digits
Related Question