MathPad is a smart notepad that calculates answers based on what you type in. It allows you to type in math expressions, assign variables, define functions, convert units, add units together and much more. There is no enter button, it automatically evaluates everything you type as you type it. You can go back and edit, add, or delete anything you want at any time, just like a notepad.
Feel free to send me suggestions, likes, dislikes, bug reports, and feature requests. My email is firstname.lastname@example.org.
MathPad was designed to take full advantage of the computer screen, keyboard, and mouse. In the past many people tried to simulate calculators as closely as possible. They would even purposely add limitations to make it behave more like a regular calculator. For example, with many physical calculators if you are typing in an expression and make a mistake, you had to start all over again. On a PC there is no reason for this, but people would add that behavior as if it was a feature.
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.
There is a ton of unit support. This is a list of most of what you can do with units and how units behave.
- 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".
- Define your own units.
- Dimensional Analysis.
- Function "what is" can be used on units to give physical quantity or vise versa.
- Function "in base units" can be used on units to break it down into the base SI units that make it up.
While developing MathPad, there are a couple 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).