32 int main(
int argc,
char *argv[])
45 printf(
"Usage: %s <formula>\n", argv[0]);
49 if (!
formula(argv[1], &rpf, variable))
51 printf(
"Invalid formula\n");
57 printf(
"Given formula: %s\n", argv[1]);
59 printf(
"Reverse polish: ");
64 printf(
"Optimized reverse polish: ");
69 printf(
"Result: %f %f\n", d, test);