Use standard syntax to type an expression.
Press ENTER to execute.
Use C/C++/Java syntax.
There is no need to declare variables.
Use a "
;" to enter several expressions in one line.
You may prefer doing this:
Variables can be redefined to be rational, real, complex, boolean, array, string, or matrix.
The sample session may continue like this:
Variable x was redefined as an array of size 3 (arrays of size 3 are also treated as vectors.)
The ans variable always has the value of the last successful calculation.
Valid variable names can be formed using letters, numbers, underscores, single quotes and backslashes. However, a variable name must not start with a number. Calcugator is case sensitive.
A Calcugator letter is defined as any unicode character that the java language recognizes as a letter. See examples below
This example uses a Greek letter. Menu option File->Unicode Chooser... lets you enter unicode characters.
See the documentation of function
shortcut() for details on how to enter unicode characters.
The following are predefined constants:
pi = 3.14159
e = 2.71828
i, j = sqrt(-1)(the imaginary number)
These constants can not be redefined.
If an expression involves only integers and/or rational numbers, the program will try to keep the result as an integer or a rational value. Common factors are simplified.
The following operators or functions can be used with integers and rational numbers:
x mod yreturns the integer residue of dividing integer
int xreturns the integer truncation of the real
factors(x)returns an array with all factors of integer
primes(n)returns an array of size
ncontaining the first n primes except 1.
ceil(x)returns the smallest integer bigger than the real
floor(x)returns the biggest integer smaller than the real
lcm(x,y)returns the least common multiple of integers
gcd(x,y)returns the greatest common divisor of integers
fix(x)returns the integer obtained by rounding
round(x)returns the integer obtained by rounding
xto the nearest integer.
numerator(x)returns the numerator of the rational number
denominator(x)returns the denominator of the rational number
Every number entered with a period or in exponential format is treated as a real number.
Every operation involving at least one real number makes the result real.
Precedence and associativity of arithmetic operators follow strict C/C++/Java conventions.
The following operators and functions are implemented:
+, -, *, /and unary minus.
x ** yreturns
xto the power
xto the power
xto the power
sin(x), cos(x), tan(x), asin(x), acos(x)and
sinh(x), cosh(x), tanh(x), asinh(x), acosh(x)and
atan2(x,y)returns the angle whose tangent is
log(x), log10(x), exp(x), sqrt(x)and
toRad(x), toDeg(x)are convenience functions to pass from radians to degrees.
xis positive; it returns
Numerical exceptions are never thrown.
You may work with infinite values and NaN (not a number).
NaN may be assigned to variables.
Enter complex numbers using the predefined variables
NOTE: To enter imaginary parts make sure a number precedes the imaginary constant:
All functions which work for real numbers, also work for complex numbers.
NaN if the argument
x is real and it is outside the interval
However, if you need a complex result, add a
0j to the argument to have a complex result.
The following functions accept complex arguments:
conjugate(x)returns the conjugate of
Re(x)returns the real part of
Im(x)returns the imaginary part of
angle(x)returns the angle between 0 and 2*pi.
All C/C++/Java boolean operators are supported.
Create an array as follows:
A quick way to create an array is to create a specific entry:
Arrays can be resized by creating an entry at a new position:
 operator to dereference any entry of an array inside algebraic expressions.
You may also create arrays using the
array(n, x1, x2)or
n is the size of the array to create. The value for the first entry is
x1, the value for the last entry is
x2 and the values of the remaining entries are found by linear interpolation. If
x2 is missing, all entries will have the value
Use arithmetic operators
- provided the arrays are of the same size.
You may multiply and divide arrays times scalar values (rational, real, complex) using the
The following functions can be used with array arguments:
transpose(v)returns a column matrix with the values of
abs(v)returns the norm of the array
size(v)returns the size of the array.
logarray(n1, n2)returns a new array created with entries:
n2must be integers.
subarray(a,n1,n2)returns the following array:
( a[n1], a[n1+1], a[n1+2],..., a[n2]). Both
n2must be integers. If
n2is not specified, the last entry corresponds to the last entry of array
reverse(a)returns a new array with the entries of
ain reverse order.
apply(a, f)transforms array
aby applying function
fto each of the entries.
aby adding all entries of array
normalize(a)returns a unit vector in the same direction as that of
amust be of size 3.
The following functions are implemented:
max(...)returns the maximum value of the arguments passed.
min(...)returns the minimum value of the arguments passed.
show()displays a list of all user defined variables and functions in the current session.
set(...)sets a property. See list below.
The properties that may be set and the type of the parameter needed are the following:
"matrixSingularityTolerance", a real.
"formatDecimalDigits", an integer.
"formatSignificantDigits", an integer.
"formatUpperBound", a real.
Property formatSignificantDigits refers to the number of significant digits used to print a number in engineering format.
Property formatUpperBound is a positive value; if the absolute value of a number
x is bigger than formatUpperBound, the exponential format is used to print the value of
x; if the absolute value of
x is less than formatUpperBound, then
x is printed using as many decimals as formatDecimalPlaces.
Integers don't follow the rule above, they are printed using the maximum number of digits possible.