version 1.13, 2004/06/12 07:29:46 |
version 1.16, 2005/07/03 11:08:54 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/poly4.c,v 1.12 2003/08/24 05:19:42 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/poly4.c,v 1.15 2005/06/16 05:07:23 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <string.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
Line 41 struct matrixOfPOLY *parts(f,v) |
|
Line 42 struct matrixOfPOLY *parts(f,v) |
|
int *ev; |
int *ev; |
struct object *evList; |
struct object *evList; |
struct object *list; |
struct object *list; |
struct object ob; |
struct object ob = OINIT; |
POLY ans; |
POLY ans; |
POLY h; |
POLY h; |
extern struct ring *CurrentRingp; |
extern struct ring *CurrentRingp; |
Line 128 struct object parts2(f,v) |
|
Line 129 struct object parts2(f,v) |
|
int *ev; |
int *ev; |
struct object *evList; |
struct object *evList; |
struct object *list; |
struct object *list; |
struct object ob; |
struct object ob = OINIT; |
POLY ans; |
POLY ans; |
POLY h; |
POLY h; |
POLY ft; |
POLY ft; |
struct object ob1,ob2,rob; |
struct object ob1 = OINIT; |
|
struct object ob2 = OINIT; |
|
struct object rob = OINIT; |
|
|
|
|
if (f ISZERO || v ISZERO) { |
if (f ISZERO || v ISZERO) { |
|
|
int flag,d,dd,neg; |
int flag,d,dd,neg; |
|
|
if (f == ZERO) return(f); |
if (f == ZERO) return(f); |
t = f; maxg = (*grade)(f); flag = 0; |
|
maxdg = dDegree(f); |
t = f; |
|
maxg = (*grade)(f); |
|
while (t != POLYNULL) { |
|
dd = (*grade)(t); |
|
if (maxg < dd) maxg = dd; |
|
t = t->next; |
|
} |
|
/* fprintf(stderr,"maxg=%d\n",maxg); */ |
|
|
|
t = f; |
|
maxdg = dDegree(f); |
|
while (t != POLYNULL) { |
|
dd = dDegree(t); |
|
if (maxdg < dd) maxdg = dd; |
|
t = t->next; |
|
} |
|
/* fprintf(stderr,"maxdg=%d\n",maxdg); */ |
|
|
|
t = f; |
|
flag = 0; |
while (t != POLYNULL) { |
while (t != POLYNULL) { |
d = (*grade)(t); |
d = (*grade)(t); |
if (d != maxg) flag = 1; |
if (d != maxg) flag = 1; |