Skip to content

Comments

fix: correct bitwise-eqv to return integer instead of boolean#465

Merged
da-liii merged 2 commits intoMoganLab:mainfrom
aadiexii:fix/bitwise-eqv-issue-90
Feb 25, 2026
Merged

fix: correct bitwise-eqv to return integer instead of boolean#465
da-liii merged 2 commits intoMoganLab:mainfrom
aadiexii:fix/bitwise-eqv-issue-90

Conversation

@aadiexii
Copy link
Contributor

What is the issue?
Fixes #90

The current implementation of bitwise-eqv in srfi-151.scm
returns a boolean (#t or #f) instead of an integer, which
is incorrect according to the SRFI 151 standard.

What was changed?

  • goldfish/srfi/srfi-151.scm

Before:
(define (bitwise-eqv a b)
(= (bitwise-xor a b) 0))

After:
(define (bitwise-eqv a b)
(bitwise-not (bitwise-xor a b)))

Why?
SRFI 151 specifies that bitwise-eqv should return an integer
(bitwise XNOR), not a boolean equality check.

@da-liii
Copy link
Contributor

da-liii commented Feb 25, 2026

@aadiexii
Copy link
Contributor Author

@da-liii I have updated the tests. Lemme know if there is anything else changes or updation needed.

Copy link
Contributor

@da-liii da-liii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@da-liii da-liii merged commit 5a2fbab into MoganLab:main Feb 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bitwise-eqv

2 participants