Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 1.97 KB

README.md

File metadata and controls

102 lines (63 loc) · 1.97 KB

MATRIX ALGEBRA

⚠️ WARNING: This is work in progress

⚠️ WARNING: This is only meant as a proof of concept. Real product will be done in Rust and use a wasm compiler.

This is a simple RPEL to work with matrix algebra.

Numbers (basic operations):

b = 5.6

c = 9

c*b+7

Vectors:

v = [1, 2, 3]

Norm of a vector

|v|

or

norm(v)

Operations with matrices:

Define

A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Multiply

B = A*A

Multiply by numbers

C = 7*A

Power (only integers at the moment), division

F = A^2

E = A/C

Output is shown in LaTex with Katex

To get Out[5] you can use $5. Some mathematical functions are implemented

Building and running locally

You need TypeScript and clang version > 11.0.0.

$ make
$ cd build
build $ python -m http.server 1234

ROADMAP

  • QR decomposition
  • Eigenvalues and eigenvectors
  • Complex numbers
  • Example matrices (Identity, quaternions, octonions...)
  • Functions on matrices
  • Tests!!!!
  • Prettify UI
  • Non square matrices
  • Matrix and vector elements access A[4][5]
  • A*v Matrix over vectors (is it just matrix product?)

Implementation details

This a very simple test of how to use a C program compiled to WebAssembly without the standard library (libc).

We use walloc as a memory allocator (!).

You might find in the git history an even simpler implementation of malloc and free.

Links