Skip to content

Inverse of complex matrix is not working #16

@mathsbeauty

Description

@mathsbeauty

The complex numbers module is loaded with the following code.
local complex = require "luacomplex"
DEPENDENCIES: None (other than Lua 5.1 or 5.2). May be used with complex.lua. <<--- This line in project suggests for it.
Everything works fine for matrices having complex numbers except for inverse. For example the matrix
{{1,2,3},{4,5,6},{7,8,complex('9+3i')}}
can't be inverted. It throws the following error

bad argument #1 to 'abs' (number expected, got table)
stack traceback:
[C]: in function 'math.abs'
[\directlua]:in function 'pivotOk'
[\directlua]: in field 'dogauss'
[\directlua]:: in field 'invert'

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