Math.signbit: IEEE-754 sign bit ?
Proposal details
- Stage: Unstaged
- Status: Withdrawn
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
Proposal overview
This proposal introduces Math.signbit to determine the sign bit of an IEEE-754 number, addressing cases where existing methods like Math.sign fail to distinguish negative zero from positive zero. It is currently in an early stage, with a polyfill available in core-js.
Note
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
Math.signbit proposal
Read the proposal for Math.signbit.
A polyfill is available in the core-js library. You can find it in the ECMAScript proposals section.