Canonical float equality does not conform to RFC8949

Abierto
#217 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
haskell
Área
backend

Línea de trabajo

Start by locating the canonical float equality and map key equivalence implementation in the Haskell code, then inspect the related tests. The issue requires integers to remain unequal to floats, equal numeric values across float widths to compare equal, and signed zero and NaN significands to follow RFC 8949 §5.6.1. Add or update tests for these cases and run the relevant test suite.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

According to the spec:

RFC8949 §2.

Note that integer and floating-point values are distinct in this
model, even if they have the same numeric value.

Also note that serialization variants are not visible at the generic
data model level. This deliberate absence of visibility includes the
number of bytes of the encoded floating-point value. It also
includes the choice of encoding for an "argument" (see Section 3)
such as the encoding for an integer, the encoding for the length of a
text or byte string, the encoding for the number of elements in an
array or pairs in a map, or the encoding for a tag number.

This means that integer types are always unequal to floating point numbers, even if numerically they would be equal. However floating point numbers with different bit widths can still be equal if they represent the same numerical value.

Additionally

RFC8949 §5.6.1.

Within each of these groups, numeric values are distinct unless they
are numerically equal (specifically, -0.0 is equal to 0.0); for the
purpose of map key equivalence, NaN values are equivalent if they
have the same significand after zero-extending both significands at
the right to 64 bits.

Lenguaje dominante
Haskell
Estrellas
8
Forks
5
Merge medio
3 d 12 h
PR fusionados (30 d)
4

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IntersectMBO/cuddle

Todos los issues de IntersectMBO/cuddle

Issues similares

Más issues de Haskell

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.