|
ParadoxDescriptionParadox is an engine (or API, if you prefer that term) which handles all the dirty work of parsing and evaluating infix mathematical expressions. It was written as this school year's (2002/2003) science project. The following is the project abstract: Evaluating a mathematical expression such as “2 + 1.05e-18[(5^3(sin 4)(pi – 7 log2(3))]” is a unique challenge, even for a computer. Much of the challenge is associated with the act of cutting or “parsing” the actual text of the expression into a form that computers can understand. One method of doing this is with a recursive descent parsing algorithm, which builds an expression tree by recursively parsing an expression according to a special grammar. Paradox is a set of Java classes I programmed with JDK v1.4.1 that will parse and evaluate a mathematical expression such as the one written above. It supports variables, functions, boolean operators, subexpressions, and developer-defined functions. I also created Calc4, a helper application. It provides a graphical user interface (GUI) for the Paradox engine, allowing the user to type in complex expressions and obtain the numerical answer. Calc4 also demonstrates the benefits of using a simple scripting language to automate routine calculations. Altogether, Paradox is a reliable, expandable engine that has many potential uses at the home, on the job and in the classroom. So what does all this mean to you as the user? This means that by scrolling down and downloading the pdox_calc4.exe file below, you can install a multiline scientific calculator on your desktop. In addition, it executes scripts and graphs simple functions. Features
Demonstration AppletThe demo applet allows you to try out the Paradox engine without having to download the program first. If you are using a brower that properly supports Java applets, you will be able to use the engine directly from within your browser window. DownloadThe Calc4 program is available in two ways: as a ZIP and as a self-extracting EXE. If you don't know how to unzip and move files, just download the EXE (the first link) to your computer and double-click on it. Click "Unzip" in the window that opens and Calc4 (w/ Paradox) will automatically be installed in C:\Calc4. To run it, browse to the folder you installed to and double-click on "Calc4.exe".
You can also download the class files and source code for Paradox:
In addition, you can download the complete Paradox paper (~38 pages) in several different formats:
|