On 09/08/2015 10:45 PM, Aaron Meurer wrote:
> On Mon, Sep 7, 2015 at 5:37 PM, Carsten Knoll <
Carste...@gmx.de> wrote:
>> Hi,
>>
>> I want to write a routine to determine the rank of a symbolic matrix and
>> it seems to be a quite tricky task.
>>
>> The routine is required to be applicable for matrices whose entries are
>> "big expressions", hence calling simplify is not an option.
>>
>>
>> My strategy: extracting all occurring symbols and replacing them by
>> random numbers. This way, I arrive at a numeric matrix, which might
>> contain very small numbers which are nevertheless different from zero.
>> Then, I call evalf with different precisions and look at the singular
>> values. My assumption was, that the singular values which are
>> "practically 0" must become smaller with rising precision while singular
>> values whose true value is small but greater zero wont change much.
>
> I don't know if that is going to be true. I believe what you are
> dealing with is related the so-called table-maker's dilemma
>
https://en.wikipedia.org/wiki/Rounding#Table-maker.27s_dilemma.
> There's no way to tell how many digits you need to get a "zero" value
> below a certain epsilon.
>
> That isn't to say that there aren't good heuristics for doing this,
> some of which are implemented in SymPy (see equal() for instance).
>
iszerofunc. Just in case someone has a related problem the code is here: