Open roccomuso opened 5 years ago
In this case you would want bigRat(12.90).toString(16)
to return 81/a
?
On BigNumber.js you'd get something like c.e666666666668
toString
returns numbers in the numerator/denominator
format. The toDecimal
method returns a decimal approximation. Maybe you want toDecimal
to support different bases?
Yes
Perhaps a toBase(n)
function could be implemented? I second this idea of multiple base formats.
I'd like to achieve something like:
BigRat(12.90).toString(16)
Like BigInteger.js (http://mikemcl.github.io/bignumber.js/#toS).