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

using i256 for large prime fails in ziglang #1

Open
savil opened this issue Dec 29, 2021 · 0 comments
Open

using i256 for large prime fails in ziglang #1

savil opened this issue Dec 29, 2021 · 0 comments

Comments

@savil
Copy link
Owner

savil commented Dec 29, 2021

  • see branch savil/primitive-nth-root.
  • following the suggestion at https://aszepieniec.github.io/stark-anatomy/basic-tools#finite-field-arithmetic, I was setting the prime to be 1 + 407 * ( 1 << 119 ) but this requires i256 integer type.
  • i256 can be easily set by toggling the type in FiniteElement.TValue and Field.prime (see finite-fields/src/FiniteElement.zig)
  • however, running with this type, I get LLVM ERROR: Unsupported library call operation!

It is a known zig issue, and may need a language fix.
ziglang/zig#1485

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

No branches or pull requests

1 participant