MIN-Fakultät
Fachbereich Informatik
TAMS

Overview

This web-page contains an interactive "pocket" calculator realized as a Java applet. See the description below for details. It uses text input in addition to (or instead of) a photorealistic user-interface.

The Applet

Description

Unlike most of the traditional pocket calculator programs, which are restricted to a photorealistic user-interface with lots of buttons, the applet allows you to directly type-in your expression into the command textfield (at the bottom). A command history means that you can recall previous expressions, correct spelling errors or modify parameters, and repeat the calculation. Of course, you can also paste values or expressions from other programs into the textfied. However, the applet now also provides the traditional 'photorealistic' user interface with lots of buttons if you prefer clicking over typing.

You can directly type-in mathematical expressions using:

Type your expression into the command textfield (on the bottom of the applet) and either type the return-key or press the Execute-button to execute your command. See below for a complete list of supported math functions. You can define your own variables to store intermediate results via the standard assignment notation, e.g. answer = 42 or rate = sin(pi/4)*sqrt(log10(pi)). As usual, variable names must start with a letter and can contain letters and digits. Type the command list for a list of all currently defined variables and their values. The special name pi is reserved, and the variable last refers to the result of your last expression.

Use the cursor keys (cursor up and cursor down) to recall previous commands via a command history. This also allows to easily edit and repeat a mistyped command! All commands and their result values are logged in a separate text editor, which supports saving your results in a standard text file. Naturally, the standard copy, paste, delete operations are available.

If you want to install the calculator for offline use, either download the calculator.jar JAR-archive with the software or click on the following button for a Java Webstart download:

(Download and run the interactive calculator via Java Webstart; requires JDK 1.4.2 or higher)

Note: if the applets appears correctly, but you cannot type anything into the applet text fields, your browser and/or Java installation are broken. Try to re-load the page (should be fast), click into the applet (e.g. help-about) or press the tab-key a few times, to see whether the applet reacts to keypresses again. If this doesn't help, try the standalone version (see above button).

Specification

At the moment, the calculator applet supports the following functions (also check the online help via help-functions for last-minute updates).

Operators:

 +   addition 
 -   subtraction or unary minus
 *   multiplication
 /   division
 ^   exponentiation
 ()  parentheses
Standard functions:
 abs( x )       absolute value
 sgn( x )       sign (-1 / 0 / + 1)
 floor( x )     nearest integer smaller than x
 ceil( x )      nearest integer larger than x
 round( x )     nearest integer
 min( x, y )    smaller of x and y
 max( x, y )    larget of x and y
 pi             predefined constant 3.14159265

 sqrt( x )      square-root
 exp( x )       exponential function 
 pow( x, y )    x to the y'th power:  exp( y*ln(x) )
 pow2( y )      2 to the y'th power:  exp( y*ln(2) )
 ln( x )        natural logarithm of x
 log( x )       natural logarithm of x
 log2( x )      base-2 logarithm of x
 log10( x )     base-10 logarithm of x
Trigonometry functions:
 sin( x )       sine
 cos( x )       cosine
 tan( x )       tangent
 asin( x )      inverse sine
 acos( x )      inverse cosine
 atan( x )      inverse tangent

 sinh,cosh,tanh   hyperbolic and inverse hyperbolic functions
 asinh,acosh,atanh
Combinatorics:
 gammln( x )    logarithm of the gamma function (x real, x >= 0)
 factln( x )    logarithm of the factorial
 factrl( x )    factorial
 bico( n, k )   binomial coefficient (n,k)
 nchoosek(n,k)  binomial coefficient (n,k)
Summation:
 _sum( var, lower, upper, expression )
                evaluate the given summation, var must already exist.

Applet restriction:

Depending on your browser and your security settings, you may or may not be able to use the file-open and file-save as functions from the applet's menu. You may have to update your .java.policy file to allow the required operations from the applets. However, you can also use copy and paste operations from the applet's log area to any other desktop application without the file operations. Naturally, you can also just download the applet JAR archive and start the calculator on your computer as a standard application.