Skip to content
New issue

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

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

Already on GitHub? # to your account

Usage of BigInt.prototype.toString() #45

Open
claybiockiller opened this issue Sep 17, 2023 · 1 comment
Open

Usage of BigInt.prototype.toString() #45

claybiockiller opened this issue Sep 17, 2023 · 1 comment

Comments

@claybiockiller
Copy link

claybiockiller commented Sep 17, 2023

Currently, only Number.prototype.toString() is used in the optimizer, but it has a disadvantage: it would be limited by MAX_SAFE_INTEGER. BigInt.prototype.toString() is not affected by that. To get number in BigInt type, you can just call "return "+number written in string+"n" in Function().

@fasttime
Copy link
Owner

Thanks! This should indeed work in all new browsers.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants