Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bignum.nr
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,14 @@ pub unconstrained fn batch_invert<T: BigNum, let M: u32>(x: [T; M]) -> [T; M] {
})
}

pub unconstrained fn batch_invert_slice<T: BigNum, let M: u32>(x: [T]) -> [T] {
pub unconstrained fn batch_invert_slice<T: BigNum>(x: [T]) -> [T] {
let params = T::params();
assert(params.has_multiplicative_inverse);
crate::fns::unconstrained_ops::batch_invert_slice(params, x.map(|bn: T| bn.get_limbs()))
.map(|limbs| T::from_limbs(limbs))
}

pub fn to_field<T: BigNum, let N: u32, let MOD_BITS: u32>(bn: T) -> Field {
pub fn to_field<T: BigNum>(bn: T) -> Field {
let params = T::params();
limbs_to_field(params, bn.get_limbs())
}
2 changes: 1 addition & 1 deletion src/fns/unconstrained_ops.nr
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub(crate) unconstrained fn __add<let N: u32>(
* @brief given inputs `x, y` compute 2p + x - y (unconstrained)
* @description see `__neg` for why we use 2p instead of p
**/
pub(crate) unconstrained fn __sub<let N: u32, let MOD_BITS: u32>(
pub(crate) unconstrained fn __sub<let N: u32>(
modulus: [u128; N],
lhs: [u128; N],
rhs: [u128; N],
Expand Down