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

182
Visualizações
multiplication error of JavaScript and then

50000 * 1.1 is followed by a decimal point.
50000 + (50000 * 0.1) calculated correctly.

I found

  1. There are limitations when expressing numbers with a computer.
  2. When converting a decimal number to a binary phenomenon that an infinite decimal number is generated.
  3. When expressing an infinite number as a finite number, there are values that are exceeded or lost, resulting in a calculation error.

And there are workarounds such as toFixed(), Math object method, and library.
I understand a bit, but I have a question.

Question 1.
If I use methods such as toFixed(), Math object methods, libraries, etc., do I get 100% reliability without any errors?
For example, where calculations are important, such as in a bank, which method do you use?

Question 2.
50000 + (50000 * 0.1) gave no error.
However, unless a separate calculation error resolution method is used, When the number is changed, is there a there a calculation error?

about 4 years ago · Juan Pablo Isaza
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