Numerical Library in Typescript

johnb8005

John B

Posted on May 21, 2020

Numerical Library in Typescript

I recently discovered typescript after working a lot with Scala, Python and JS. I found it to be the perfect compromise between heavy statically typed languages like Scala and convenient, fast but dynamically typed languages like JS.

Typescript is a superset of Javascript and what makes it very appealing to me is that its community is growing and big players (Microsoft) are strongly supporting it (Visual Studio Code, etc).

Something that is less spoken of but that I find very interesting and promising is that it could potentially compile to other languages (see for instance https://github.com/AssemblyScript/assemblyscript, even if technically it is not typescript).

At the light of the above I was interested to see if there was a simple numerical library that would allow me to do basic Linear algebra, some statistics, etc. (a Python Numpy equivalent I guess). And while there are a few libraries, most of them are actually JS libraries that were then made compatible for TS.

So in these days of confinement, I thought I would give it a go.

The library now exists:
https://github.com/Nexysweb/math-ts
https://www.npmjs.com/package/@nexys/math-ts

It covers most of the math stuff that I need for most projects, for example, in no particular order:
Math:

  • linear algebra
  • complex numbers
  • numerical integration
  • series

Stat:

  • regression
  • anova

Finance:

  • mortgage calculation

I would be more than happy to get feedbacks, or better, PRs...!

💖 💪 🙅 🚩
johnb8005
John B

Posted on May 21, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Numerical Library in Typescript
typescript Numerical Library in Typescript

May 21, 2020