Simple miscalculation: (1-0.95)*4000 = 2.000000000000002e+02
Show older comments
Dear all,
I am using Matlab 2013a and I found this imprecision in a simple operation: (1-0.95)*4000. Matlab returned me 2.000000000000002e+02 instead of 200. Thus, I cannot access a vector position since it is not integer and when I use ceil Matlab returns 201.
Anyone has noticed this mistake before? Is it already corrected in new versions of Matlab?
Thanks, Bruno Fanzeres
Accepted Answer
More Answers (0)
Categories
Find more on Number Theory 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!