BitCake

Navigation

Mathpad Documentation

BitCake MathPad is a special type of notepad that allows you to type in math problems, assign variables, define functions and convert units. It automatically evaluates everything you type as you type it and automatically updates anything dependent on a variable that has been changed or a function that has been redefined. The latest version is available in the links below, as well as the old version, which used regex for almost everything.

Sections

Pages

Reserved Variables

MathPad stores the value of previous lines in different ways. Keep in mind that any line that uses 'total' or 'sum' is defined as a 'total line' or 'sum line'. So a line that just says "total" or a line that says "total + 500" are both considered to be a "total line".

ans, answer, prev Answer of previous line.
total, vtotal Sum of all previous lines that don't have reserved variables (except 'ans').
subtotal, vsubtotal Same as total, but resets at lines with 'total' or 'subtotal'.
count, vcount Counts all lines that don't have reserved variables (except for 'ans').
subcount, vsubcount Same as count, but resets at lines with 'count' or 'subcount'.
average, averageall Total / Count.

There are 6 reserved variables (not including the alt names). There are rules governing how they interact with each other. Answer is different from the rest of them, in that the rules that they follow say nothing about ans/answer/prev.

Constants are saved in their respective units. If you type in "speed of light" it will output "1,498,962,290 meter/second".

You can use unit conversion with constants. Typing "Earth.Circumference in inches" will output "1,577,755,956 inches".

(Future) - Dimensional Analysis.

(Future) - Define your own units. (inline & in settings).

Currency

Most unit values are constants. Currency unit values however, can change over time. This requires unit values to be updated regularly. MathPad downloads new foreign exchange rates (FOREX) whenever the current rates are more than a day old. You can also force an update in the Data Menu.

Constants

Constants are not case-sensitive. All available constants are accessible through the Constants Menu as well. However, many constants have alternative names, these can be found by opening up the data files that they are loaded from in the Data Menu.

Context

Language can be ambiguous at times, even mathematical symbols, such as the dash "-". MathPad is able to deal with some of these, and figure out the intended meaning of a symbol. So if you use the "-" symbol, MathPad will figure out if you're trying to do subtraction or negation. Below is a list of words and symbols that MathPad will use in a way that makes sense.

Logic And Bitwise Operators ("not", "and", "or", etc.) can be used on booleans (logic) or integers (bitwise).

Structural characters require context to be accounted for as well.

Both "<" and ">" can be bracekts for vectors: "<4,8>". Or as relational operators: "4 > 8", which outputs "False".

The "," can be used in numbers: "2,000,000". Or as a delimiter for functions parameters: "f(2,-2)". And vectors: "<4,8>".

Keep in mind that any word or symbol you use as a variable or user-defined function will take precedence over its default meaning.

Philosophy

While developing MathPad, there are a few things I keep in mind that help determine what features I add.

The Little Things Add Up: In software development, some features are categorized as "quality of life". They are often small changes that make things a bit more convenient. A good example of this is all the ways you can type numbers in (see: numeric syntax).

Empower Existing Features: When I added units to MathPad, all you could do was convert one unit to the next. The "units" feature was not powerful. Instead of moving on to the next completely new feature, I kept working on the "units" feature and coming up with ideas to make it a better feature (see: unit support).