Opened 9 years ago

Closed 9 years ago

# rank incorrect over integers

Reported by: Owned by: kroeker@… somebody minor 4-1-0 and higher singular-kernel 4-0-1 rank integers incorrect

### Description

Observed by Simon Brandhorst:

1. the rank function is incorrect over integers

Failing example:

```ring QQ = 0,x,dp;
intmat m[2][2] = 4, 6, -10, -15;
rank(m); // =1, ok?
ring ZZ = integer,x,dp;
rank(m); //=2, wrong!!! expected 1, hint: (4 ,-10)-(6,-15) = (-2, 5) ; (4,-10)= -2*(-2,5);  (6,-15)=-3*(-2,5);
def stdm = matrix(std(module(matrix(m))));
stdm;
ncols(stdm); //=1

```

output:

```> ring QQ = 0,x,dp;
> intmat m[2][2] = 4, 6, -10, -15;
> rank(m); // =1, ok?
1
> ring ZZ = integer,x,dp;
> rank(m); //=2, wrong!!!
2
> def stdm = matrix(std(module(matrix(m))));
> stdm;
stdm[1,1]=-2
stdm[2,1]=5
> ncols(stdm); //=1
1
>

```

Remark: 'ludecomp()' is disabled over rings, but 'rank()' is not

1. it is unexpected that rank(m) depends on current ring instead on type of matrix m (intmat vs matrix).

### comment:1 Changed 9 years ago by hannes

Resolution: → fixed new → closed
Version 0, edited 9 years ago by hannes (next)
Note: See TracTickets for help on using tickets.