Skip to main content
deleted 16 characters in body
Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

Octave, 30 bytes

@(x)-prod(diag([~,l,~]=lu(x)))

Try it online!

or, the boring 4 byte solution (saved 6 bytes thanks to Luis Mendo (forgot the rules regaring builtin functions)):

10 bytes:

@(x)det(x)@det

Explanation:

Coming up! :)

Octave, 30 bytes

@(x)-prod(diag([~,l,~]=lu(x)))

Try it online!

or, the boring builtin:

10 bytes:

@(x)det(x)

Explanation:

Coming up! :)

Octave, 30 bytes

@(x)-prod(diag([~,l,~]=lu(x)))

Try it online!

or, the boring 4 byte solution (saved 6 bytes thanks to Luis Mendo (forgot the rules regaring builtin functions)):

@det

Explanation:

Coming up! :)

Source Link
Stewie Griffin
  • 46.5k
  • 13
  • 132
  • 295

Octave, 30 bytes

@(x)-prod(diag([~,l,~]=lu(x)))

Try it online!

or, the boring builtin:

10 bytes:

@(x)det(x)

Explanation:

Coming up! :)