Discover Packages
github.com/consensys/gnark
std
internal
limbcomposition
package
Version:
v0.11.0
Opens a new window with list of versions in this module.
Published: Sep 6, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Decompose decomposes the input into res as integers of width nbBits. It
errors if the decomposition does not fit into res or if res is uninitialized.
The following holds
input = \sum_{i=0}^{len(res)} res[i] * 2^{nbBits * i}
Recompose takes the limbs in inputs and combines them into res. It errors if
inputs is uninitialized or zero-length and if the result is uninitialized.
The following holds
res = \sum_{i=0}^{len(inputs)} inputs[i] * 2^{nbBits * i}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.