Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

139
Visualizações
What is the highest number that I can store in JavaScript? I was reading a book it says that JavaScript uses a fixed number of bits to store a value

JavaScript uses a fixed number of bits, 64 of them, to store a single number value. There are only so many patterns you can make with 64 bits, which means that the number of different numbers that can be represented is limited. With N decimal digits, you can represent 10^N numbers. Similarly, given 64 binary digits, you can represent 2^64 different numbers, which is about 18 quintillion (an 18 with 18 zeros after it).

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Javascript traditionally stores numbers as a 64 bit floating point with a 52 bit mantissa an 11 bit exponent and the sign is 1 bit. Effectively this means that

Integers are accurate up to 15 digits. -- w3schools.com

Now with ES6 the BigInt proposal has been finalized, so you can access a second type of number when dealing with integers that may be larger than 52 bits. There also exist some libraries for operations on large numbers provided as strings.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda