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

233
Vistas
Infinity - number = infinity

In javascript Infinity - 100 results in Infinity which makes sense, but the resulted Infinity does not appear to be less than the initial Infinity like in real math.

I am trying to sort some array, and items from array that don't have a certain property are assigned a default Infinity value, then sorting should fallback to Infinity minus a different property. The problem is that this subtraction does not produce different Infinity values.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You don't have to think of Infinity as a number. Infinity minus a finite number is still (the same) Infinity, it's math theory. That's why you get that result.

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