Double precision limit with norm

13 ビュー (過去 30 日間)
Zoltán Csáti
Zoltán Csáti 2013 年 10 月 29 日
編集済み: Matt J 2013 年 10 月 29 日
I wrote a Taylor series approach for calculating the natural logarithm of matrix A. When I compared my result with the built-in function logm ( norm(myResult-logm(A),2) ), I got the following: 1.3878e-016. However eps = 2^(-52) = 2.2204e-016 when we use double precision. How can MATLAB determine this value if its maximum precision is lower than the result? Is it a bug? (The estimated norm with normest is 1.9626e-016.)

採用された回答

Matt J
Matt J 2013 年 10 月 29 日
編集済み: Matt J 2013 年 10 月 29 日
eps() gives a relative precision limit.
>> eps(1)
ans =
2.2204e-16
>> eps(.001)
ans =
2.1684e-19
Presumably your logm(A) have values much less than 1. You should really be comparing to eps(logm(A)) or maybe to eps(norm(logm(A)).
  2 件のコメント
Zoltán Csáti
Zoltán Csáti 2013 年 10 月 29 日
For my case:
logm(A) = -0.1438 0.5493 0
0.5493 -0.1438 0
0 0 0
These entries are not much less than 0 (in absolute value).
Matt J
Matt J 2013 年 10 月 29 日
編集済み: Matt J 2013 年 10 月 29 日
They're clearly small enough:
>> logmA=[ -0.1438 0.5493 0
0.5493 -0.1438 0
0 0 0];
>> eps(norm(logmA,2))
ans =
1.1102e-16
Looks like your calculation is pretty accurate!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by