Previous Next        Current Page: NeXtMidas User's Guide / System Operation / Inline Calculations
back
Inline Calculations

NeXtMidas accepts numbers in both scientific and engineering notation (i.e., 2.146 x 10^7 or 2.146e7 is valid). The available operators for in-line calculations are: addition (+), subtraction (-), multiplication (*), division (/), and exponentiation (**). Never put any spaces in the middle of an in-line calculation. Spaces and commas separate arguments in NeXtMidas. You want the entire calculation to be perceived as a single argument.

Using parentheses ( ) to group expressions is a popular feature of in-line calculations. The precedence of operators in any in-line calculation is strictly left to right. However, parentheses indicate a specific order of calculation. In other words, 2+4*5 = 30, but 2+(4*5) = 22.

Parentheses also allow a complex mathematical formula or logical tests to be placed anywhere a single number goes. The formula can even include the names of numeric results parameters since they are interpreted as symbolic numeric constants. For example:

nM> sincosine s1 ,,, 2*pi+(3/4)-phase

produces exactly the same effect as

nM> calc frequency 2 pi * 3 4 / + phase -
nM> sincosine s1 ,,, frequency

Certain applications work well with powers of two (or multiples thereof) rather than powers of ten. To write values such as 2**10 or 2**20, substitute K for 2**10 and M for 2**20 (e.g. 9K = 9*(2**10) and 0.6M = 0.6*(2**20).

Type EXPL CALCULATOR at the NeXtMidas shell prompt for more sophisticated functions such as logarithm or minimum.


back