tc39 / proposal-bigint-math

Draft specification for supporting BigInts in JavaScript’s Math methods.
https://tc39.es/proposal-bigint-math/
BSD 3-Clause "New" or "Revised" License
36 stars 2 forks source link

Rounded divisions #22

Closed Rudxain closed 1 year ago

Rudxain commented 1 year ago

Please read: https://github.com/rwaldron/proposal-math-extensions/issues/28#issuecomment-1232592627 . I won't repeat myself.

If those methods aren't added to Math, then at least they should be available on BigInt (non-polymorphic)

js-choi commented 1 year ago

Also related to https://github.com/rwaldron/proposal-math-extensions/issues/21, there should be methods dedicated to rounded division, specially because of BigInts (only valid if BigInt-Math gets to Stage4). BigInts can only be divided using truncated div. It would be very helpful if there were built-in methods for other div rounding modes

Thanks for opening this issue.

Adding new division functions is out of scope of this proposal, which is only about extending existing Math functionality to bigints. New division functionality would need to be a follow-up proposal with its own list of use cases. It may be worth opening a new thread in the TC39 Discourse ideas forum about this. Thanks again!