How come 10^-N does not equal 1e-N for some N ?
Show older comments
I've noticed by chance that
isequal(10^-5,1e-5) == 0
and
(10^-5) - (1e-5) == -1.694065894508601e-21
I checked other numbers, such as N = 3,4,6 and found that in these cases
isequal(10^-N,1e-N) == 1
so, I ran this code:
for idx = 1:100
if ~isequal(10^-idx,eval(['1e-',num2str(idx)]))
idx
end
end
and got back the numbers: 5, 11, 17, 20, 21, 24, 29, 32, 39, 63, 67, 76, 86, 88, 98
Any idea what's going on?
I'm working with MATLAB R2014a on a Windows 10 platform
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!