Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

87
Vistas
JavaScript SpeechSynthesisUtterance

Why does the SpeechSynthesisUtterance.volume property return "0.4000000059604645" when set to ".4"?

var u = new SpeechSynthesisUtterance();
u.volume = .4;
console.log(u.volume);

var u = new SpeechSynthesisUtterance();
u.volume = .4;
console.log(u.volume);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The .volume property is specified to be stored as a "float", which means that it's stored per single-precision 32 bit IEEE 754.

If you plug in 0.4, you get the hex value of 0x3ecccccd, which, when converted back to decimal, is 0.4000000059604645 (due to imprecision).

This is in contrast to normal JavaScript numbers, in which are stored as double-precision 64-bit numbers (and thus have many more accurate trailing digits).

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda