Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't convert BigInt to Decimal without throwing an error #146

Open
James103 opened this issue Jan 11, 2023 · 0 comments
Open

Can't convert BigInt to Decimal without throwing an error #146

James103 opened this issue Jan 11, 2023 · 0 comments

Comments

@James103
Copy link

Currently (latest break_infinity.js version as of 2023-01-11), attempting to convert a BigInt value to Decimal will throw an error with the following message from within the toString function: TypeError: t.indexOf is not a function (where t is the input argument).

For example, new Decimal(1000n) should return a Decimal representing the number 1000 but currently throws an error.
new Decimal(2n**1234n) should return a Decimal whose value is approximately 2.958112e371 but also throws an error.

A similar issue exists for break_eternity.js: Patashu/break_eternity.js#142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant