Author: Patrik Lundin, patrik lundin.info
To put the calculator up on your webpage do the
following:
- Download the applet here, copy the
cjmath.jar and the splot.jar files to the same folder your web page is in.
-
Put this applet tag on your web page, exactly as it is here:
<applet archive="cjmath.jar,splot.jar" code="SimplePlot.class"
width=250 height=155></applet>
|
The SimplePlot calculator supports the following operators and functions,
to use the functions that are
not available directly on the calculator you must enter them through
the keyboard. |
| + |
Addition |
| - |
Subtraction |
| * |
Multiplication |
| / |
Division |
| % |
Modulo |
| cos() |
Cosine |
| sin() |
Sine |
| tan() |
Tangens |
| atan() |
Arcus Tangens |
| acos() |
Arcus Cosine |
| asin() |
Arcus Sine |
| sinh() |
Hyperbolic Sine |
| cosh() |
Hyperbolic Cosine |
| tanh() |
Hyperbolic Tangens |
| exp() |
Constant E ( Euler constant ) raised to .. |
| ln() |
The natural logarithm |
| [n]log() |
Any logarithm, base n |
| sqrt() |
Squareroot |
| cotan() |
Cotangens |
| acotan() |
Inverted Cotangens |
| abs() |
Absolute value of ... |
| ceil() |
Ceil, Example: ceil(2.3) = 3 |
| floor() |
Floor, Example: floor(1.23) = 1 |
| fac() |
Faculty, fac(n) = n*(n-1)*(n-2)*..*1 |
| sfac() |
Semifaculty.
sfac(n) = n*(n-2)*(n-4)*..4*2 if n even
sfac(n) = n*(n-2)*(n-4)*..3*1 if n is noteven |
| round() |
Round |
| fpart() |
Decimal part of ... |
| == |
Equal, returns 1.0 if arguments are equal, 0.0 otherwise |
| != |
Not equal, returns 1.0 if arguments is not equal, 0.0 otherwise |
| >= |
Larger than or equal, returns 1.0 if left side is larger than or equal
the right side |
| <= |
Less than or equal, returns 1.0 if left side is less than or equal
the right side |
| > |
Larger than, returns 1.0 if left side is larger than the right side |
| < |
Less than, returns 1.0 if left side is less than the right side |
| && |
And, returns 1.0 if argumnets both evaluates to 1.0, 0.0 otherwise |
| || |
Or, returns 1.0 if any argument evaluates to 1.0, 0.0 otherwise |
| ! |
Not, returns 0.0 if it's argument is 1.0, 1.0 otherwise |
| diff() |
Will symbolically differentiate a mathematical expression of one variable.
Example:
diff( x^2-2*x ) will return 2*x-2
To evaluate a differentiated expression first use set( ) to store values
in the variable currently used and then differentiate and then press enter
again to evaluate.
Example:
set(x=2) [enter] returns "Value set" as confirmation
diff(x^2) [enter] returns 2*x
[enter] evaluates 2*x and returns 4 |
| set() |
Will set a variable so it can be used in a calculation.
Example:
set(x=5) x will be set to 5 so the calculation x^3
will evaluate to 125.
You can also store a expression directly like:
set(x=3*(5-2)/7)
x will be set to 3*(5-2)/7 |
| clear() |
Clears a stored variable.
Values will still be in memory after pressing the [clear] button, use
clear( ) to clear a value in memory.
Example:
clear(x) will clear the variable x, any calculation
with x in it after calling clear(x) will generate the error:
"No value associated with x"
Use "set" to set the variable again.
|
| memory |
Will show all values currently in memory. |
| Pi |
The constant PI, roughly 3.1415... |
| Euler |
Eulers constant, roughly 2.7182... |
| True |
1.0 |
| False |
0.0 |
|
|
|
To plot a function just enter the function in the text field and then
press the [Plot] button,
this will open a coordinate system to the left and a control window
to the right.
To plot more functions just enter any function in the textfield at the
top of the
control window, you can only draw functions of the form y=f(x)
To delete a function double click on the function in the list
in the control
window.
To close the coordinate system just click on the Quit button in the
control window.
To Zoom in on a part of the graph click the mose, hold the mouse button
down
and then drag to select the area you want to zoom and release the mose
button.
|