Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

EvalOr: x<a || x>a over non-integer types simplifies to true

クローズ
#170 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

Start by reading EvalOr.orComparisonTrue and the adjacent notXb1 branch mentioned in the issue. Check how the comparison bounds and allowEquals() are handled for non-integer types, then run the relevant boolean simplifier tests. Done when strict comparisons at an equal bound no longer simplify to true, while the listed integer cases keep their current results.

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

説明

`EvalOr.orComparisonTrue` decides `x <= a || x >= b` with the two bounds only. For mathematically integer bounds on integer types that is right, because the strictness is folded into the bound (`k<3` is stored as `k<=2`, `k>3` as `k>=4`). For non-integer bounds, or integer bounds on a non-integer type, it returns `d0 == d1` without looking at `allowEquals`, so two strict comparisons on the same bound pass as a tautology:

  • `l<2.5 || l>2.5` (l a double) evaluates to `true`; it is false at l == 2.5
  • `l<3.0 || l>3.0` evaluates to `true`
  • `k<3 || k>3` (k an int) correctly stays `k<3||k>=4`
  • `k<=3 || k>=3` correctly becomes `true`

Found while benchmarking the boolean simplifier (the structural isNegationOf work). Not fixed there, since it changes verdicts: the non-integer branch needs `gt0.allowEquals() || gt1.allowEquals()` when the bounds coincide, and `x<a || x>a` should probably become `x != a` as the `notXb1` branch below it already does for the negated form.

🤖 Generated with Claude Code

主要言語
Java
スター
1
フォーク
1
平均マージ
1時間 55分
マージ済み PR(30日)
8

環境構築

はじめの一歩

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

CodeLaser/maddi のほかの issue

CodeLaser/maddi の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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