You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let two = Self::new(&[FieldElement::<F>::one() + FieldElement::one()]);
160
+
let correction = two - temp;
161
+
q = q
162
+
.fast_multiplication::<F>(&correction)?
163
+
.truncate(2* current_precision);
164
+
165
+
current_precision *= 2;
166
+
}
167
+
168
+
// Final truncation to desired degree k
169
+
Ok(q.truncate(k))
170
+
}
114
171
}
115
172
116
173
pubfncompose_fft<F,E>(
@@ -269,6 +326,11 @@ mod tests {
269
326
vec
270
327
}
271
328
}
329
+
prop_compose!{
330
+
fn non_empty_field_vec(max_exp:u8)(vec in collection::vec(field_element(),1 << max_exp)) -> Vec<FE> {
331
+
vec
332
+
}
333
+
}
272
334
prop_compose!{
273
335
fn non_power_of_two_sized_field_vec(max_exp:u8)(vec in collection::vec(field_element(),2..1<<max_exp).prop_filter("Avoid polynomials of size power of two", |vec| !vec.len().is_power_of_two())) -> Vec<FE> {
274
336
vec
@@ -279,6 +341,11 @@ mod tests {
279
341
Polynomial::new(&coeffs)
280
342
}
281
343
}
344
+
prop_compose!{
345
+
fn non_zero_poly(max_exp:u8)(coeffs in non_empty_field_vec(max_exp)) -> Polynomial<FE> {
346
+
Polynomial::new(&coeffs)
347
+
}
348
+
}
282
349
prop_compose!{
283
350
fn poly_with_non_power_of_two_coeffs(max_exp:u8)(coeffs in non_power_of_two_sized_field_vec(max_exp)) -> Polynomial<FE> {
284
351
Polynomial::new(&coeffs)
@@ -332,6 +399,11 @@ mod tests {
332
399
fn test_fft_multiplication_works(poly in poly(7), other in poly(7)){
fn non_empty_field_vec(max_exp:u8)(vec in collection::vec(field_element(),1 << max_exp)) -> Vec<FE> {
444
+
vec
445
+
}
446
+
}
370
447
prop_compose!{
371
448
fn non_power_of_two_sized_field_vec(max_exp:u8)(vec in collection::vec(field_element(),2..1<<max_exp).prop_filter("Avoid polynomials of size power of two", |vec| !vec.len().is_power_of_two())) -> Vec<FE> {
372
449
vec
@@ -377,6 +454,11 @@ mod tests {
377
454
Polynomial::new(&coeffs)
378
455
}
379
456
}
457
+
prop_compose!{
458
+
fn non_zero_poly(max_exp:u8)(coeffs in non_empty_field_vec(max_exp)) -> Polynomial<FE> {
459
+
Polynomial::new(&coeffs)
460
+
}
461
+
}
380
462
prop_compose!{
381
463
fn poly_with_non_power_of_two_coeffs(max_exp:u8)(coeffs in non_power_of_two_sized_field_vec(max_exp)) -> Polynomial<FE> {
382
464
Polynomial::new(&coeffs)
@@ -432,6 +514,11 @@ mod tests {
432
514
fn test_fft_multiplication_works(poly in poly(7), other in poly(7)){
0 commit comments