**Routines for executing TI-Basic operators**

Very few of the functions from this header file are documented as of now. Of
course, the ones which are undocumented have not been tested, either. It is
very likely that there are errors in this file, so use it with care.

However, we thought it might be a good idea to provide a header file for all
of the built-in TI-Basic operators which have a documented entry in the jump
table.
This way, you can easily search for particular operators if you need them. If
you use a function from this header file, please document it, too.

Many functions from this header file require their arguments to have some
specific format. They usually have to be internally simplified, which can be
achieved with the
push_internal_simplify
function from estack.h, and the result is an
internally simplified expression as well.

If you do not want to accept the AMS dependency of these functions, you can
usually construct an expression using their appropriate tags, and then call
push_internal_simplify.

**did_push_to_polar**- Executes TI-Basic '>Polar' operator.
**push_and**- Executes TI-Basic 'and' operator.
**push_arg_minus_1**- Executes TI-Basic '-' operator with constant 1.
**push_arg_plus_1**- Executes TI-Basic '+' operator with constant 1.
**push_assignment**- Executes TI-Basic '->' operator or 'Define' command.
**push_degrees**- Executes TI-Basic '°' operator.
**push_difference**- Executes TI-Basic '-' operator.
**push_dot_add**- Executes TI-Basic '.+' operator.
**push_dot_div**- Executes TI-Basic './' operator.
**push_dot_exponentiate**- Executes TI-Basic '.^' operator.
**push_dot_mult**- Executes TI-Basic '.*' operator.
**push_dot_sub**- Executes TI-Basic '.-' operator.
**push_equals**- Executes TI-Basic '=' operator.
**push_exponentiate**- Executes TI-Basic '^' operator.
**push_factorial**- Executes TI-Basic '!' operator.
**push_greater_than_or_equals**- Executes TI-Basic '>=' operator.
**push_greater_than**- Executes TI-Basic '>' operator.
**push_indir_name**- Executes TI-Basic '#' operator.
**push_less_than_or_equals**- Executes TI-Basic '<=' operator.
**push_less_than**- Executes TI-Basic '<' operator.
**push_list_plus**- Executes TI-Basic '.+' operator.
**push_list_times**- Executes TI-Basic '.*' operator.
**push_matrix_product**- Executes TI-Basic '*' operator for matrices.
**push_negate**- Executes TI-Basic '-' (negation) operator.
**push_not_equals**- Executes TI-Basic '/=' operator.
**push_not**- Executes TI-Basic 'not' operator.
**push_or**- Executes TI-Basic 'or' operator.
**push_percent**- Executes TI-Basic '%' operator.
**push_pow**- Executes TI-Basic '^' operator for floats.
**push_product**- Executes TI-Basic '*' operator.
**push_radians**- Executes TI-Basic '
^{r}' operator. **push_ratio**- Executes TI-Basic '/' operator.
**push_square**- Executes TI-Basic '^' operator with exponent 2.
**push_substitute_no_simplify**- Executes TI-Basic '|' operator (unsimplified).
**push_substitute_simplify**- Executes TI-Basic '|' operator (simplified).
**push_substitute_using_such_that**- Executes TI-Basic '|' operator.
**push_sum**- Executes TI-Basic '+' operator.
**push_to_cylin**- Executes TI-Basic '>Cylind' operator.
**push_to_sphere**- Executes TI-Basic '>Sphere' operator.

**CESI**- Represents a pointer to a constant expression.
**ESI**- Represents an index of a value on the TIOS expression stack.
**ESQ**- Represents a quantum within an expression.
**EStackIndex**- Represents an index of a value on the TIOS expression stack.
**Quantum**- Represents a quantum within an expression.
**SYM_STR**- Represents a pointer to the terminating zero byte of a string.

**Note:** All functions from this header file get parameters from the expression stack, so this
header file must be used in conjunction with estack.h. You need to
learn about the usage of the expression stack before using any function from this header file.
All functions defined here execute particular TI-Basic operators. They sometimes
may be useful to perform some operations which can not be implemented in C easily. But note that
if you use functions from this header file too much, this will decrease the performance of your
program significantly. In an extreme case, it will in fact decrease to that of a TI-Basic program! So
use functions from this header file only if it is really necessary. Also note that these
functions act exactly like the appropriate TI-Basic commands (including throwing errors if
something is wrong), so the use of an error tracking mechanism from the error.h
header file is highly recommended.

short did_push_to_polar (); |

**Executes TI-Basic '>Polar' operator.**

void push_and (CESI, CESI); |

**Executes TI-Basic 'and' operator.**

void push_arg_minus_1 (CESI); |

**Executes TI-Basic '-' operator with constant 1.**

void push_arg_plus_1 (CESI); |

**Executes TI-Basic '+' operator with constant 1.**

void push_assignment (CESI); |

**Executes TI-Basic '->' operator or 'Define' command.**

void push_degrees (CESI, CESI, CESI); |

**Executes TI-Basic '°' operator.**

void push_difference (CESI, CESI); |

**Executes TI-Basic '-' operator.**

void push_dot_add (CESI, CESI); |

**Executes TI-Basic '.+' operator.**

void push_dot_div (CESI, CESI); |

**Executes TI-Basic './' operator.**

void push_dot_exponentiate (CESI, CESI); |

**Executes TI-Basic '.^' operator.**

void push_dot_mult (CESI, CESI); |

**Executes TI-Basic '.*' operator.**

void push_dot_sub (CESI, CESI); |

**Executes TI-Basic '.-' operator.**

void push_equals (CESI, CESI); |

**Executes TI-Basic '=' operator.**

void push_exponentiate (CESI, CESI); |

**Executes TI-Basic '^' operator.**

void push_factorial (CESI); |

**Executes TI-Basic '!' operator.**

void push_greater_than_or_equals (CESI, CESI); |

**Executes TI-Basic '>=' operator.**

void push_greater_than (CESI, CESI); |

**Executes TI-Basic '>' operator.**

void push_indir_name (CESI); |

**Executes TI-Basic '#' operator.**

void push_less_than_or_equals (CESI, CESI); |

**Executes TI-Basic '<=' operator.**

void push_less_than (CESI, CESI); |

**Executes TI-Basic '<' operator.**

void push_list_plus (CESI ptr1, CESI ptr2); |

**Executes TI-Basic '.+' operator.**

Assuming that *ptr1* and *ptr2* point to tags of two lists
(or matrices, which are "lists of lists"),
push_list_plus pushes the element-by-element sum of these two lists to the
expression stack. If the lists are not equal in size, an error will be thrown.
If *ptr1* or *ptr2* doesn't point to a list tag, the behavior
is unpredictable.

void push_list_times (CESI ptr1, CESI ptr2); |

**Executes TI-Basic '.*' operator.**

Assuming that *ptr1* and *ptr2* point to tags of two lists
(or matrices, which are "lists of lists"),
push_list_times pushes an element-by-element product of these two lists to the
expression stack. If the lists are not equal in size, an error will be thrown.
If *ptr1* or *ptr2* doesn't point to a list tag, the behavior
is unpredictable.

void push_matrix_product (CESI ptr1, CESI ptr2); |

**Executes TI-Basic '*' operator for matrices.**

Assuming that *ptr1* and *ptr2* point to tags of two matrices
(which are, in fact, lists of equally sized lists), push_matrix_product pushes
the matrix product of these two matrices to the
expression stack. As the matrix product is not comutative, the matrix pointed
to by *ptr1* is assumed to be the first factor. If the matrices are not
compatible for multiplying, an error will be thrown.
If *ptr1* or *ptr2* don't point to matrices, the behavior
is unpredictable.

void push_negate (CESI); |

**Executes TI-Basic '-' (negation) operator.**

void push_not_equals (CESI, CESI); |

**Executes TI-Basic '/=' operator.**

void push_not (CESI); |

**Executes TI-Basic 'not' operator.**

void push_or (CESI, CESI); |

**Executes TI-Basic 'or' operator.**

void push_percent (CESI); |

**Executes TI-Basic '%' operator.**

void push_pow (CESI base_ptr, CESI exp_ptr); |

**Executes TI-Basic '^' operator for floats.**

Assuming that *base_ptr* and *exp_ptr* point to tags of two
floating point numbers (called *x* and *y* for example), push_pow
calculates *x* ^ *y* and pushes the result to the
expression stack. If this assumption is not true, garbage will be pushed
instead.

void push_product (CESI, CESI); |

**Executes TI-Basic '*' operator.**

void push_radians (CESI); |

**Executes TI-Basic ' ^{r}' operator.**

void push_ratio (CESI, CESI); |

**Executes TI-Basic '/' operator.**

void push_square (CESI); |

**Executes TI-Basic '^' operator with exponent 2.**

void push_substitute_no_simplify (CESI, CESI, CESI); |

**Executes TI-Basic '|' operator (unsimplified).**

void push_substitute_simplify (CESI, CESI, CESI); |

**Executes TI-Basic '|' operator (simplified).**

void push_substitute_using_such_that (CESI, CESI, CESI); |

**Executes TI-Basic '|' operator.**

void push_sum (CESI, CESI); |

**Executes TI-Basic '+' operator.**

void push_to_cylin (); |

**Executes TI-Basic '>Cylind' operator.**

void push_to_sphere (); |

**Executes TI-Basic '>Sphere' operator.**