🔢Number
JS ⟩ value ⟩ primitive ⟩ number
arithmetic operator(s) do not allow to mix BigInt and Number❗
Be care with very small or very big numbers❗
const e = Number.EPSILON;         // 2^(-52)    (very small)
const BIG = Math.pow(10, 300);    // 10^300     (very big)
Number.EPSILON,               //  2.220446049250313e-16 = 2^(-52)
(0.1 + 0.2) - 0.3,            // ❗️ 5.551115123125783e-17 < e
0.1 + 0.2 === 0.3,            // ❗️ false  (should be true)
2.5 + e > 2.5,                // ❗️ false  (should be true)
BIG + 1 > BIG,                // ❗️ false  (should be true)   
BIG + 1 === BIG,              // ❗️ true   (should be false)- all numbers are floating-point. 
- all division have floating-point results. 
- operations of numbers 
- characteristics of numbers - 🔰floating-point - implementation of JS numbers. 
 
- number functions 
Last updated
Was this helpful?