JavaScript expression parsing, MathML rendering and CAS.

Usage no npm install needed!

<script type="module">
  import mathigonHilbert from 'https://cdn.skypack.dev/@mathigon/hilbert';



Build Status npm npm

Hilbert.ts is a TypeScript library for expression parsing, simplification, and MathML rendering. It was developed for Mathigon.org, an award-winning mathematics education project.

Open Issues

  • Support for functions with subscripts (e.g. log_a(b)).
  • Support for large operators (sum, product and integral).
  • Parse ^ and _ operator from right to left (e.g. 2^2^2 == 2^(2^2)).
  • CAS Expression simplification algorithms, equals() and same() methods.
  • More tests, including visual tests for MathML.


First, install Hilbert.ts from NPM using

npm install @mathigon/hilbert

Now, simply import all functions and classes you need, using

import {Expression} from '@mathigon/hilbert'


We welcome community contributions: please file any bugs you find or send us pull requests with improvements. You can find out more on Mathigon.io.

Before submitting a pull request, you will need to sign the Mathigon Individual Contributor License Agreement.

Copyright and License

Copyright © Mathigon (dev@mathigon.org)
Released under the MIT license