FORM 4.3
Data Structures | Functions | Variables
ratio.c File Reference
#include "form3.h"

Go to the source code of this file.

Data Structures

struct  ARGBUFFER
 

Functions

WORD RatioFind (PHEAD WORD *term, WORD *params)
 
WORD RatioGen (PHEAD WORD *term, WORD *params, WORD num, WORD level)
 
WORD BinomGen (PHEAD WORD *term, WORD level, WORD **tstops, WORD x1, WORD x2, WORD pow1, WORD pow2, WORD sign, UWORD *coef, WORD ncoef)
 
WORD DoSumF1 (PHEAD WORD *term, WORD *params, WORD replac, WORD level)
 
WORD Glue (PHEAD WORD *term1, WORD *term2, WORD *sub, WORD insert)
 
WORD DoSumF2 (PHEAD WORD *term, WORD *params, WORD replac, WORD level)
 
int GCDfunction (PHEAD WORD *term, WORD level)
 
WORD * GCDfunction3 (PHEAD WORD *in1, WORD *in2)
 
WORD * PutExtraSymbols (PHEAD WORD *in, WORD startebuf, int *actionflag)
 
WORD * TakeExtraSymbols (PHEAD WORD *in, WORD startebuf)
 
WORD * MultiplyWithTerm (PHEAD WORD *in, WORD *term, WORD par)
 
WORD * TakeContent (PHEAD WORD *in, WORD *term)
 
int MergeSymbolLists (PHEAD WORD *old, WORD *extra, int par)
 
int MergeDotproductLists (PHEAD WORD *old, WORD *extra, int par)
 
WORD * CreateExpression (PHEAD WORD nexp)
 
int GCDterms (PHEAD WORD *term1, WORD *term2, WORD *termout)
 
int ReadPolyRatFun (PHEAD WORD *term)
 
int FromPolyRatFun (PHEAD WORD *fun, WORD **numout, WORD **denout)
 
WORD * TakeSymbolContent (PHEAD WORD *in, WORD *term)
 
void GCDclean (PHEAD WORD *num, WORD *den)
 
WORD * PolyDiv (PHEAD WORD *a, WORD *b, char *text)
 
int DIVfunction (PHEAD WORD *term, WORD level, int par)
 
WORD * MULfunc (PHEAD WORD *p1, WORD *p2)
 
WORD * ConvertArgument (PHEAD WORD *arg, int *type)
 
int ExpandRat (PHEAD WORD *fun)
 
int InvPoly (PHEAD WORD *inpoly, WORD maxpow, WORD sym)
 

Variables

WORD divrem [4] = { DIVFUNCTION, REMFUNCTION, INVERSEFUNCTION, MULFUNCTION }
 
char * TheErrorMessage []
 

Detailed Description

A variety of routines: The ratio command for partial fractioning (rather old. Schoonschip inheritance) The sum routines.

Definition in file ratio.c.

Function Documentation

◆ RatioFind()

WORD RatioFind ( PHEAD WORD *  term,
WORD *  params 
)

Definition at line 62 of file ratio.c.

◆ RatioGen()

WORD RatioGen ( PHEAD WORD *  term,
WORD *  params,
WORD  num,
WORD  level 
)

Definition at line 170 of file ratio.c.

◆ BinomGen()

WORD BinomGen ( PHEAD WORD *  term,
WORD  level,
WORD **  tstops,
WORD  x1,
WORD  x2,
WORD  pow1,
WORD  pow2,
WORD  sign,
UWORD *  coef,
WORD  ncoef 
)

Definition at line 320 of file ratio.c.

◆ DoSumF1()

WORD DoSumF1 ( PHEAD WORD *  term,
WORD *  params,
WORD  replac,
WORD  level 
)

Definition at line 395 of file ratio.c.

◆ Glue()

WORD Glue ( PHEAD WORD *  term1,
WORD *  term2,
WORD *  sub,
WORD  insert 
)

Definition at line 461 of file ratio.c.

◆ DoSumF2()

WORD DoSumF2 ( PHEAD WORD *  term,
WORD *  params,
WORD  replac,
WORD  level 
)

Definition at line 520 of file ratio.c.

◆ GCDfunction()

int GCDfunction ( PHEAD WORD *  term,
WORD  level 
)

Definition at line 609 of file ratio.c.

◆ GCDfunction3()

WORD * GCDfunction3 ( PHEAD WORD *  in1,
WORD *  in2 
)

Definition at line 1141 of file ratio.c.

◆ PutExtraSymbols()

WORD * PutExtraSymbols ( PHEAD WORD *  in,
WORD  startebuf,
int *  actionflag 
)

Definition at line 1244 of file ratio.c.

◆ TakeExtraSymbols()

WORD * TakeExtraSymbols ( PHEAD WORD *  in,
WORD  startebuf 
)

Definition at line 1273 of file ratio.c.

◆ MultiplyWithTerm()

WORD * MultiplyWithTerm ( PHEAD WORD *  in,
WORD *  term,
WORD  par 
)

Definition at line 1312 of file ratio.c.

◆ TakeContent()

WORD * TakeContent ( PHEAD WORD *  in,
WORD *  term 
)

Implements part of the old ExecArg in which we take common factors from arguments with more than one term. Here the input is a sequence of terms in 'in' and the answer is a content-free sequence of terms. This sequence has been allocated by the Malloc1 routine in a call to EndSort, unless the expression was already content-free. In that case the input pointer is returned. The content is returned in term. This is supposed to be a separate allocation, made by TermMalloc in the calling routine.

Definition at line 1376 of file ratio.c.

References GetModInverses().

◆ MergeSymbolLists()

int MergeSymbolLists ( PHEAD WORD *  old,
WORD *  extra,
int  par 
)

Definition at line 1808 of file ratio.c.

◆ MergeDotproductLists()

int MergeDotproductLists ( PHEAD WORD *  old,
WORD *  extra,
int  par 
)

Definition at line 1927 of file ratio.c.

◆ CreateExpression()

WORD * CreateExpression ( PHEAD WORD  nexp)

Definition at line 2020 of file ratio.c.

◆ GCDterms()

int GCDterms ( PHEAD WORD *  term1,
WORD *  term2,
WORD *  termout 
)

Definition at line 2076 of file ratio.c.

◆ ReadPolyRatFun()

int ReadPolyRatFun ( PHEAD WORD *  term)

Definition at line 2264 of file ratio.c.

◆ FromPolyRatFun()

int FromPolyRatFun ( PHEAD WORD *  fun,
WORD **  numout,
WORD **  denout 
)

Definition at line 2383 of file ratio.c.

◆ TakeSymbolContent()

WORD * TakeSymbolContent ( PHEAD WORD *  in,
WORD *  term 
)

Implements part of the old ExecArg in which we take common factors from arguments with more than one term. We allow only symbols as this code is used for the polyratfun only. We have a special routine, because the generic TakeContent does too much work and speed is at a premium here. Input: in is the input expression as a sequence of terms. Output: term: the content return value: the contentfree expression. it is in new allocation, made by TermMalloc. (should be in a TermMalloc space?)

Definition at line 2434 of file ratio.c.

References GetModInverses().

◆ GCDclean()

void GCDclean ( PHEAD WORD *  num,
WORD *  den 
)

Definition at line 2644 of file ratio.c.

◆ PolyDiv()

WORD * PolyDiv ( PHEAD WORD *  a,
WORD *  b,
char *  text 
)

Definition at line 2741 of file ratio.c.

◆ DIVfunction()

int DIVfunction ( PHEAD WORD *  term,
WORD  level,
int  par 
)

Definition at line 2788 of file ratio.c.

◆ MULfunc()

WORD * MULfunc ( PHEAD WORD *  p1,
WORD *  p2 
)

Definition at line 2957 of file ratio.c.

◆ ConvertArgument()

WORD * ConvertArgument ( PHEAD WORD *  arg,
int *  type 
)

Definition at line 3018 of file ratio.c.

◆ ExpandRat()

int ExpandRat ( PHEAD WORD *  fun)

Definition at line 3113 of file ratio.c.

◆ InvPoly()

int InvPoly ( PHEAD WORD *  inpoly,
WORD  maxpow,
WORD  sym 
)

Definition at line 3592 of file ratio.c.

Variable Documentation

◆ divrem

WORD divrem[4] = { DIVFUNCTION, REMFUNCTION, INVERSEFUNCTION, MULFUNCTION }

Definition at line 2786 of file ratio.c.

◆ TheErrorMessage

char* TheErrorMessage[]
Initial value:
= {
"PolyRatFun not of a type that FORM will expand: incorrect variable inside."
,"Division by zero in PolyRatFun encountered in ExpandRat."
,"Irregular code in PolyRatFun encountered in ExpandRat."
,"Called from ExpandRat."
,"WorkSpace overflow. Change parameter WorkSpace in setup file?"
}

Definition at line 3105 of file ratio.c.