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

Store it internally as Decimal #4

Closed
sindresorhus opened this issue Oct 1, 2019 · 1 comment
Closed

Store it internally as Decimal #4

sindresorhus opened this issue Oct 1, 2019 · 1 comment

Comments

@sindresorhus
Copy link
Owner

It would allow us to store bigger values with more precision. We would also accept a Decimal and add arithmetics overloads for it.

I don't intend to do this yet if at all as Decimal has and still is very buggy:

Even though I don't plan to do this yet, I'm still looking for feedback on whether it makes sense at all.

@sindresorhus
Copy link
Owner Author

Closing as this is not feasible. In addition to the above points:

  • There's no literal syntax for Decimal. It needs to be passed as a string, which makes using % impossible.
  • Even if we store Decimal internally, the main use-case is to pass it to methods that needs a Double-like type, so we would lose precision every time it's used in practice anyway.

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