SimpleCalc
----------
This is a simple Java Calculator with advanced functions :-D
You can use the mouse or the keyboard and then press the [=] button or
press enter to evaluate.
For the more advanced functions you'll have use the keyboard.
The calculator supports these operators and functions:
------------------------------------------------------
+ addition
- subtraction
* multiplication
/ division
^ power to
% modulo
sin() sinus
cos() cosinus
tan() tangent
atan() arcustangent
asin() arcussinus
acos() arcuscosinus
sinh() hyperbolicsinus
cosh() hyperboliccosinus
tanh() hyperbolictangens
exp() constant E raised to
ln() natural logarithm
[n]log() any logaritm, base n
sqrt() squareroot
cotan() cotangens
acotan() inverted cotangens
abs() absolute value of
ceil() ceil, ceil(2.3) = 3
floor() floor, 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
Logical operators :
-------------------
== equal, returns 1.0 if arguments are equal, 0.0 otherwise
!= not equal, returns 1.0 if arguments is not equal, 0.0 otherwise
! not, returns 0.0 if it's argument is 1.0, 1.0 otherwise
&& 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
> 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
<= less than or equal, returns 1.0 if left side is less than or
equal the right side
>= larger than or equal, returns 1.0 if left side is larger than or
equal the right side
Special functions :
-------------------
diff( ) will symbolically differentiate a mathematical
expression of one variable.
Ex. 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.
Ex. 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.
Ex. set(x=5) x will be set to 5 so the calculation x^3
will evaluate to 125.
You can also store a calculation directly like : set(x=3*(5-2)/7)
x will be set to 3*(5-2)/7
clear( ) Clears a stored variable.
Ex. 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"
memory Will show all values currently in memory.
values will still be in memory after pressing the [clear] button,
use clear( ) to clear a value in memory.
Please note that diff( ) , set( ), memory and clear( ) cannot be used as a part of
an expression, this will not generate an error but will just
cause the first occurance of any of the commands to be evaluated.
for example: 2*5-diff(x^3) will just cause diff(x^3) to be evaluated.
Constants supported:
--------------------
Pi pi, 3.1415...
Euler base for the natural logarithm, 2.7182..
true 1.0
false 0.0
Operator precedence in order of evaluation:
-------------------------------------------
( you can always change the order of evaluation by using paranthesis. )
!
cos sin tan sqrt exp.....etc
^
* / %
log
+ -
> >= < <=
== !=
||
&&
|