Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer

Arithmetic Operators

1995 Version of ANSI (Equivalent to Current ISO Version) of Standard

Right Hand Pointer

7.2.1.2 Arithmetic binary operators

The binary operators + - * / \ # ** are called the arithmetic binary operators. They operate on the numeric interpretations of their operands, and they produce numeric (in one case, integer) results.

+ produces the algebraic sum.
- produces the algebraic difference.
* produces the algebraic product.
/ produces the algebraic quotient. Note that the sign of the quotient is negative if and only if one operand is positive and one operand is negative. Division by zero causes an error condition with ecode="M9".
\ produces the integer interpretation of the result of the algebraic quotient.
# produces the value of the left operand modulo the right argument. It is defined only for nonzero values of its right operand, as follows.
A # B = A (B * floor(A/B))
where floor (x) = the largest integer '> x.
** produces the exponentiated value of the left operand, raised to the power of the right operand. Results producing complex numbers (eg, even numbered roots of negative numbers) are not defined.
Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2018 MUMPS Development Committee;
Copyright © Examples: 1995-2018 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2018 Ed de Moel.

This page most recently updated on 13-Sep-2014, 17:24:11 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)