Skip to content

Notation

Arthur Guiot edited this page May 18, 2018 · 1 revision

We use the BigNumber library to do most of our computation. In this docs, if you see a comment with => BigNumber, the output of the function will be a BigNumber instance.

You can create any BigNumber using t.n(x) (where x is your number)

It has the convenience of being able to do float operations without any errors:

0.2 + 0.4 // 0.6000000000000001

t.n(0.2).add(0.4) // 0.6 => BigNumber

We strongly recommend you checking the BigNumber.js website to understand how to use it.

Functions and Polynomials

TheoremJS has its own way of managing functions and polynomials, you can create them using t.f() or t.polynomial()

Points

In TheoremJS, points are written using the following template:

{
    x1: y1,
    x2: y2,
    x3: y3,
    ...
}
Clone this wiki locally