☜ | Power OperatorM[UMPS] by Example | ☞ |
Introduced in the 1995 ANSI M[UMPS] language standard.
Reference | Value | |
---|---|---|
2**5 | 32 | |
2**3 | 8 | |
-2**3 | -8 | |
16**.25 | 2 | |
-32**(1/5) | -2 | |
-2**.5 | not specified | |
-27**(1/3) | not specified | |
3**2 | 9 | |
2**3**4 | 4096 | |
4**0.5 | 2 | |
4**(-2) | .0625 | |
27**(1/3) | 3 (if 1/3 is that exact...) | |
2.5**2 | 6.25 | |
-1**3 | -1 | |
-8**(1/3) | -2 or error |
Square root:
Reference | Value | |
---|---|---|
4**.5 | 2 | |
2**.5 | 1.4142... |
The standard does not (yet) define any behavior in the case of imaginary or complex results
Reference | Value | |
---|---|---|
-1**.5 | error or "0%1" |
This should always work
Reference | Value | |
---|---|---|
32**.2 | 2 |
But this depends on the precision that the implementation offers internally
Reference | Value | |
---|---|---|
-32**.2 | -2 (or error) |
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:47:59.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)