Skip to content
This repository was archived by the owner on Nov 18, 2023. It is now read-only.
This repository was archived by the owner on Nov 18, 2023. It is now read-only.

rref bug #42

@rzil

Description

@rzil

The following commands result in unexpected behaviour with matrix-0.3.5.1

let mat = fromList 9 10 [(-1) % 1,1 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,1 % 1,1 % 1,1 % 1,(-1) % 1,0 % 1,0 % 1,0 % 1,0 % 1,1 % 1,0 % 1,1 % 1,1 % 1,1 % 1,1 % 1,(-1) % 1,0 % 1,0 % 1,0 % 1,0 % 1,1 % 1,0 % 1,1 % 1,0 % 1,0 % 1,1 % 1,(-1) % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,1 % 1,0 % 1,0 % 1,0 % 1,1 % 1,(-1) % 1,1 % 1,0 % 1,0 % 1,0 % 1,1 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,(-1) % 1,1 % 1,0 % 1,0 % 1,1 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,(-1) % 1,0 % 1,1 % 1,1 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,(-1) % 1,0 % 1,1 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,0 % 1,(-1) % 1,1 % 1]

rref mat

Right ┌ *** Exception: getElem: Trying to get the (6,1) element from a 5x6 matrix.
CallStack (from HasCallStack):
  error, called at ./Data/Matrix.hs:434:16 in matrix-0.3.5.1-1pdOyADkVl9H4vOxaM7loN:Data.Matrix

NB: the correct row reduced form is given below (computed with sage)

[ 1  1  0  0 -1  0  0  0  0  1]
[ 0  2  0  0 -1  0  0  0  0  3]
[ 0  0  1  0 -1  0  0  0  0  5]
[ 0  0  0  1 -1  0  0  0  0  4]
[ 0  0  0  0  0  1  0  0  0  3]
[ 0  0  0  0  0  0  1  0  0  4]
[ 0  0  0  0  0  0  0  1  0  5]
[ 0  0  0  0  0  0  0  0  1  5]
[ 0  0  0  0  0  0  0  0  0  6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions