How to get around round off error?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello all, I read about the round off error that MATLAB experiences with double precision numbers, and it being caused by how MATLAB stores numbers in binary. I was wondering if there was any way to get around this. Specifically I would like to subtract 0.021557700000000 from 0.021557800000000 without any round off error. The answer should be 1e-7 but MATLAB gives -9.999999999940612e-08. I tried to convert the numbers to symbols and subtract symbolically but I got the same error. Any ideas?
11 件のコメント
Stephen23
2021 年 4 月 8 日
"16 is the maximum number of decimals my input has."
Then any attempt to define a higher precision number for your operations is totally meaningless.
I very much doubt that your input data were even measured to 16 significant digit accuracy, given that some of the most accurate measurements in science are around the same order:
回答 (1 件)
Zakaria moeri
2021 年 4 月 8 日
take a look at vpa and digits method already exist in matlab documentation.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!