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

Support very large bigints #321

Closed
Tracked by #80
dansteren opened this issue May 18, 2022 · 1 comment
Closed
Tracked by #80

Support very large bigints #321

dansteren opened this issue May 18, 2022 · 1 comment
Assignees
Labels
bug A known issue where behavior deviates from expectations
Milestone

Comments

@dansteren
Copy link
Contributor

Looks like we have a limitation on large numbers. While implementing #57 I called dfx canister call factorial fac '(50)' expecting the value 30_414_093_201_713_378_043_612_608_166_064_768_844_377_641_568_960_512_000_000_000_000n
and instead got the following error:

Error: The Replica returned an error: code 5, message: "IC0503: Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped explicitly: Panicked at 'called Result::unwrap() on an Err value: TryFromJsValueError("Could not parse bigint to u128")', src/src/lib.rs:678:797"

Screenshot from 2022-05-18 11-53-49

dansteren added a commit that referenced this issue May 18, 2022
Note: This doesn't support very large numbers.

See #321
dansteren added a commit that referenced this issue May 19, 2022
Note: This doesn't support very large numbers.

See #321
@lastmjs lastmjs added this to the 1.0 milestone May 25, 2022
@lastmjs lastmjs added the bug A known issue where behavior deviates from expectations label Jul 27, 2023
@lastmjs lastmjs self-assigned this Jul 27, 2023
@lastmjs
Copy link
Member

lastmjs commented Jul 27, 2023

I just tried this example out and called fac 50 and received:

(
  30_414_093_201_713_378_043_612_608_166_064_768_844_377_641_568_960_512_000_000_000_000 : nat,
)

So seems like this issue, at least this specific problem described here, is solved

@lastmjs lastmjs closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A known issue where behavior deviates from expectations
Projects
None yet
Development

No branches or pull requests

2 participants