Convert any number n to a fraction like that:
n
t.toFraction(1/9) // [ '1', '9' ] // Set the precision t.toFraction(3.14159265358, 10) // [ '22', '7' ]
t.toDec(...t.toFraction(1/9)) // ~0.1111111... => BigNumber
There was an error while loading. Please reload this page.