Compatibility: unary negation of 0.0 loses negative zero versus purs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, rust
調査の方向性
Start by reviewing PR #474 and the reported unary-negation lowering and constant-folding behavior. Run the standalone Spago reproducer to compare signed-zero results between purs and Iris. Done means documenting the chosen compatibility contract and adding the small regression test if deliberate divergence is retained.
索引モデルが issue の本文から書いたものです。
説明
This is a documented runtime divergence, not yet a compiler-bug claim. With purs 0.15.15, Iris 0.1.1, Node 22.16.0 and registry set 81.1.0, a valid Number expression involving (-0.0) differs after unary negation is lowered. The signed-zero choice appears intentional in merged PR #474, which emits 0 - value and folds the negative-zero literal to positive zero. This issue asks that the compatibility contract be decided/documented, rather than presupposing the implementation must be changed.
Standalone observation (a fresh Spago package with prelude, effect, console, and argonaut-core dependencies; workspace.packageSet.registry: 81.1.0):
module Main where
import Prelude
import Data.Argonaut.Core as J
import Effect (Effect)
import Effect.Console (log)
main :: Effect Unit
main = log (show (map (1.0 / _) (J.toNumber (J.fromNumber (-0.0)))))
Purs prints (Just -Infinity); Iris 0.1.1 prints (Just Infinity). This is not JSON serialization: JSON.stringify(-0) is "0" on either side. In the generated caller, purs passes -0.0 to fromNumber, whereas Iris passes 0; both package paths use the same identity fromNumber FFI. The reciprocal merely exposes the zero sign observably.
The outcome may be an intentional interpretation of PureScript numeric negation rather than an Iris defect. What observable signed-zero behavior should Iris promise relative to purs for unary negation and constant folding? If deliberate divergence is supported, documenting it with a small regression test would let downstream users reason about it. No private repository link or fixture is required for the reproducer.
- 主要言語
- Rust
- スター
- 117
- フォーク
- 11
- 平均マージ
- 4時間 22分
- マージ済み PR(30日)
- 126
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
purefunctor/purescript-iris のほかの issue
-
bug language-server
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
purefunctor/purescript-iris#552 ·
メンテナーはふだん 1 日以内に返信
-
bug language-server
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
purefunctor/purescript-iris#551 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
purefunctor/purescript-iris#613 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
purefunctor/purescript-iris#610 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
purefunctor/purescript-iris#560 ·
メンテナーはふだん 1 日以内に返信
purefunctor/purescript-iris の issue をすべて見る
似ている issue
-
backend::vllm diffusion multimodal
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
lambdaclass/ethrex#7329 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
shadowsocks/shadowsocks-rust#2186 · コメント 1 件 ·
-
C-bug S-awaiting-triage
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
juspay/hyperswitch#14479 ·
メンテナーはふだん 1 日以内に返信