#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "canonicalform.h"
#include "cf_iter.h"
#include "fac_util.h"
#include "cfUnivarGcd.h"
Go to the source code of this file.
◆ extgcd()
Definition at line 183 of file fac_util.cc.
184{
188
190 {
192 (void)
extgcd( amodp, bmodp, smodp, tmodp );
193 }
196
197 for (
j = 1;
j <
k;
j++ ) {
198 e = ( 1 -
s * a - t *
b ) / modulus;
200 {
202 sigmat = smodp * e;
203 taut = tmodp * e;
204 divrem( sigmat, bmodp, q, sigma );
205 tau = taut + q * amodp;
206 }
211 }
213}
void tau(int **points, int sizePoints, int k)
const CanonicalForm int s
void extgcd(const CanonicalForm &a, const CanonicalForm &b, CanonicalForm &S, CanonicalForm &T, const modpk &pk)
◆ mappk()
Definition at line 109 of file fac_util.cc.
110{
112}
STATIC_INST_VAR CanonicalForm PK
◆ mappksymmetric()
Definition at line 99 of file fac_util.cc.
100{
104 else
106}
STATIC_INST_VAR CanonicalForm PKHALF
◆ prod() [1/2]
◆ prod() [2/2]
◆ remainder()
Definition at line 115 of file fac_util.cc.
116{
117 ASSERT( (
f.inCoeffDomain() ||
f.isUnivariate()) && (
g.inCoeffDomain() ||
g.isUnivariate()) && (
f.inCoeffDomain() ||
g.inCoeffDomain() ||
f.mvar() ==
g.mvar()),
"can not build remainder" );
118 if (
f.inCoeffDomain() )
119 if (
g.inCoeffDomain() )
121 else
123 else {
126 int degg =
g.degree();
130 {
132 {
135 }
136 }
137 else
138
139 {
142 {
145 }
147 {
152 else
153 {
154
156 }
159 }
160 }
162 }
163}
#define ASSERT(expression, message)
factory's class for variables
CanonicalForm inverse(const CanonicalForm &f, bool symmetric=true) const
CanonicalForm remainder(const CanonicalForm &f, const CanonicalForm &g, const modpk &pk)
◆ replaceLc()
Definition at line 90 of file fac_util.cc.
91{
92 if (
f.inCoeffDomain() )
93 return c;
94 else
96}
◆ PK
◆ PKHALF