Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in zz_addi, zz_subi functions #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssinai1
Copy link

@ssinai1 ssinai1 commented Aug 29, 2022

These are corner case errors:
infinite recursion in zz_subi when c = LONG_MIN
and non-normalized result when a and c are both zero.
I fixed it by adding two new functions - not sure what the names should be (addu, addui...?).

…= LONG_MIN), and the non-normalization bug in zz_subi
turtle-dragonfly added a commit to turtle-dragonfly/bsdnt that referenced this pull request Mar 11, 2024
This bug is fixed in wbhart#23, but here
we add a test to demonstrate the issue, first.
@turtle-dragonfly
Copy link
Contributor

turtle-dragonfly commented Mar 11, 2024

Thank you for this fix. I would suggest adding some tests to exercise the issue(s).

I made one for myself, here: https://github.com/turtle-dragonfly/bsdnt/tree/test-inf-recursion-bug
Feel free to incorporate it (probably squash the commits).

@wbhart
Copy link
Owner

wbhart commented Mar 12, 2024

I agree. Thanks for the fix, but please consider adding some tests for the new functions. The general philosophy should be one of testing every function.

There should be tests for the original issue as well.

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.

3 participants