Compare commits

...

2 Commits

Author SHA1 Message Date
dante
5144991b21 fix: update decompose base type 2025-10-26 14:34:36 -04:00
dante
64acb1d9d6 fix: bump decomp base to integerrep (#1016) 2025-10-25 23:22:12 -04:00

View File

@@ -6229,9 +6229,9 @@ pub(crate) fn recompose<F: PrimeField + TensorType + PartialOrd + std::hash::Has
(0..num_first_dims)
.flat_map(|_| {
(0..n).rev().map(|x| {
let base = (*base).checked_pow(x as u32);
let base = (*base as IntegerRep).checked_pow(x as u32);
if let Some(base) = base {
Ok(ValType::Constant(integer_rep_to_felt(base as IntegerRep)))
Ok(ValType::Constant(integer_rep_to_felt(base)))
} else {
Err(CircuitError::DecompositionBaseOverflow)
}
@@ -6341,9 +6341,9 @@ pub(crate) fn decompose<F: PrimeField + TensorType + PartialOrd + std::hash::Has
(0..input.len())
.flat_map(|_| {
(0..*n).rev().map(|x| {
let base = (*base).checked_pow(x as u32);
let base = (*base as IntegerRep).checked_pow(x as u32);
if let Some(base) = base {
Ok(ValType::Constant(integer_rep_to_felt(base as IntegerRep)))
Ok(ValType::Constant(integer_rep_to_felt(base)))
} else {
Err(CircuitError::DecompositionBaseOverflow)
}