## Updates

Here you can find the update history, as well as the most current update being worked on.

### BETA 4.3 (2017-07-11)

- Data: You can now save custom functions, constants, and units. Mass units are actually saved in joules since mass is a form of potential energy (i.e. E=mc
^{2}) and MathPad lets you convert between the two. Because of this, the special UI for adding units allows you to type custom units of mass in kilograms and MathPad then converts it into joules behind the scene. Also, the format of units in data text file now mirrors the custom units format. - Units: Can be case-sensitive now, such as Calorie (i.e. big calorie) vs calorie.
- Settings: Added option to autoload currency data on startup.
- File Menu: Added "Save", before there was only "Save As".
- Bug: The conversion functions "to" & "in" would throw an error when embedded in uknowns (e.g. 4 tins + 5 brass).
- Passes 1156 single-line tests (CalcX) & 53 multi-line tests (MathPad), which adds an additional 308 lines (total lines: 1464).

### BETA 4.2 (2017-07-07)

- Parsing: The bash symbol '!' can now be used for both factorial and logical not. MathPad decides based on context.
- Units: Added pi-radian to trig units. Changed trig mode text "Pi Radians" to "Pi-Radians".
- Constants: Added more math constants and physics constants.
- Bug: Chop 0 no longer cuts off integers to 1 character (e.g. 100,000 to 1).
- Bug: Functions with more than one parameter were not evaluating correctly if operators were being passed in, such as the negation operator in "f(-2,2)". This issue appears to have arrived after beginning the use of the shunting algorithm.
- Bug: Various other issues were fixed, especially concerning updating output.
- Passes 1094 single-line tests (CalcX) & 58 multi-line tests (MathPad), which adds an additional 336 lines (total lines: 1430).

### BETA 4.1 (2017-05-22)

- Parsing: MathPad now determines whether the user is using '%' as a percent suffix or modulo operator based on context.
- DataType: Added new data type: Percent. The "%" symbol used to perform an operation (e.g. 10% was (10*0.01).
- DataType: Percents work differently now (e.g. "50 + 20%" used to be "50 + .2", but now it's "50 + (.2 * 50)".
- Parsing: MathPad now determines whether the user is using '%' as a percent suffix or modulo operator based on context.
- Function: The keyword "of" is its own function now and works slightly different from "*".
- Function: Added Gamma, ProductLoop, 'to/in/as decimal', IsWhatPercentOf, and OfWhatIs.
- Percentage Calculator: Automatically adds "%" as user types (where needed). Also various changes and fixes.
- Graph: Added "Syntax" section to settings with 3 new settings.
- Graph: Plotting a function now uses page scope so you can use variables.
- Code: Major changes to function interfaces, the code is far less convoluted.
- Passes 1072 single-line tests (CalcX) & 53 multi-line tests (MathPad), which adds an additional 295 lines (total lines: 1367).

### BETA 4.0 (2017-03-30)

- Calc Menu: Added Graphing Calculator.
- Calc Menu: Added Color Calculator.
- Number Bases: Added syntax for bin, oct and hex numbers (e.g. 0b110, 0o70, and 0xff).
- Settings: Can choose to treat '^' as xor instead of exponentiation, and treat '%' as modulo instead of percent.
- Passes 980 single-line tests (CalcX) & 52 multi-line tests (MathPad), which adds an additional 288 lines (total lines: 1268).

### BETA 3.7 (2016-10-26)

- Function: Added equal, not-equal, greater than, less than, greater than or equal, and lesser than or equal operators.
- Function: Added bitwise rotate left and right (i.e. circular shift).
- Function: Added logical and bitwise "nor" and "nand" operators.
- Funciton: Added bitwise function BitFlip(value, index).
- Settings: Allowable error for decimal to fraction conversion can now be viewed and changed.
- Settings: Negation can be given higher priority, but can no longer be treated as a suffix.
- Recovery: Current session ('session.txt') is auto-saved every 30 seconds in case the program crashes.
- Passes 960 single-line tests (CalcX) & 52 multi-line tests (MathPad), which adds an additional 288 lines (total lines: 1248).

### BETA 3.6 (2016-10-10)

- New Data Type: bool (true/false). Added logical functions: not, and, xor, or (alts: &&, ||, and ⊕).
- Added more operators and made changes to existing operators dealing with logic only, bitwise only, and both.
- Reserved Variables: Total has been renamed to subtotal. Total was re-introduced with correct behavior.
- Reserved Variables: Added count, subcount and average/averageall.
- Units: The dollar symbol ($) can be out in front or behind a number (e.g. $10 or 10$).
- Constants: Added another constants file that uses dot notation, e.g. Earth.mass, Earth.gravity, Planck.length, etc..
- Help Menu: Examples now clear the page before loading. Added currency example.
- Help Menu: Now uses an icon. About window has more info.
- Settings Menu: Added 3 new presets for the UI: standard, verbose, and minimal.
- Added Data Menu (uses an icon). Moved Math Dictionary, Currency and Data Files from Settings Menu to it.
- Code: Made considerable changes to Math Settings, Reverse Scoping and Graphing methods. Less code overall.
- Passes 880 single-line tests (CalcX) & 52 multi-line tests (MathPad), which adds an additional 288 lines (total lines: 1168).

### BETA 3.5 (2016-09-27)

- Units: Currency (USD, EUR, BTC, etc). Automatically downloads new foreign exchange rates every day.
- New function "to words". Example: 0.0000034334 in words = 3.43 millionths. Added more examples in the Help menu.
- Units: Mass and energy can be used together in arithmetic and conversions. E.g. pound in megatons = 9.74351 megatons.
- Added more number words, such as "tenth", "tenths", "hundredth", "ten-thousandth", "hundred-thousandth", "septillion", "octillion", etc..
- Comment sign is not longer "#" but two forward slashes "//" instead.
- Added Json.Net to read FOREX .json files. May use a smaller library in the future or just the .NET Framework.
- Bug: Chop was not working correctly with numbers less than |(-/+)1|.
- Bug: Plugging in numbers in user-defined functions threw errors when units were used in their definition.
- Bug: Discarding matches in embeded unknowns led to a bug. Parenthesis are treated as delimiters, so they isolate discarding of unknowns.
- Testing: Settings are now being tested. So far rounding mode and precision is being tested.
- Passes 810 single-line tests (CalcX) & 40 multi-line tests (MathPad), which adds an additional 187 lines (total lines: 997).

### BETA 3.4 (2016-07-30)

- Added more constants.
- Parsing: Suffixes pay attention to whitespace now. Example: "3k" and "3 k" or "3 kites" do not all equal "3000".
- Parsing: Matches embeded in unknowns are now discarded. Example: Only the "pro" in "4 protons" would be discarded, leaving "4 tons".
- Passes 725 single-line (CalcX) & 34 multi-line test cases (MathPad). Using new test class for CalcX, so tests are now broken into files.

### BETA 3.3 (2016-07-19)

- Added summations. Example: summation(2i,0,100). Each line can have a summation and nothing else. Works with variables.
- Menu: Removed 'Mode' menu and functionality. No more inline settings. You can pass in the units you want, e.g. sin(1 deg).
- Menu: Settings menu now has trig modes, which apply to all lines on all pages. You can still pass units into trig functions, e.g. sin(90 deg).
- Input: Typing in 1e6 or 2.5e24 works (previous required + or -).
- Bug: Save was no longer saving empty line. It should now work like it did before.
- Code: Parser was extended to convert expression to reverse polish notation (RPN) using the Shunting-yard algorithm. New evaluator was added to evalute it, which is about half the size of the old evaluator.
- Code: Removed MathSettings from Evaluator parameters. Removed inline settings (trig mode). Default mode is radians. However, the relevant trig functions can take units as input.
- Code: Evaluator no longer requires 3 parameters (tokens, dictionary and scope), since user-defined functions store everything they need to be evaluated without need for the math dictionary or scope.
- Passes 675 single-line & 27 multi-line test cases.

### BETA 3.2 (2016-06-03)

- Constants: Added a Periodic Table. This was chosen instead of a large list of consants.
- Constants: Added element name constants that contain the atomic mass.
- Units: Added more time units: sidereal day and year, tropical year, Julian year, fortnight, Sothic cycle, millennia, hollow month, etc..

- Units: Added 'Information Flow' category. It's a direct copy/paste from 'Information' with '/sec' added to the end of everything.
- Fixed issue with something like "3 kites" becoming "3k".
- Passes 670 test cases.

### BETA 3.1 (2016-05-26)

- Functions: Added Change(x,y). Outputs change from x to y. You can combine with "as percent" or "as fraction".
- Constants: Moved math constants to math section. Added Space, Solar System and Moon section.
- Settings: Gear icon now opens up a menu instead of settings window. Menu contains link to settings window, presets and reset.
- Settings: Two-tone option. If checked, the right-side of MathPad (i.e. results/answer) is a slightly darker color.
- Menu: Added Percentage Calculator in Calc Menu. Added Help (keyboard shortcuts) window in Help Menu (ctrl+h).
- Passes 665 test cases.

### BETA 3.0 (2016-05-18)

- Added more examples to the Help Menu and an about box.
- Added bitwise operator words (not, and, xor, or, shift left and right). Added operator symbols (shift, not and or).
- Functions: Added exp, csch, sech, coth, asinh, acosh, atanh, acsch, asech and acoth.
- Constants: Added 'rad' for radians. Fixed confusion between Euler's number vs Euler's constant.
- Settings: Page tabs allow you to view 1, 4 or 8 pages. Can now open/save all pages or a single page.
- Settings: Can choose from 3 window sizes, that set the minimum window width.
- Settings: Added font sizes 14 to 30 and 40, 50 and 60. Also added 3 presets: small (Sm), medium (Med) and Big.
- Settings: Can choose to scope downward instead of upward, so an expression will check for variables beneath it instead of above.
- Settings: Can chose to aud-load last session when program starts. Last session saves all pages.
- Keyboard: Cntrl+R set MathPad to a random color. Cntrl+M toggle visiblity of main menu.
- Keyboard: TAB now only steps through the input box and page tabs.
- Mouse: Ctrl+MouseWheel increases and decreases the font size. (does not permanently save to settings)
- Menu: Added "Clear All".
- Bug: Fixed a problem with constants where two were marked as 'speed' and another as 'velocity', this prevented unit conversion.
- Bug: Fixed some units and constants that were not formatted correctly.
- Bug: A bad expression (i.e. failed to find any tokens in the string) prevented all other expressions to output results.
- Bug: Changing the base of a constant, changed it for all of those constants, since only one instance from the dictionary is shared.
- Code: Implemented strategy pattern for functions. Evaluation class is half the size.
- Code: Some trig functions in the Functions folder (were not currently used) needed to be fixed.
- Code: Revamped settings code to make it easier to add new settings.
- Passes 665 test cases.

### BETA 2.4 (2016-04-23)

- Auto resizing option added to Settings. Middle area for resizing is larger so it's easier to use.
- Added unit: solar masss. Added more constants.
- Fixed constants that weren't working. Including Planck length, which was also a unit.
- Fixed chopping, which was breaking on some numbers with E+/- (e.g. some of the God units).
- Units can now be converted to reduced fraction form.
- Passes 610 test cases.

### BETA 2.3 (2016-03-20)

- Removed Formula Menu & source code for a formula library. The reason for this is to make MathPad more likely for instructors to allow students to use it for tests.
- Settings are now saved. The appropriate settings are properly copied to windows spawned from main window.
- Added AppCore.dll and moved code to it.
- Pulled out the rest of the GUIs for the Calc Menu into their own projects.
- Added unit conversion calc to Calc Menu.
- Added more unit categories: force, power, pressure, illuminance and absorbed dose. Revised area unit category.
- Added cosmology units: solar mass and AU.
- Fixed more issues with round/chopping.
- Passes 590 test cases.

### BETA 2.2 (2016-03-18)

- Units now work with scalar postfix 'k'.
- Added status bar. Shows the time it takes to eval in milliseconds. Shows if last eval result was a success or invalid.
- Can hide/unhide main menu and status bar in settings.
- Trig functions now support units.
- Fixed 'use comma' setting. This feature was broke during a previous update.
- Added "Open Autosave" to File Menu. Autosave occurs every 30 seconds.
- Added "Open Last Session" to File Menu. Overwrites session.txt everything time app is closed.
- Passes 580 test cases.

### BETA 2.11 (2016-03-14)

- Fixed rounding but with scientific notation (e.g. 2.5684E+27).
- Added more distance units.
- Passes 540 test cases.

### BETA 2.1

- Can open up the constants and units files from settings.
- Link to Feedback & Feature Requests added to Help menu.
- Added root2(), root3(), ,root4() and root5().
- Fixed rounding. But with converting result to bin/oct/hex.
- Passes 540 test cases.

### BETA 2.0

- Re-wrote lexer, parser and evaluater to be static. Added this functionality to a single class called MathX, with static methods that you can just pass info into and it would parse and output the answer. Code is cleaner and easier to follow.
- MathLanguageInterpreter.dll & MathCore.dll (?) were merged into MathEngine.dll.
- Passes 530 test cases.

### BETA 1.2 (2015-10-31)

- Added more units and prefixes. Minor changes & fixes.
- Passes 190 test cases.

### BETA 1.1 (2015-10-22)

- Passes 190 test cases.
- Fixed output format for units and prefixes.

### BETA 1.0 (2015-10-20)

### BETA 0.97 (2015-10-15)

### BETA 0.96 (2015-10-14)

### BETA 0.95 (2015-10-13)

### BETA 0.87 (2015-05-04)

- Had basic features like variables, user-defined functions and saving work to a text file. No constants yet like "Earth's mass", the constants menu just added the values, so selecting 'pi' didn't add 'pi' it added 3.1415...

MathPad was created using regex in 2014. After a couple months it could support variables, user-defined functions with multiple variables for input, constants, implicit multiplication, etc. It was eventually re-written to parse without regex.

The "BETA x" terminology started at 0.98 (aka BETA 1).