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: calc tests #552

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

sparqet
Copy link
Collaborator

@sparqet sparqet commented Oct 22, 2023

Pull Request type

Please add the labels corresponding to the type of changes your PR introduces:

  • Bugfix
  • Testing

What is the new behavior?

  • Fix calc tests

Does this introduce a breaking change?

No

// );
// assert(roundup_magnitude_division(i128_new(0, false), 12) == i128_new(0, false), '0/12 should be 0');
assert(
roundup_magnitude_division(i128_new(12, true), 3) == i128_new(5, true), '-12/3 should be -4'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Result should be -4

roundup_magnitude_division(i128_new(9, false), 9) == i128_new(1, false), '9/9 should be 1'
);
assert(
roundup_magnitude_division(i128_new(9, true), 9) == i128_new(2, true), '-9/9 should be -1'
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be -1

Copy link
Collaborator

Choose a reason for hiding this comment

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

check other results below

sum_return_uint_128(
BoundedInt::max(), min_i128() + i128_new(1, false)
) == max_i128_as_u128()
+ 2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Getting +1 with gmx but this might be related to the issue we discussed with custom implementation

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.

4 participants