Special thanks to **Scott Hein** and **Ali Hussain**, who were excellent group members. I extracted the core logic from an old group project of ours for this application.

**Micro** is an infix calculator. The tool is a console with a frustratingly unnecessary language. Simply put, it's just a calculator with severe usability issues. According to a friend, it's like a butcher knife with no handle.

You simply type commands, which will produce calculations, store or retrieve variables, etc. The calculator is *stateful*, meaning that you can create variables for use throughout a single session.

The tool is case insensitive, and you can substitute [brackets] wherever you see (parentheses).

Commands take between 0-2 parameters.

A parameter for an operation can be other functions, so long as the function returns a value (i.e., not *set* or *clear*).

Any numeric parameter can be a decimal or a fraction. See *fract* for more information.

Simple arithmetic operations:

**add(x,y)**: Add number*x*to number*y*.**subtract(x,y)**: Subtract number*y*from number*x*.**multiply(x,y)**: Multiply number*x*by number*y*.**divide(x,y)**: Divide number*x*by number*y*.**exp(x,y)**: Raise the number*x*to the*y*power.**sqrt(x)**: Take the square root of number*x*.

Representational operations:

**fract(x,y)**: Create a lossless fraction of*x*overy. For example, you can store one-third without the loss of information when calculated as a decimal.

Miscellaneous operations:

**rand(x,y)**: Create a random number between*x*(inclusive) and*y*(exclusive).**set(x,y)**: Set a value*y*to a variable*x*. To retrieve the value of*x*, use*val(x)*. You may use any string without spaces, such as*blimish*or*cartography*.**val(x)**: Retrieve value for variable*x*. Variable must have value set using*set*.**clear**: Clear the screen and all variables.

The following shows some inputs and outputs.

add(1,2) > 3 subtract(1,2) > -1 set(car,fract(1,2)) > done subtract(2,val(car)) > 3|2 set(die,rand(1,7)) > done val(die) > 3 sqrt(val(die)) > 1.4142135623731

There are no valid use cases for this toy.