Loading topic
Number, and every Number is stored as a 64-bit IEEE 754 double-precision floating-point value. The precision surprises, special values, and limits covered later in this tutorial all come from that one design c2 min read** groups, and why % can return a n2 min read===. It builds on the earlier chapter about how JavaScript stores every Number as a 64-bit IEEE 754 double.2 min read=== and typeof. It also assumes you have read the earlier chapters on how the Number type stores values as IEEE 754 doubles and on the arithmetic operators.2 min readtypeof and === do. It also assumes you have read the earlier chapter on NaN, because most failed conversions produce it.2 min readNumber() converts strings, what NaN and Infinity are, and where the safe integer range ends. The focus here is on checking a value once you have it. That means answering questions like "is this a usable number?" and "is this a whole number I can count 2 min readNaN, Infinity, and -0 from earlier chapters. You should also be comfortable with the spread syntax (...).2 min readNaN and Infinity, and that numbers are stored as 64-bit floats. It covers the ** operator and the Math functions for powers, roots, exponentials, and logarithms, along with the mistakes people most often ma2 min readMath.floor and how it differs from Math.round and Math.trunc, which the rounding chapter covered. You should also be able to run JavaScript in a browser console or in Node.js 19 or later, where crypto is available as a global.2 min readMath.PI. You should also know from the floating-point chapter that results can carry tiny rounding errors. You will learn how JavaScript's trigonometric functions expect their input, why exact-looking answers somet2 min readMath.trunc behaves. Bitwise operators work on a different representation, and that difference explains several odd results.2 min readNumber.MAX_SAFE_INTEGER is 2^53 − 1 and that Numbers above it lose precision. You should also be comfortable with typeof and strict equality.1 min read