How CAL Evaluates Expressions (CAL Command)
CAL evaluates expressions according to standard mathematical rules of precedence:
- Expressions in parentheses first, starting with the innermost set
- Operators in standard order: exponents first, multiplication and division second,
and addition and subtraction last - Operators of equal precedence from left to right
Numeric Expressions
Numeric expressions are real integer numbers and functions combined with the operators
in the following table.
Numeric operators |
|
---|---|
Operator |
Operation |
( ) |
Groups expressions |
^ |
Indicates exponentiation |
* , / |
Multiplies, divides |
+, – |
Adds, subtracts |
The following are examples of numeric expressions:
3
3 + 0.6
(5.8^2) + PI
Vector Expressions
A vector expression is a collection of points, vectors, numbers, and functions combined
with the operators in the following table.
Vector operators |
|
---|---|
Operator |
Operation |
( ) |
Groups expressions |
& |
Determines the vector product of vectors (as a vector) [a,b,c]&[x,y,z] = [ (b*z) – (c*y) , (c*x) – (a*z) , (a*y) – (b*x) ] |
* |
Determines the scalar product of vectors (as a real number) [a,b,c]*[x,y,z] = ax + by + cz |
*, / |
Multiplies, divides a vector by a real number a*[x,y,z] = [a*x,a*y,a*z] |
+ , – |
Adds, subtracts vectors (points) [a,b,c] + [x,y,z] = [a+x,b+y,c+z] |
The following are examples of vector expressions:
A+[1,2,3] provides the point located [1,2,3] units relative to point A.
The expression
[2<45<45] + [2<45<0] – [1.02, 3.5, 2]
adds two points and subtracts a third point. The first two points are expressed in
spherical coordinates.
>CAL evaluates expressions according to standard mathematical rules of precedence: Expressions in parentheses first, starting with the innermost set Operators …Evaluates mathematical and geometric expressions at the Command prompt or within a command. CAL is an inline geometry calculator that evaluates point …evaluates expressions according to the following standard mathematical … The syntax for QuickCalc expressions and Command prompt calculator …Evaluates mathematical and geometric expressions. CAL is a calculator that evaluates expressions (point, real, or integer). You can use it alone at the command …Evaluates mathematical and geometric expressions. CAL is a calculator that evaluates expressions (point, real, or integer). You can use it alone at the command …… bc – Unix CalculatorPlease read the article bc – Unix Calculator More on UnixMantra. … The bc command evaluates expressions similar to the c …expression in the command line calculator, you can quickly … The CAL command runs the 3D calculator utility to evaluate vector expressions …