Regarding the eps() function in Matlab, it is sometimes useful to return the positive distance from abs(x) to the next largest number of the same precision as x. This is used, for example, in setting the adaptive tolerance level for determining matrix rank. Matlab's algorithm for default tolerance level in double precision is:
s = svd(A);
tol = max(size(A))*eps(max(s));
r = sum(s > tol);
I would like to check what happens to rank of a matrix of interest using this algorithm in arbitrary precision. However, I cannot think of a way to get the analogue of eps(max(s)) above (how to get eps(x) is the problem).
What would be the way to compute it using the toolbox?
Yes, absolutely, this is very essential function. It can be called in two ways:
There are also similar functions (and many others):
Please take a look to the last section on the page: http://www.advanpix.com/documentation/function-reference/
Hi Pavel,
Sorry for a potentially dumb question.
Regarding the eps() function in Matlab, it is sometimes useful to return the positive distance from abs(x) to the next largest number of the same precision as x. This is used, for example, in setting the adaptive tolerance level for determining matrix rank. Matlab's algorithm for default tolerance level in double precision is:
s = svd(A);
tol = max(size(A))*eps(max(s));
r = sum(s > tol);
I would like to check what happens to rank of a matrix of interest using this algorithm in arbitrary precision. However, I cannot think of a way to get the analogue of eps(max(s)) above (how to get eps(x) is the problem).
What would be the way to compute it using the toolbox?
Thank you,
Denis
Hi Denis,
To get machine epsilon for particular number 'x' please use:
before the 4.3.3.12177:
starting from 4.3.3.12177, the prefix 'mp.' is no longer needed:
The 'rank(A,tol)' has been included in recent versions of toolbox as well.
I highly suggest you to use the newest version of toolbox - 4.3.3.12177.
Hi Pavel,
Thank you for your very prompt reply, that solves my question!