[go: nahoru, domu]

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

Math #25

Open
ljharb opened this issue Nov 15, 2019 · 4 comments
Open

Math #25

ljharb opened this issue Nov 15, 2019 · 4 comments

Comments

@ljharb
Copy link
Member
ljharb commented Nov 15, 2019

BigInt currently is not usable with the Math methods; this will become a much greater problem as BigInt usage spreads (and is something that can be dealt with by a separate proposal).

I would not be pleased if BigDecimal advanced very far without addressing Math as part of the initial proposal; I think it was a mistake for BigInt to defer this concern.

Thoughts?

@littledan
Copy link
Member

I'd be up for changing that as part of this whole package, or as a separate proposal to champion first. Do you or anyone else want to propose concretely what to do?

@ljharb
Copy link
Member Author
ljharb commented Nov 16, 2019

I’d be willing to look into championing a separate proposal to add BigInt to Math, with an eye for making BigDecimal neatly fit into it.

@js-choi
Copy link
js-choi commented Dec 14, 2021

See also the Stage-1 BigInt Math proposal, tc39/proposal-bigint-math#13, tc39/proposal-bigint-math#14, and tc39/proposal-bigint-math#17.

My current understanding is that @sarahghp, the lead champion of the Decimal proposal, supports BigInt Math’s current type-polymorphic approach, although I may be mistaken. I, maybe she, and also some other TC39 representatives plan to discuss this in a future TC39 BigInt Math incubator call.

@sarahghp
Copy link
Contributor

Yes, @js-choi is correct: I'm very interested in type polymorphism for BigInt Math and extending that to Decimal. I look forward to the incubator call.

I do think there's a bit of an open question about how that interacts with some Decimal-only library functions (for instance, Decimal.divide(..), but I also think there are clear conceptual differences that will make it less confusing in practice.

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

4 participants