OPERATORS :
accuracy | base | buttons | constants | contact | detail view | legal | ops | precedence | prefs | terms | usage
There are a couple different types of operators. Their individual behavior is described here. Interaction between operators is further detailed in Precedence.
Assignment, assigns a variable a new value, must be the first thing on the line.
A unary operator can be a prefix or a suffix. Prefixes go before the number, suffixes after.
Binary operators take an argument to the left and an argument to the right, like + or _div. All extended operators (that is to say wordy ops) begin with an underscore. (Shift-dash for most people.) Alternate syntax is operator( such as sin(30). The input engine allews either, do what you like. But for clarity, that's how I distinguish operators.
INSTANT EVALUATORS:
_base (binary operator) interprets left value as argument in base of right value.
fe_base16 = 254 (in base 10) See also BASE
#constant replaces the constant entered with its numerical equivalent. #pi =
3.14159something
SUFFIX OPERATORS:
% percent, simply divide by 100 (nb) this is NOT the mod operator. 5%
= 0.05
! factorial, 3! = 3*2*1 beware, factorials get crazy large very fast.
PREFIX OPERATORS:
_sin sine, a trigonometric function, number interpreted as degrees or radians
_cos cosine, a trigonometric function, number interpreted as degrees or radians
_tan tangent, a trigonometric function, number interpreted as degrees or radians
_asin arc sine, a trigonemetric function, result in radians or degrees
_acos arc cosine, a trigonemetric function, result in radians or degrees
_atan arc tangent, a trigonemetric function, result in radians or degrees
_round rounds to the nearest integer, or as close as the calc can come to that
_ceil ceiling function, round up to the next higher integer
_floor round down to the next lower integer
_rndsml round small, rounds toward zero to the closest integer
_rndlrg round large, rounds away from zero to the nearest integer
_inv yeilds 1 divided by the argument _inv 2 = 0.5
_abs absolute, yields the absolute value of your value a.k.a. magnitude _sqrt
square root,
_sqrt 16 = 4 _rand random, gives something between 0 and your value.
_ln natural log, log in base e of your value
_exp exponential, e raised to the power of your value
_fibseq fibonacci sequence, 1,1,2,3,5,8,13... yields actual counted value (integer)
in 64bit decimal form
EXTENDED BINARY OPERATORS:
_mod modulo or modulus, the remainder from long division, 7 _mod 3 = 1
_div divide, integer result useful like mod, 7 _div 3 = 2 (mod and div are classically
integer only operators, I have allowed any argument.)
_root square root, cube root, nth root, whatever. 4 _root 81 = 3
_rt (or //) root, only the other way around. 81_rt 4 = 3
_log logarithm, base _log arg, 2 _log 256 = 8, because 2^8=256 _lb log base,
arg
_lb base, 256 _lb 2 = 8, for convenience if backwards you think.
_to a conversion feature for use in future releases, divides backwards.
BINARY OPERATORS: (classic)
^ (or **), raise left value to the power of the right value
* multiply left value by right value
/ divide left value by right value
+add left value to right value
- subtract right value from left value.
(nb) - (minus) is special in that it also means negative, depending
on context. 5*(-5) yields -25 or 25 less than zero. It may also legally be written
as 5*-5. Whereas 6-5 means subtract and yields 1. This ambiguity also applies
to the + symbol, but this is less often an issue.
ASSIGNMENT OPERATORS: (nb) only single character capital letters
other than E can be retrieved in expressions.
:= gets, assigns to the variable stated at left , the value of the expression
at right.
:+ (+=) gets increased by, increases the value of the variable stated by the
value of exp @ right
:- (-=) gets decreased by, decreases the value of the variable stated by the
value of exp @ right
:* (*=) gets multiplied by, multiplies the value of the variable stated by the
value of exp @ right
:/ (/=) gets divided by, divides the value of the variable stated by the value
of exp @ right
Items in parentheses are evaluated first. Nothing requires parentheses to work, only to alter the normal order of operations. sloppy syntax allows you to write the full phrase, like "arc sine" in case you forget what Calc Thingy's preferred operator is. Just hit tab to check if you typed something legal.
accuracy | base | buttons | constants | contact | detail view | legal | ops | precedence | prefs | terms | usage