Skip to content

[Bug] Wrong Memory Access in edge case of n=3 #24

@MothNik

Description

@MothNik

The special case of a 3x3 matrix is not handled correctly by both algorithm I and algorithm II.
They have the access pattern first 2 rows - all rows in between - last 2 rows, but for a 3x3 matrix, the first and last 2 rows have an overlap because the second row belongs to both.

This is an edge case, but yet it can happen and lead to wrong memory access.

Unfortunately, the tests do not capture this case because they only capture a single case of n=1_000.

I have already fixed this for #11 by falling back to np.linalg.solve for this special case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions