Sindbad~EG File Manager
/* M. Beeson, for Mathpert
Declaration and initialization of constant terms
*/
/*
6.30.94 extracted from old files
4.17.95 code last modified
1.30.98 last modified
*/
#include <assert.h>
#define VAR_DLL
#include "export.h"
#include "terms.h"
#include "constant.h"
/*_______________________________________________________________________*/
static double const constvals[6] = {E_DECIMAL,0.0,PI_DECIMAL,0.0,1.0,0.0};
/* where the value pointers of e,pi, and i point */
/* two doubles for each of the three */
static const long intvals[MAXCONSTANTINT+1] = { 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L};
/* for the values of one, two, ... */
const term zero = {0,1,AE_BIT | INTEGER,(void *)intvals};
const term one = {0,1,AE_BIT | INTEGER,(void *)(intvals+1)};
const term two = {0,1,AE_BIT | INTEGER,(void *)(intvals+2)};
const term three = {0,1,AE_BIT | INTEGER,(void *)(intvals+3)};
const term four = {0,1,AE_BIT | INTEGER,(void *)(intvals+4)};
const term five = {0,1,AE_BIT | INTEGER,(void *)(intvals+5)};
const term six = {0,1,AE_BIT | INTEGER,(void *)(intvals+6)};
const term seven = {0,1,AE_BIT | INTEGER,(void *)(intvals+7)};
const term eight = {0,1,AE_BIT | INTEGER,(void *)(intvals+8)};
const term nine = {0,1,AE_BIT | INTEGER,(void *)(intvals+9)};
const term ten = {0,1,AE_BIT | INTEGER,(void *)(intvals+10)};
const term false = {FALSEFUNCTOR};
const term true = {TRUEFUNCTOR};
const term infinity = {INFINITY};
const term tiny = {TINY};
const term minusinfinity = { '-',1,NOTYPE,(void *)&infinity};
const term minusone = { '-',1, AE_BIT | INTEGER,(void *)&one};
const term complexi = { 'i',0, CE_BIT | GAUSSIAN,(void *)(constvals+4)};
const term eulere = { 'e',0, R,(void *) constvals};
const term pi = {PI_ATOM, 0, R, (void *)(constvals+2)};
term const piover2args[2] = {{PI_ATOM, 0, R,(void *)(constvals+2)},{0,1,AE_BIT | INTEGER,(void *)(intvals+2)}};
term const piover3args[2] = {{PI_ATOM, 0, R, (void *)(constvals+2)},{0,1,AE_BIT | INTEGER,(void *)(intvals+3)}};
const term piover2 = {'/',2,R,(void *) piover2args};
const term piover3 = {'/',2,R,(void *) piover3args};
const term var0 = {VAR,0,META_BIT, 0};
const term var1 = {VAR,0,META_BIT | 1,0};
const term right = {RIGHT}; /* for one-sided limit terms */
const term left = {LEFT};
const term undefined = {UNDEFINED};
const term unbounded_oscillations = {UNBOUNDED_OSCILLATIONS};
const term bounded_oscillations = {BOUNDED_OSCILLATIONS};
/*____________________________________________________________________*/
term constant_int( int i)
{ switch(i)
{ case 0: return zero;
case 1: return one;
case 2: return two;
case 3: return three;
case 4: return four;
case 5: return five;
case 6: return six;
case 7: return seven;
case 8: return eight;
case 9: return nine;
case 10: return ten;
default: assert(0);
}
return zero; /* avoid a warning message */
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists