version 1.1, 2000/12/13 11:01:29 |
version 1.2, 2000/12/14 03:19:51 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/lib/dfff,v 1.1 2000/12/13 11:01:29 noro Exp $ */ |
|
|
#define MAXLEVEL 50 |
#define MAXLEVEL 50 |
|
|
|
|
#include "defs.h" |
#include "defs.h" |
|
|
extern TPMOD,TQMOD$ |
extern TPMOD,TQMOD$ |
|
|
|
def df_demo() |
|
{ |
|
purge_stdin(); |
|
print("Degree of input polynomial to be factored => ",0); |
|
Str = get_line(); |
|
N = eval_str(Str); |
|
P = lprime(0); |
|
setmod_ff(P); |
|
for ( I = 0, F = 1; I < N; I++ ) |
|
F *= randpoly_ff(2,x); |
|
print(""); |
|
print("Factorization of ",0); |
|
print(F,0); |
|
print(" over GF(",0); print(P,0); print(")"); |
|
print(""); |
|
R = fctr_ff(F); |
|
print(R); |
|
} |
|
|
/* |
/* |
Input : a univariate polynomial F |
Input : a univariate polynomial F |