Calculate in NoteTab
Previous  Top  Next



NoteTab can also calculate mathematical expressions in a document. Expressions can have up to 40 imbedded parentheses. Note that you may need to break down very long expressions into groups of parentheses if you get an error message.

For example, if you enter the following expressions in a document:

Sin(3)*5/Pi=

and then press Ctrl+E (or use the menu command "Tools | Calculate Expression"), the result will be added after the equal sign. If there is no equal sign, or if the document is Read-Only then it copies the result to the Clipboard and displays it in a small window. You can also add numbers arranged in a column; just select all the numbers in the following four lines and press Ctrl+E:

   23
   -5
   42
   40

Supported mathematical operators and functions are listed below.

Predefined value:
PI

Accepted operators:
+ , - , * , / , ^ , MOD, DIV

The following functions are supported; it doesn't matter if you use lower or upper case:

COS, SIN, SINH, COSH, TAN, COTAN, ARCTAN, EXP, LN, LOG10, LOG2, LOGN, SQRT, SQR, POWER, INTPOWER, MIN, MAX, ABS, TRUNC, ROUND, INT, CEIL, FLOOR,
HEAV (heav(x) is 0 for x<0, 1 for x>=0),
SIGN (sign(x) is 0 for x=0, 1 for x>1, -1 for x<0),
ZERO (zero(x) is 0 for x=0, 1 for x<>0),
LZERO (lzero(x) is 0 for x<>0, 1 for x=0),
RND (rnd(x) = int(x) * Random)
RANDOM (random(X) = Random; the argument X is not used)

Functions like MIN and MAX take two values; you must use a semi-colon ";" to separate them. For example: MAX(2;3)

Trigonometric functions take values in radian units.


Acknowledgments:
The mathematics feature was made possible thanks to the superb freeware parsing function developed by the following people: Renate Schaaf (schaaf@math.usu.edu), Alin Flaider (aflaidar@datalog.ro), and Stefan Hoffmeister (Stefan.Hoffmeister@Uni-Passau.de)