2.2 Arithmetic operations
In its simplest form BayES can be used as a desk calculator, which has the ability of storing values to user-defined variables. In this context, BayES supports:
-
the basic arithmetic operations (addition, subtraction, multiplication, division)
-
unary minus
-
exponentiation
-
functions for taking logarithms, square roots, etc.
-
parentheses to group expressions
An example of using BayES as a calculator is given in Example 2.1. This example also illustrates that any line starting with a double slash is treated by BayES as a comment. Multi-line comments are enclosed in matching “/*" and “*/", as shown in Example 2.4.
The term “id value" is used in this guide to denote the name of an item held in memory. In the example above three values were defined with names A, B and C. These names (id values) are then used to refer to the numerical values stored in the respective items.