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

Invalid result when using u128 mod operation #77

Closed
kolay-v opened this issue Aug 5, 2022 · 1 comment · Fixed by #78
Closed

Invalid result when using u128 mod operation #77

kolay-v opened this issue Aug 5, 2022 · 1 comment · Fixed by #78

Comments

@kolay-v
Copy link

kolay-v commented Aug 5, 2022

My test case

as

export function test (a: u64, b: u64): u64 {
  return (u128Safe.from(a) % u128Safe.from(b)).toU64()
}

js

console.log(test(19n, 2n)) // outputs 0
@MaxGraey
Copy link
Owner

MaxGraey commented Aug 5, 2022

Thanks!

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 a pull request may close this issue.

2 participants