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:
- the common operators, namely + - * / for add, sub, mult, div,
- exponentiation via the ** operator,
- nested parentheses ( ) to any depth,
- all common basic math functions, e.g. sin(x), log(x), min(a,b)
- a few advanced math functions,
- your own user-defined variables to store intermediate results.
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:
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 () parenthesesStandard 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 xTrigonometry 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,atanhCombinatorics:
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.