Return to main.cpp CVS log | Up to [local] / OpenXM / src / ox_ntl |
File: [local] / OpenXM / src / ox_ntl / main.cpp (download)
Revision 1.1, Mon Nov 3 03:11:21 2003 UTC (20 years, 6 months ago) by iwane
added ox_ntl install `NTL' % make install-ntl install ox_ntl % make install EX. [1028] load("ntl.rr")$ [1040] F=ntl.ex_data(4); x^16-136*x^14+6476*x^12-141912*x^10+1513334*x^8-7453176*x^6+13950764*x^4-5596840*x^2+46225 [1041] F=F*subst(F,x,x+1)$ [1042] ntl.factor(PID,F); [[1,1],[x^16+16*x^15-16*x^14-1344*x^13-4080*x^12+32576*x^11+157376*x^10-255232*x^9-2062624*x^8-249088*x^7+10702080*x^6+9126912*x^5-18643712*x^4-24167424*x^3+2712576*x^2+10653696*x+2324736,1],[x^16-136*x^14+6476*x^12-141912*x^10+1513334*x^8-7453176*x^6+13950764*x^4-5596840*x^2+46225,1]] |
/* $OpenXM: OpenXM/src/ox_ntl/main.cpp,v 1.1 2003/11/03 03:11:21 iwane Exp $ */ #include "ox_toolkit.h" #include "oxserv.h" #include "ntl.h" #define VERSION 0x00000001 #define ID_STRING "$Revision: 1.1 $" #if 1 extern "C" { void dprintf(const char *, ...); } #endif static cmo * ntl_executeFunction(const char *func, cmo **arg, int argc) { if (strcmp(func, "fctr") == 0) { return (ntl_fctr(arg, argc)); } return (NULL); } int main(int argc, char *argv[]) { int fd = 3; int i; int ret; OXFILE *oxfp; oxfp = oxf_open(fd); ox_stderr_init(stderr); oxserv_set(OXSERV_SET_EXECUTE_FUNCTION, ntl_executeFunction, NULL); oxserv_init(oxfp, VERSION, ID_STRING, "ox_ntl", NULL, NULL); for (i = 0;; i++) { ret = oxserv_receive(oxfp); if (ret != OXSERV_SUCCESS) break; } oxserv_dest(); oxf_close(oxfp); return (0); }