#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <sys/time.h>
#include <formula-calc.h>
#include <formula.h>
Go to the source code of this file.
Macros | |
#define | OPERATION_MUL 11 |
Functions | |
int | formula (const char *expr, struct rpf_t **rpf, const struct variables_t *variable) |
double | formula_eval (struct rpf_t *rpf) |
void | formula_free (struct rpf_t *rpf) |
struct rpf_t * | formula_optimize (struct rpf_t *rpf_orig) |
struct rpf_t * | formula_output (struct stack_t *num, int *sp_num, struct stack_t *op, int *sp_op, int rank) |
void | formula_print (FILE *stream, struct rpf_t *rpf) |
double | math_acos (double **val) |
double | math_add (double **val) |
double | math_asin (double **val) |
double | math_atan (double **val) |
double | math_atan2 (double **val) |
double | math_b_and (double **val) |
double | math_b_not (double **val) |
double | math_b_or (double **val) |
double | math_cos (double **val) |
double | math_cosh (double **val) |
double | math_div (double **val) |
double | math_e (double **val) |
double | math_eq (double **val) |
double | math_exp (double **val) |
double | math_fabs (double **val) |
double | math_geq (double **val) |
double | math_gtr (double **val) |
double | math_leq (double **val) |
double | math_let (double **val) |
double | math_ln (double **val) |
double | math_log10 (double **val) |
double | math_lss (double **val) |
double | math_mod (double **val) |
double | math_mul (double **val) |
double | math_neq (double **val) |
double | math_pi (double **val) |
double | math_pow (double **val) |
double | math_round (double **val) |
double | math_sign (double **val) |
double | math_sin (double **val) |
double | math_sinh (double **val) |
double | math_sqrt (double **val) |
double | math_sub (double **val) |
double | math_tan (double **val) |
double | math_tanh (double **val) |
int | rpf_count_num (struct rpf_t *rpf) |
struct rpf_t * | rpf_join (struct rpf_t *rpf, struct rpf_t *rpf2) |
struct rpf_t * | rpf_last (struct rpf_t *rpf) |
struct rpf_t * | rpf_push (struct rpf_t *rpf, struct stack_t *obj) |
Variables | |
struct operation_t | operation [] |
#define OPERATION_MUL 11 |
Definition at line 214 of file libformula-calc.c.
int formula | ( | const char * | expr, |
struct rpf_t ** | rpf, | ||
const struct variables_t * | variable | ||
) |
Definition at line 356 of file libformula-calc.c.
double formula_eval | ( | struct rpf_t * | rpf | ) |
Definition at line 639 of file libformula-calc.c.
void formula_free | ( | struct rpf_t * | rpf | ) |
Definition at line 618 of file libformula-calc.c.
Definition at line 670 of file libformula-calc.c.
struct rpf_t* formula_output | ( | struct stack_t * | num, |
int * | sp_num, | ||
struct stack_t * | op, | ||
int * | sp_op, | ||
int | rank | ||
) |
Definition at line 295 of file libformula-calc.c.
void formula_print | ( | FILE * | stream, |
struct rpf_t * | rpf | ||
) |
Definition at line 755 of file libformula-calc.c.
double math_acos | ( | double ** | val | ) |
Definition at line 147 of file libformula-calc.c.
double math_add | ( | double ** | val | ) |
Definition at line 82 of file libformula-calc.c.
double math_asin | ( | double ** | val | ) |
Definition at line 142 of file libformula-calc.c.
double math_atan | ( | double ** | val | ) |
Definition at line 137 of file libformula-calc.c.
double math_atan2 | ( | double ** | val | ) |
Definition at line 152 of file libformula-calc.c.
double math_b_and | ( | double ** | val | ) |
Definition at line 37 of file libformula-calc.c.
double math_b_not | ( | double ** | val | ) |
Definition at line 47 of file libformula-calc.c.
double math_b_or | ( | double ** | val | ) |
Definition at line 42 of file libformula-calc.c.
double math_cos | ( | double ** | val | ) |
Definition at line 112 of file libformula-calc.c.
double math_cosh | ( | double ** | val | ) |
Definition at line 127 of file libformula-calc.c.
double math_div | ( | double ** | val | ) |
Definition at line 97 of file libformula-calc.c.
double math_e | ( | double ** | val | ) |
Definition at line 199 of file libformula-calc.c.
double math_eq | ( | double ** | val | ) |
Definition at line 52 of file libformula-calc.c.
double math_exp | ( | double ** | val | ) |
Definition at line 162 of file libformula-calc.c.
double math_fabs | ( | double ** | val | ) |
Definition at line 179 of file libformula-calc.c.
double math_geq | ( | double ** | val | ) |
Definition at line 67 of file libformula-calc.c.
double math_gtr | ( | double ** | val | ) |
Definition at line 62 of file libformula-calc.c.
double math_leq | ( | double ** | val | ) |
Definition at line 77 of file libformula-calc.c.
double math_let | ( | double ** | val | ) |
Definition at line 167 of file libformula-calc.c.
double math_ln | ( | double ** | val | ) |
Definition at line 189 of file libformula-calc.c.
double math_log10 | ( | double ** | val | ) |
Definition at line 184 of file libformula-calc.c.
double math_lss | ( | double ** | val | ) |
Definition at line 72 of file libformula-calc.c.
double math_mod | ( | double ** | val | ) |
Definition at line 204 of file libformula-calc.c.
double math_mul | ( | double ** | val | ) |
Definition at line 92 of file libformula-calc.c.
double math_neq | ( | double ** | val | ) |
Definition at line 57 of file libformula-calc.c.
double math_pi | ( | double ** | val | ) |
Definition at line 194 of file libformula-calc.c.
double math_pow | ( | double ** | val | ) |
Definition at line 102 of file libformula-calc.c.
double math_round | ( | double ** | val | ) |
Definition at line 209 of file libformula-calc.c.
double math_sign | ( | double ** | val | ) |
Definition at line 172 of file libformula-calc.c.
double math_sin | ( | double ** | val | ) |
Definition at line 107 of file libformula-calc.c.
double math_sinh | ( | double ** | val | ) |
Definition at line 122 of file libformula-calc.c.
double math_sqrt | ( | double ** | val | ) |
Definition at line 157 of file libformula-calc.c.
double math_sub | ( | double ** | val | ) |
Definition at line 87 of file libformula-calc.c.
double math_tan | ( | double ** | val | ) |
Definition at line 117 of file libformula-calc.c.
double math_tanh | ( | double ** | val | ) |
Definition at line 132 of file libformula-calc.c.
int rpf_count_num | ( | struct rpf_t * | rpf | ) |
Definition at line 282 of file libformula-calc.c.
Definition at line 273 of file libformula-calc.c.
Definition at line 255 of file libformula-calc.c.
Definition at line 263 of file libformula-calc.c.
struct operation_t operation[] |
Definition at line 215 of file libformula-calc.c.