00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _FUNCTEXT
00024 #define _FUNCTEXT
00025
00026 #include <math.h>
00027 #include "moremath.h"
00028 #include "func.h"
00029
00030 typedef struct mathfunc_s
00031 {
00032 const char *func_text;
00033 double (*func_ptr)(double);
00034 } mathfunc;
00035
00036 #ifdef PARSER_CPP
00037
00038 mathfunc func_details[MTK_NUMBER_OF_FUNCS+1] = {
00039 {"",NULL},
00040 {" + ",NULL},
00041 {" - ",NULL},
00042 {" * ",NULL},
00043 {" / ",NULL},
00044 {"C",NULL},
00045 {"P",NULL},
00046 {"^",NULL},
00047 {"ln ",log},
00048 {"log ",log10},
00049 {"exp ",exp},
00050 {"sin ",sin},
00051 {"cos ",cos},
00052 {"tan ",tan},
00053 {"sec ",sec},
00054 {"cosec ",cosec},
00055 {"cot ",cot},
00056 {"arcsin ",asin},
00057 {"arccos ",acos},
00058 {"arctan ",atan},
00059 {"sinh ",sinh},
00060 {"cosh ",cosh},
00061 {"tanh ",tanh},
00062 {"arsinh ",ansi_asinh},
00063 {"arcosh ",ansi_acosh},
00064 {"artanh ",ansi_atanh},
00065 {"erf ",ansi_erf},
00066 {"erfc ",ansi_erfc},
00067 {"bessj ",NULL},
00068 {"H ",step},
00069 {"abs ",fabs},
00070 {"int ",integ},
00071 {"frac ",frac},
00072 {"!",factorial},
00073 {"(",NULL},
00074 {"",NULL},
00075 {"",NULL},
00076 {"pi ",NULL},
00077 {")",NULL},
00078 {",",NULL}
00079 };
00080
00081 #else
00082
00083 extern mathfunc func_details[39];
00084
00085 #endif
00086
00087 #endif