Point Notation: Difference between revisions
Line 9: | Line 9: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>16<_b/>10FFFF</apll>as a shorthand for <apll>16⊥1 0 15 15 15 15 15</apll>.</td> | <td valign="baseline">e.g., <apll>16<_b/>10FFFF</apll>as a shorthand for <apll>16⊥1 0 15 15 15 15 15</apll>.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 15: | Line 15: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2<_x/>3</apll> as a shorthand for <apll>2∙e<sup>3</sup></apll> or <apll>2×(*1)*3</apll>.</td> | <td valign="baseline">e.g., <apll>2<_x/>3</apll> as a shorthand for <apll>2∙e<sup>3</sup></apll> or <apll>2×(*1)*3</apll>.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 21: | Line 21: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2<_p/>3</apll> as a shorthand for <apll>2∙π<sup>3</sup></apll> or <apll>2×(○1)*3</apll>.</td> | <td valign="baseline">e.g., <apll>2<_p/>3</apll> as a shorthand for <apll>2∙π<sup>3</sup></apll> or <apll>2×(○1)*3</apll>.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 27: | Line 27: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2<_g/>3</apll> as a shorthand for <apll>2∙γ<sup>3</sup></apll> where <apll>γ</apll> is the [https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni Constant].</td> | <td valign="baseline">e.g., <apll>2<_g/>3</apll> as a shorthand for <apll>2∙γ<sup>3</sup></apll> where <apll>γ</apll> is the [https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni Constant].</td> | ||
</tr> | |||
<tr> | |||
<td valign="baseline"><b>Complex Cartesian Point Notation</b>:</td> | |||
<td></td> | |||
<td></td> | |||
<td valign="baseline">e.g., <apll>2<_J/>3</apll> or <apll>2<in/>3</apll> as a shorthand for <apll>2+3×√¯1</apll>.</td> | |||
</tr> | |||
<td valign="baseline"><b>Complex Angle Point Notation</b>:</td> | |||
<td></td> | |||
<td></td> | |||
<td valign="baseline">e.g., <apll>2<_ad/>3</apll> (Angle in Degrees), <apll>2<_ar/>3</apll> (Angle in Radians), <apll>2<_au/>3</apll> (Angle in Unit Normalized Radians), or <apll>2<_ah/>3</apll> (Angle in Half Unit Normalized Radians).</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 33: | Line 45: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., | <td valign="baseline">e.g., <apll>1<_i/>2<j/>3<k/>4</apll> for a Quaternion number, or <apll>1<_i/>2<_j/>3<_k/>4<l/>5<_ij/>6<_jk/>7<_kl/>8</apll> for an Octonion number.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 57: | Line 69: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2<_e/>3</apll> or <apll>2<_E/>3</apll> as a shorthand for <apll>2∙10<sup>3</sup></apll> or <apll>2×10*3</apll>.</td> | <td valign="baseline">e.g., <apll>2<_e/>3</apll> or <apll>2<_E/>3</apll> as a shorthand for <apll>2∙10<sup>3</sup></apll> or <apll>2×10*3</apll>.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 63: | Line 75: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2.5</apll> as a shorthand for <apll>2½</apll> or <apll>2+5÷10</apll>.</td> | <td valign="baseline">e.g., <apll>2.5</apll> as a shorthand for <apll>2½</apll> or <apll>2+5÷10</apll>.</td> | ||
</tr> | </tr> | ||
</table> | </table> |
Revision as of 12:56, 25 July 2019
Overview
|
||||||||||||||||||||||||||||||||||||||||||||||||
Base, Euler, Pi, Gamma, and Rational Point Notations are extensions to the familiar Decimal Point Notation as well as Exponential Point or Scientific Notation methods of entering numeric constants. Thanks to the designers of J for these clever ideas. |
Base Point Notation
This notation makes it easy to enter numeric constants in an arbitrary base.
The number to the left of the
For example, 1
Note that the base may also be negative as in ¯1
The characters to the right of the b may range from 0-9 or a-z where the latter range is a way of representing numbers from 10-35 in a single character. The uppercase letters (A-Z) have the same values as the corresponding lowercase case letters and may be used instead of or intermixed with them.
For example, 10
A decimal point may appear anywhere in the characters to the right of the
Finally, the characters to the right of the
For example, 2
Euler Point Notation
This notation allows you to enter numeric constants that are in the form of the product of a multiplier and e (≅ 2.718281828459045... — base of the natural logarithms) raised to an exponent, that is, MeE or M×(*1)*E. The numbers to the left (multiplier) and right (exponent) of the x may be represented in several ways including integers, Decimal, Exponential, Hypercomplex, Rational, or Variable Precision Floating Point Notation, but not Base, Euler, Pi, or Gamma Point Notation.
For example, 1
Both the multiplier and exponent may be negative and/or fractional as in ¯1
Pi Point Notation
This notation allows you to enter numeric constants that are in the form of the product of a multiplier and π (≅ 3.141592653589793... — ratio of a circle's circumference and diameter) raised to an exponent, that is, MπE or M×(○1)*E. The numbers to the left (multiplier) and right (exponent) of the
For example, 1
Both the multiplier and exponent may be negative and/or fractional as in ¯1
Gamma Point Notation
This notation allows you to enter numeric constants that are in the form of the product of a multiplier and γ (≅ 0.5772156649015329... — limiting difference between the harmonic series and the natural logarithm) raised to an exponent, that is, MγE or M×γ*E. The numbers to the left (multiplier) and right (exponent) of the g may be represented in several ways including integers, Decimal, Exponential, Rational, or Variable Precision Floating Point Notation, but not Base, Euler, Pi, or Gamma Point Notation.
For example, 1
Both the multiplier and exponent may be negative and/or fractional as in ¯1
Hypercomplex Point Notation
This notation allows you to enter Complex, Quaternion, and Octonion numbers in various forms such as a combination of a Real part followed by one or more Hypercomplex units (2nd, 4th, or 8th root of ¯1) times the corresponding coefficient. For more details, see Hypercomplex Notation in APL.
The limitation on the Angle in the several Complex Angle notations is as follows:
Notation | Domain for Angle | Angle Units | ||
ad | [¯360, 360] | Degrees | ||
ar | [¯2p1, 2p1] | Radians | ||
au | [0, 1] | Unit Normalized Radians | ||
ah | [¯0.5, 0.5] | Half Unit Normalized Radians |
Entering a number whose Angle is outside the associated domain, signals an error.
Ball Arithmetic Point Notation
This notation allows you to enter Ball Arithmetic point values. A Ball consists of a Midpoint and a Radius. The two values are separated by a plus-or-minus sign (
Ball Arithmetic numbers may also be used as a lefthand part of Base, and any part of Euler, Pi, Gamma, or Hypercomplex Point Notations. For more information, see Ball Arithmetic.
Rational Point Notation
This notation allows you to enter fractions as rational numbers and have them be retained as rational numbers. Rational numbers (using the r infix separator only, not the x suffix) may also be used as a lefthand part of Base, and either part of Euler, Pi, or Gamma Point Notations. For more information, see Rational Numbers. This notation also accepts strings that contain Decimal and/or Exponential point notation such as 0.5
Variable-Precision Floating Point Notation
This notation allows you to enter Decimal and Exponential point values as variable-precision floating point numbers. For example, 2.3
In this form, the bits of precision of the number is specified by the value of ⎕FPC at the time the number is fixed. Alternatively, the suffix v may be followed by an unsigned integer (≥53) to specify the number of bits of precision of the number, overriding the value of ⎕FPC. For example 2.3
VFP numbers (using the
Exponential Point Notation
This familiar notation (sometimes called scientific notation) allows you to enter numeric constants that are in the form of the product of a multiplier and a (possibly negative) power of 10. Exponential numbers (using either the
For example, ¯1.1
Decimal Point Notation
This basic notation allows you to enter a decimal value with an integer part and fractional part separated by a period (.) as in 2.3 with an optional leading high minus sign (¯2.3) if the number is negative.
Mixed Notation
The above notations may be combined in a single Point Notation String with the restrictions discussed above, a summary of which follows:
- The right part of Base Point Notation may not contain any of the above Point Notations except for Decimal.
- The left part of Base Point Notation may contain any of the above Point Notations except itself.
- Decimal, Exponential, Rational, Variable Precision, Ball, and Hypercomplex Point Notations may appear in either or both parts of Euler, Pi, or Gamma Point Notations.
- No two of Euler, Pi, or Gamma Point Notations may appear in the same Point Notation String.
In terms of Binding Strength, the Notation with the highest binding strength is Decimal. That is, Decimal Point Notation numbers are constructed first. From highest to lowest binding strength, the sequence is as follows:
- 7. Decimal
- 6. Exponential
- 5. Rational, Variable Precision Floating Point
- 4. Ball Arithmetic
- 3. Hypercomplex
- 2. Euler, Pi, Gamma
- 1. Base
Notations with the same binding strength may not be mixed (e.g., 1r2v is an error). Otherwise, any notation may incorporate notations with a higher binding strength but may not incorporate notations with an equal or lower binding strength.
This latter case need not signal an error, but instead it might produce a different interpretation. For example,
1
NARS 2000 Lang Tool Bar |
← | → | + | - | × | ÷ | * | ⍟ | ⌹ | ○ | ! | ? | √ | | | ⌈ | ⌊ | ⊥ | ⊤ | ⊣ | ⊢ | |||
≡ | ≢ | < | ≤ | = | ≥ | > | ≠ | ∨ | ∧ | ⍱ | ⍲ | ↑ | ↓ | ⊂ | ⊃ | ⌷ | ⍋ | ⍒ | |||||
⍳ | ∊ | ⍸ | ⍷ | ∪ | ∩ | ⊆ | ⊇ | ~ | § | π | .. | , | ⍪ | ⍴ | ⌽ | ⊖ | ⍉ | ||||||
/ | \ | ⌿ | ⍀ | ⊙ | ¨ | ⍨ | ⍤ | ⍣ | ⍡ | ⍥ | ⍦ | . | ∘ | ⍠ | ‼ | ⌻ | ∂ | ∫ | ⍞ | ⎕ | ⍎ | ⍕ | |
⋄ | ⍝ | ∇ | ∆ | ⍙ | _ | ⍺ | ⍵ | ¯ | ⍬ | ∞ | ∅ | ||||||||||||
Second Row | i j k | i j k l | g | p | r | v | x |