Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Divided By Operator

M[UMPS] by Example

Arithmetic operator ‘divided by’ (/)

Introduced in the 1977 ANSI M[UMPS] language standard.

Reference   Value
9/3   3
5/2   2.5
5/-2   -2.5
-5/2   -2.5

No leading zero in canonic representation of numbers between -1 and +1:

Reference   Value
1/2   .5
-1/2   -.5

The number of digits is implementation-specific; 1977 ANSI standard guarantees 12 digits

Reference   Value
1/2   .5
1/3   .333333333333
1/128   .0078125

Definitely not equal to 1:

Reference   Value
1/3*3   .999999999999

Force numeric interpretation

Reference   Value
"15 apples"/"3 oranges"   5

In 1995 standard:

The 1995 standard guarantees 15 digits

Reference   Value
1/3   .333333333333333

Added in the 1995 ANSI M[UMPS] language standard:

Reference   Value
X/0   Error (M9)
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-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 16-Nov-2023, 11:46:38.

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