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()]);
164
+
let correction = two - temp;
165
+
q = q
166
+
.fast_multiplication::<F>(&correction)?
167
+
.truncate(2* current_precision);
168
+
169
+
current_precision *= 2;
170
+
}
171
+
172
+
// Final truncation to desired degree k
173
+
Ok(q.truncate(k))
174
+
}
118
175
}
119
176
120
177
pubfncompose_fft<F,E>(
@@ -273,6 +330,11 @@ mod tests {
273
330
vec
274
331
}
275
332
}
333
+
prop_compose!{
334
+
fn non_empty_field_vec(max_exp:u8)(vec in collection::vec(field_element(),1 << max_exp)) -> Vec<FE> {
335
+
vec
336
+
}
337
+
}
276
338
prop_compose!{
277
339
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> {
278
340
vec
@@ -283,6 +345,11 @@ mod tests {
283
345
Polynomial::new(&coeffs)
284
346
}
285
347
}
348
+
prop_compose!{
349
+
fn non_zero_poly(max_exp:u8)(coeffs in non_empty_field_vec(max_exp)) -> Polynomial<FE> {
350
+
Polynomial::new(&coeffs)
351
+
}
352
+
}
286
353
prop_compose!{
287
354
fn poly_with_non_power_of_two_coeffs(max_exp:u8)(coeffs in non_power_of_two_sized_field_vec(max_exp)) -> Polynomial<FE> {
288
355
Polynomial::new(&coeffs)
@@ -336,6 +403,11 @@ mod tests {
336
403
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> {
448
+
vec
449
+
}
450
+
}
374
451
prop_compose!{
375
452
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> {
376
453
vec
@@ -381,6 +458,11 @@ mod tests {
381
458
Polynomial::new(&coeffs)
382
459
}
383
460
}
461
+
prop_compose!{
462
+
fn non_zero_poly(max_exp:u8)(coeffs in non_empty_field_vec(max_exp)) -> Polynomial<FE> {
463
+
Polynomial::new(&coeffs)
464
+
}
465
+
}
384
466
prop_compose!{
385
467
fn poly_with_non_power_of_two_coeffs(max_exp:u8)(coeffs in non_power_of_two_sized_field_vec(max_exp)) -> Polynomial<FE> {
386
468
Polynomial::new(&coeffs)
@@ -436,6 +518,11 @@ mod tests {
436
518
fn test_fft_multiplication_works(poly in poly(7), other in poly(7)){
0 commit comments