#include <modular_polynomial.hpp>
Definition at line 135 of file modular_polynomial.hpp.
static void mul_mod | ( | polynomial< C, V > & | dest, | |
const polynomial< C, V > & | s1, | |||
const polynomial< C, V > & | s2, | |||
const M & | m, | |||
polynomial< C, V > & | carry | |||
) | [inline, static] |
Definition at line 170 of file modular_polynomial.hpp.
References mul_mod().
00171 { 00172 dest = s1; 00173 mul_mod (dest, s2, m, carry); }
static void mul_mod | ( | polynomial< C, V > & | dest, | |
const polynomial< C, V > & | s1, | |||
const polynomial< C, V > & | s2, | |||
const M & | m | |||
) | [inline, static] |
Definition at line 164 of file modular_polynomial.hpp.
References mul_mod().
00165 { 00166 dest = s1; 00167 mul_mod (dest, s2, m); }
static void mul_mod | ( | polynomial< C, V > & | dest, | |
const polynomial< C, V > & | s, | |||
const M & | m, | |||
polynomial< C, V > & | carry | |||
) | [inline, static] |
Definition at line 149 of file modular_polynomial.hpp.
References mmx::degree(), mmx::is_exact_zero(), mul_mod(), Polynomial, and mmx::rshiftz().
00150 { 00151 if (is_exact_zero (*m)) { 00152 dest = dest * s + carry; 00153 carry = 0; 00154 } 00155 else { 00156 int d= degree (*m); 00157 Polynomial a= dest * s + carry; 00158 carry= rshiftz (rshiftz (a, d) * m.q, d); 00159 dest= a - carry * (* m); 00160 } 00161 }
static void mul_mod | ( | polynomial< C, V > & | dest, | |
const polynomial< C, V > & | s, | |||
const M & | m | |||
) | [inline, static] |
Definition at line 138 of file modular_polynomial.hpp.
References mmx::degree(), mmx::is_exact_zero(), Polynomial, and mmx::rshiftz().
00138 { 00139 if (is_exact_zero (*m)) dest *= s; 00140 else { 00141 int d= degree (*m); 00142 Polynomial a= dest * s; 00143 Polynomial b= rshiftz (rshiftz (a, d) * m.q, d); 00144 dest= a - b * (* m); 00145 } 00146 }