sqrt formular improvements

This commit is contained in:
Christoph J. Scherr 2023-05-21 13:56:01 +02:00
parent f3af2ab6a1
commit 27530769de
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
1 changed files with 1 additions and 0 deletions

View File

@ -196,6 +196,7 @@ impl GalloisFiled {
for index in 0..l { for index in 0..l {
// l-(i+1) // l-(i+1)
tmp = l - (index+1); tmp = l - (index+1);
tmp = modexp::modular_exponentiation_wrapper(2, tmp, self.base, false);
c[index as usize] = a.pow(2u32.pow((self.reduce(l as u128 - (index as u128 + 1)) * t) as u32) as u32) * b.pow(n[index as usize] as u32); c[index as usize] = a.pow(2u32.pow((self.reduce(l as u128 - (index as u128 + 1)) * t) as u32) as u32) * b.pow(n[index as usize] as u32);
if self.verbose { if self.verbose {
println!("{index}.\tc_{index} = {}", c[index as usize]); println!("{index}.\tc_{index} = {}", c[index as usize]);