Double precision limit with norm
3 次查看(过去 30 天)
显示 更早的评论
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.)
0 个评论
采纳的回答
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)).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!