Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#170 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

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.

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

Descripción

`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

Lenguaje dominante
Java
Estrellas
1
Forks
1
Merge medio
1 h 55 min
PR fusionados (30 d)
8

Preparar el entorno

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 CodeLaser/maddi

Todos los issues de CodeLaser/maddi

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.