You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
Should we have functions on BigInt to cast to and from Numbers, bitwise? Or, is the better primitive to have functions based on Numbers which construct a Number from an exponent and mantissa, and to deconstruct it that way? Or, would it be better not to expose this at all, as it would add an additional place where NaN payloads are exposed beyond TypedArrays?
The text was updated successfully, but these errors were encountered:
My worry is that, performance wise, deconstructing would be difficult to optimize or would be easy to slip off the fast path. Strong preference for a cast function in both directions.
The current plan is to leave this feature for a "v2", and that this cast sits outside of the minimal viable product for BigInt. I presented this plan to TC39 in May and they were supportive. However, I'm OK to revisit this any time. One negative point about this function was some hand-wringing about exposing NaN bits in more places, but in my opinion that's rather unjustified, as TypedArrays already expose them, and this is exactly equivalent. Closing for now, as the hope is to go to for Stage 3 without this function.
Should we have functions on BigInt to cast to and from Numbers, bitwise? Or, is the better primitive to have functions based on Numbers which construct a Number from an exponent and mantissa, and to deconstruct it that way? Or, would it be better not to expose this at all, as it would add an additional place where NaN payloads are exposed beyond TypedArrays?
The text was updated successfully, but these errors were encountered: