Modulo of realmax in matlab
1 view (last 30 days)
Ameer Hamza on 31 Oct 2020
MATLAB double datatype is based on IEEE-754 format: https://en.wikipedia.org/wiki/Double-precision_floating-point_format. This is a finite precision datatype, and you cannot represent all possible integer values accurately in this format.
gives the maximum consecutive integer values, which can be accurately represented in this format. Above that, only a few integer values are precisely represented. In your case, realmax-10000 will just round off to realmax since double() data type does not have the precision to represent it.