System Variable IC: Difference between revisions
No edit summary |
No edit summary |
||
Line 186: | Line 186: | ||
<td align="center">27</td> | <td align="center">27</td> | ||
<td align="center"><apll>0⍟N</apll> for <apll>N≠0 1</apll></td> | <td align="center"><apll>0⍟N</apll> for <apll>N≠0 1</apll></td> | ||
<td align="center"><apll>DOMAIN ERROR</apll></td> | |||
</tr> | |||
<tr> | |||
<td align="center">28</td> | |||
<td align="center"><apll>L*¯∞</apll> for <apll>¯1 ≤ L < 0</apll></td> | |||
<td align="center"><apll>DOMAIN ERROR</apll></td> | <td align="center"><apll>DOMAIN ERROR</apll></td> | ||
</tr> | </tr> | ||
Line 245: | Line 251: | ||
⎕IO←0<br /> | ⎕IO←0<br /> | ||
⎕IC<br /> | ⎕IC<br /> | ||
3 4 | 3 4 3 2 2 1 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2<br /> | ||
0÷0<br /> | 0÷0<br /> | ||
1<br /> | 1<br /> | ||
⎕IC[5]←2<br /> | ⎕IC[5]←2<br /> | ||
⎕IC<br /> | |||
3 4 3 2 2 2 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2<br /> | |||
0÷0<br /> | 0÷0<br /> | ||
DOMAIN ERROR<br /> | DOMAIN ERROR<br /> | ||
Line 255: | Line 263: | ||
⎕IC←⍬<br /> | ⎕IC←⍬<br /> | ||
⎕IC<br /> | ⎕IC<br /> | ||
3 4 | 3 4 3 2 2 1 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2<br /> | ||
</apll> | </apll> | ||
Line 262: | Line 270: | ||
==Incomplete List of Indeterminates== | ==Incomplete List of Indeterminates== | ||
<p> | <p>There may be other indeterminates not covered by this feature. Please let us know if you think there are other cases that should be included.</p> | ||
{{System Variables}} | {{System Variables}} | ||
{{Article footer}} | {{Article footer}} |
Revision as of 15:54, 14 December 2013
⎕IC - Indeterminate Control
|
||||
Z is an integer vector whose elements each control a separate aspect of how indeterminates are handled by the system. |
⎕IC←R | sets all of the values of the Indeterminate Control Vector to R. |
⎕IC←⍬ | sets all of the values of the Indeterminate Control Vector to their system default state. |
⎕IC[L]←R | sets the value(s) of the Indeterminate Control Vector indexed by L to R. |
This experimental feature attempts to collect together in one place control of various infinite and indeterminate calculations such as ÷0,
⎕IC Index (origin-0) |
Indeterminate Calculation |
Default Result |
---|---|---|
0 | ÷0 | ∞ |
1 | ⍟0 | ¯∞ |
2 | !N for integer N<0 | DOMAIN ERROR |
3 | 0×∞ or ∞×0 | DOMAIN ERROR |
4 | 0ׯ∞ or ¯∞×0 | DOMAIN ERROR |
5 | 0÷0 | 1 |
6 | ∞÷∞ (same sign) | DOMAIN ERROR |
7 | ∞÷∞ (different sign) | DOMAIN ERROR |
8 | ∞-∞ (same sign) | DOMAIN ERROR |
9 | L|∞ for L>0 | DOMAIN ERROR |
10 | L|¯∞ for L>0 | DOMAIN ERROR |
11 | L|∞ for L<0 | DOMAIN ERROR |
12 | L|¯∞ for L<0 | DOMAIN ERROR |
13 | ¯∞|R for R>0 | ¯∞ |
14 | ∞|R for R<0 | ∞ |
15 | 0*0 | 1 |
16 | L*∞ for L≤¯1 | DOMAIN ERROR |
17 | 0*∞ | 0 |
18 | 0*¯∞ | ∞ |
19 | ±∞*0 | DOMAIN ERROR |
20 | L*R for L<0 and non-integer R | DOMAIN ERROR |
21 | 0⍟0 | 1 |
22 | 0⍟1 | DOMAIN ERROR |
23 | 1⍟0 | DOMAIN ERROR |
24 | 1⍟1 | 1 |
25 | 0∨±∞ or ±∞∨0 | LEFT |
26 | 0∧±∞ or ±∞∧0 | DOMAIN ERROR |
27 | 0⍟N for N≠0 1 | DOMAIN ERROR |
28 | L*¯∞ for ¯1 ≤ L < 0 | DOMAIN ERROR |
The values in each element of ⎕IC control the result of the calculation as follows:
⎕IC Value | Result |
---|---|
¯1 | ¯1 |
0 | 0 |
1 | 1 |
2 | DOMAIN ERROR |
3 | ∞ |
4 | ¯∞ |
5 | LEFT |
6 | RIGHT |
For example,
⎕IO←0
⎕IC
3 4 3 2 2 1 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2
0÷0
1
⎕IC[5]←2
⎕IC
3 4 3 2 2 2 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2
0÷0
DOMAIN ERROR
0÷0
∧
⎕IC←⍬
⎕IC
3 4 3 2 2 1 2 2 2 2 2 2 2 4 3 1 2 0 3 2 2 1 2 2 1 5 2 2 2
To set all indeterminate results to DOMAIN ERROR, use ⎕IC[]←2.
Incomplete List of Indeterminates
There may be other indeterminates not covered by this feature. Please let us know if you think there are other cases that should be included.
System Variables (A value may be assigned to these except for ⎕DM) | |||||||||
---|---|---|---|---|---|---|---|---|---|
⎕ALX | ⎕CT | ⎕DM | ⎕DT | ⎕ELX | ⎕FC | ⎕FEATURE | ⎕FPC | ⎕IC | ⎕IO |
⎕LR | ⎕LX | ⎕PP | ⎕PR | ⎕PW | ⎕RL | ⎕SA | ⎕WSID | ||
Niladic System Functions (a value cannot be assigned to these) | |||||||||
⎕A | ⎕AV | ⎕EM | ⎕ET | ⎕LC | ⎕NNAMES | ⎕NNUMS | ⎕SI | ⎕SYSID | ⎕SYSVER |
⎕T | ⎕TC | ⎕TCBEL | ⎕TCBS | ⎕TCESC | ⎕TCFF | ⎕TCHT | ⎕TCLF | ⎕TCNL | ⎕TCNUL |
⎕TS | ⎕WA | ||||||||
Monadic or dyadic system functions (a value cannot be assigned to these) | |||||||||
⎕AT | ⎕CR | ⎕DC | ⎕DFT | ⎕DL | ⎕DR | ⎕EA | ⎕EC | ⎕ERROR | ⎕ES |
⎕EX | ⎕FMT | ⎕FX | ⎕MF | ⎕NAPPEND | ⎕NC | ⎕NCREATE | ⎕NERASE | ⎕NINFO | ⎕NL |
⎕NLOCK | ⎕NREAD | ⎕NRENAME | ⎕NREPLACE | ⎕NRESIZE | ⎕NSIZE | ⎕NTIE | ⎕NUNTIE | ⎕STOP | ⎕TF |
⎕TRACE | ⎕UCS | ⎕VR | |||||||
Note that quad functions and variables (except for the ⎕A family of functions) are case insensitive |
See Also | ||
System Commands | System Variables and Functions | Operators |
Keyboard | ||||||||||||||
Alt+Shift | ⍪ | ≡ | ≢ | ⍒ | ⍋ | ⌽ | ⍉ | ⊖ | ⍟ | ⍱ | ⍲ | ⍠ | ⌹ | |
Alt | ⋄ | ¨ | ¯ | < | ≤ | ∅ | ≥ | > | ≠ | ∨ | ∧ | × | ÷ | |
Shift | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | |
Key | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | |
Alt+Shift | ⍷ | √ | ⍨ | ⍸ | ⍥ | ⍣ | ⍞ | ⍬ | ⊣ | |||||
Alt | ? | ⍵ | ∊ | ⍴ | § | ↑ | ↓ | ⍳ | ○ | π | ← | → | ⊢ | |
Shift | Q | W | E | R | T | Y | U | I | O | P | { | } | | | |
Key | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
Alt+Shift | ∫ | ∂ | ⌻ | ⍢ | ⍙ | ⍤ | ⍫ | ⌷ | ||||||
Alt | ⍺ | ⌈ | ⌊ | ∞ | ∇ | ∆ | ∘ | ‼ | ⎕ | ⍎ | ⍕ | |||
Shift | A | S | D | F | G | H | J | K | L | : | " | |||
Key | a | s | d | f | g | h | j | k | l | ; | ' | |||
Alt+Shift | ⊆ | ⊇ | χ | ⍡ | ⍭ | ⊙ | ||||||||
Alt | ⊂ | ⊃ | ∩ | ∪ | ⊥ | ⊤ | ⍦ | ⍝ | ⍀ | ⌿ | ||||
Shift | Z | X | C | V | B | N | M | < | > | ? | ||||
Key | z | x | c | v | b | n | m | , | . | / |
NARS 2000 Lang Tool Bar |
← | → | + | - | × | ÷ | * | ⍟ | ⌹ | ○ | ! | ? | √ | | | ⌈ | ⌊ | ⊥ | ⊤ | ⊣ | ⊢ | |||
≡ | ≢ | < | ≤ | = | ≥ | > | ≠ | ∨ | ∧ | ⍱ | ⍲ | ↑ | ↓ | ⊂ | ⊃ | ⌷ | ⍋ | ⍒ | |||||
⍳ | ∊ | ⍸ | ⍷ | ∪ | ∩ | ⊆ | ⊇ | ~ | § | π | .. | , | ⍪ | ⍴ | ⌽ | ⊖ | ⍉ | ||||||
/ | \ | ⌿ | ⍀ | ⊙ | ¨ | ⍨ | ⍤ | ⍣ | ⍡ | ⍥ | ⍦ | . | ∘ | ⍠ | ‼ | ⌻ | ∂ | ∫ | ⍞ | ⎕ | ⍎ | ⍕ | |
⋄ | ⍝ | ∇ | ∆ | ⍙ | _ | ⍺ | ⍵ | ¯ | ⍬ | ∞ | ∅ | ||||||||||||
Second Row | i j k | i j k l | g | p | r | v | x |
[[Category:Mouse Group {{{1}}}|{{{2}}}]]