Due to the way double values are stored the accuracy of a double value depends on its magnitude. At 1e-18, that accuracy is around 2e-34:
>> eps(1e-18)
ans =
1.92592994438724e-34
Of course, if the magnitude increases, the accuracy decreases.
>>eps(10)
ans =
1.77635683940025e-15
There is no floating-point data type in matlab with more accuracy than double.
If you want fixed accuracy regardless of the magnitude of the number, you have to use a fixed-point data type (double is floating point). I believe there is a matlab toolbox for that but I don't know anything about it. >>n = java.math.BigDecimal(java.math.BigInteger('1'), 24)
n =
1E-24
>>m = n.add(java.math.BigDecimal(10))
m =
10.000000000000000000000001