version 1.2, 2000/01/16 07:55:41 |
version 1.5, 2005/07/03 11:08:54 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/rat.c,v 1.4 2005/06/16 05:07:23 takayama Exp $ */ |
|
|
/* rat.c: rational functions */ |
/* rat.c: rational functions */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
Line 11 static void errorRationalFunction(char *str); |
|
Line 12 static void errorRationalFunction(char *str); |
|
static void warningRationalFunction(char *str); |
static void warningRationalFunction(char *str); |
|
|
struct object KnewRationalFunction0(op1,op2) |
struct object KnewRationalFunction0(op1,op2) |
objectp op1; |
objectp op1; |
objectp op2; |
objectp op2; |
{ |
{ |
struct object rob; |
struct object rob = OINIT; |
rob.tag = SrationalFunction; |
rob.tag = SrationalFunction; |
Knumerator(rob) = op1; |
Knumerator(rob) = op1; |
Kdenominator(rob) = op2; |
Kdenominator(rob) = op2; |
|
|
|
|
|
|
int KisZeroObject(op) |
int KisZeroObject(op) |
objectp op; |
objectp op; |
{ |
{ |
switch(op->tag) { |
switch(op->tag) { |
case Spoly: |
case Spoly: |
|
|
} |
} |
|
|
objectp copyObjectp(op) |
objectp copyObjectp(op) |
objectp op; |
objectp op; |
{ |
{ |
objectp rop; |
objectp rop; |
rop = newObject(); |
rop = newObject(); |
|
|
} |
} |
|
|
void errorRationalFunction(str) |
void errorRationalFunction(str) |
char *str; |
char *str; |
{ |
{ |
fprintf(stderr,"Error(rat.c): %s\n",str); |
fprintf(stderr,"Error(rat.c): %s\n",str); |
exit(20); |
exit(20); |
} |
} |
|
|
void warningRationalFunction(str) |
void warningRationalFunction(str) |
char *str; |
char *str; |
{ |
{ |
fprintf(stderr,"Warning(rat.c): %s\n",str); |
fprintf(stderr,"Warning(rat.c): %s\n",str); |
} |
} |