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.
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.
Ctrl+D (D)elete/clear current page. Ctrl+F (F)ile open. Ctrl+H (H)elp [Online Documentation] Ctrl+I D(i)ctionary Manager. Ctrl+K (K)eyboard Shortcuts. Ctrl+M (M)ain Menu visibility toggle. Ctrl+O (O)ptions/Settings. Ctrl+R (R)andomize window color Ctrl+S (S)ave page to file Ctrl+T (T)ab Menu visibility toggle Ctrl+W (W)indow spawn. Cntrl + Mouse Wheel for zooming (font size).
Supported Numeric Syntax
There are many ways to type numbers in. All of these examples are the exact same number.
25800000 25,800,000 25 800 000 25,800k 25.8kk 25.8 × 10^6 25.8e6 25.8e+6 25.8e-6 25.8 million 0b110 (binary) 0o70 (octal) 0xff (hexadecimal)
- Unit Conversion: You can convert units like so, "5 meters to feet" or "pound to kilogram".
- Unit Conversion: To convert units you can type "to" or "in".
- Unit arithmetic: "4 feet + 8 inches" outputs "4.66 feet".
- Unit arithmetic: You can combine it with unit conversion, so "2 meters + 4 inches in feet" outputs "6.9 feet"
- Implied 1. The units in "pint to cup" and the first unit in "foot + 2 meters" have an invisible 1 before it.
- Implied first unit used. If you type "meter + 2 feet + 10", it is the same as typing "meter + 2 feet + 10 meters".
- Multiple ways to type a unit: inch or inches and foot or feet.
- Can pass angle units into trig functions: sin(1 radian) or sin(1.2 rads) & cos(90 degrees) or cos(180 degs).
- Can pass units into user-defined functions.
- Convert between mass & energy (E=mc^2) . E.g. 10 megatons to pounds = 1.03 pounds.
- 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).
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.
MathPad uses MyCurrency and Cryptonator to download exchange rates. continue
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.
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.
- Dash "-" can be subtraction or negation.
- Percent "%" can be percent suffix or modulo operator.
- Bash "!" can be factorial or logical not.
- Semicolon ":" can be division (i.e. ratio) or equals (e.g. price: $20).
- 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.
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).