Skip to content

Numbers

Arthur Guiot edited this page May 16, 2018 · 9 revisions

The concept of BigNumber

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 their website to understand how to use it.

Clone this wiki locally