Looking at the code, there's no reason why to decimal string needs to be impure, it's just that the `toString` of BigInt uses the delegate sink method of `toString`, which must necessarily be impure, while the underlying function which actually calculates the string is pure.
toDecimalString should be reworked to be pure