Canonical float equality does not conform to RFC8949

オープン
#217 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
haskell
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Haskell
スター
8
フォーク
5
平均マージ
3日 12時間
マージ済み PR(30日)
4

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntersectMBO/cuddle のほかの issue

IntersectMBO/cuddle の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。