lua-matrix icon indicating copy to clipboard operation
lua-matrix copied to clipboard

Inverse of complex matrix is not working

Open mathsbeauty opened this issue 2 years ago • 0 comments

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'

mathsbeauty avatar May 24 '22 06:05 mathsbeauty