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

Drop MAX_SAFE_INTEGER limitation #346

Open
dm4t2 opened this issue Oct 2, 2022 Discussed in #307 · 5 comments
Open

Drop MAX_SAFE_INTEGER limitation #346

dm4t2 opened this issue Oct 2, 2022 Discussed in #307 · 5 comments
Labels
feature New feature or request

Comments

@dm4t2
Copy link
Owner

dm4t2 commented Oct 2, 2022

Currently, the input is limited to Number.MAX_SAFE_INTEGER.
Numbers should exposed as decimal strings ("1234.567") to allow arbitrary size and precision.

See also discussion #307

@janthurau
Copy link

@dm4t2 Do you have any idea how much work is required to get this done? We are dealing with emission values that often have 10 or more decimal places, which means that we can enter just 6 digits before the decimal, which is not enough. Maybe we can contribute to get this done, if you are open to it?

@dm4t2
Copy link
Owner Author

dm4t2 commented Oct 11, 2023

I worked on this some time ago as part of a proof of concept but only archived it. Most of the work is already done, but there are a lot of changes, including breaking ones. I'm looking forward to releasing a v4 beta soon, depending on my free time. It would be great if you could help out with testing.

@humaidaAra
Copy link

Any update on Integer limitation? it only support 13 digits. Would it be BigInt? or Double type?

@dm4t2
Copy link
Owner Author

dm4t2 commented Nov 26, 2023

The current plan is to expose numbers of arbitrary size/precision as decimal strings ("1234.567"). BigInt will be only used for internal calculations.

@xgenvn
Copy link

xgenvn commented Dec 4, 2023

I'm using decimal.js in my project along with vue-currency-input. I think we can extract numeric functions and add provider layer instead. Bringing decimal.js as a provider may be a better solution than using two different sources: string & BigInt.
So for the rest, we can just use string-based numerical presentation.

@dm4t2 dm4t2 changed the title BigInt support Drop MAX_SAFE_INTEGER limitation Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants