Point Notation: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
No edit summary
Line 15: Line 15:
       <td></td>
       <td></td>
       <td></td>
       <td></td>
       <td>e.g., <apll>2x3</apll> as a shorthand for <apll>2e<sup>3</sup></apll> or <apll>2×(*1)*3</apll></td>
       <td>e.g., <apll>2x3</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>2p3</apll> as a shorthand for <apll>2&pi;<sup>3</sup></apll> or <apll>2×(○1)*3</apll></td>
       <td>e.g., <apll>2p3</apll> as a shorthand for <apll>2∙&pi;<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>2g3</apll> as a shorthand for <apll>2&gamma;<sup>3</sup></apll> where <apll>&gamma;</apll> is the [https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni Constant]</td>
       <td>e.g., <apll>2g3</apll> as a shorthand for <apll>2∙&gamma;<sup>3</sup></apll> where <apll>&gamma;</apll> is the [https://en.wikipedia.org/wiki/Euler%E2%80%93Mascheroni_constant Euler-Mascheroni Constant]</td>
     </tr>    <tr>
     </tr>    <tr>
       <td valign="top"><b>Rational Point Notation</b>:</td>
       <td valign="top"><b>Rational Point Notation</b>:</td>
Line 38: Line 38:
       <td></td>
       <td></td>
       <td></td>
       <td></td>
       <td valign="top">e.g., <apll>2v3</apll> as a shorthand for <apll>2.3</apll> as a variable-precision floating point number, or <apll>123v</apll> as a means of representing <apll>123</apll> as a VFP number whose fractional part is zero</td>
       <td valign="top">e.g., <apll>2.3v</apll> as a shorthand for <apll>2.3</apll> as a variable-precision floating point number, or <apll>123v</apll> as a means of representing <apll>123</apll> as a VFP number whose fractional part is zero</td>
     </tr>
     </tr>
     <tr>
     <tr>
Line 101: Line 101:
== Rational Point Notation ==
== 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 <apll>r</apll> separator only, not the <apll>x</apll> suffix) may also be used as a lefthand argument to <b>Base</b>, and either argument to <b>Euler</b>, <b>Pi</b>, or <b>Gamma</b> Point Notation.  For more information, see [[Rational and VFP Numbers|Rational Numbers]].
This notation allows you to enter fractions as rational numbers and have them be retained as rational numbers.  Rational numbers (using the <apll>r</apll> infix separator only, not the <apll>x</apll> suffix) may also be used as a lefthand argument to <b>Base</b>, and either argument to <b>Euler</b>, <b>Pi</b>, or <b>Gamma</b> Point Notations.  For more information, see [[Rational and VFP Numbers|Rational Numbers]].  This notation also accepts strings that contain '''Decimal''' and/or '''Exponential''' point notation such as <apll>0.5x</apll>, <apll>0.5r3</apll>, <apll>1E¯3r1.5</apll>, etc. and represents them as a Rational number.


== Variable-precision Floating Point Notation ==
== Variable-precision Floating Point Notation ==


This notation allows you to enter decimal point values as variable-precision floating point numbers whose precision is taken from the current value of the system variable <apll>⎕FPC</apll>.  For more information, see [[Rational and VFP Numbers|Variable-precision Floating Point (VFP) Numbers]].
This notation allows you to enter decimal point values as variable-precision floating point numbers whose precision is taken from the current value of the system variable <apll>⎕FPC</apll>.  VFP numbers (using the <apll>v</apll> suffix) may also be used as a lefthand argument to <b>Base</b>, and either argument to <b>Euler</b>, <b>Pi</b>, or <b>Gamma</b> Point Notations.  For more information, see [[Rational and VFP Numbers|Variable-precision Floating Point (VFP) Numbers]].


== Exponential Point Notation ==
== 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.
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 the <apll>e</apll> infix separator) may also be used as a lefthand argument to <b>Base</b>, and either argument to <b>Euler</b>, <b>Pi</b>, or <b>Gamma</b> Point Notations.


For example, <apll>¯1.1e2</apll> is the same as <apll>¯110.0</apll>, and <apll>1.1e¯6</apll> is the same as <apll>0.0000011</apll>.
For example, <apll>¯1.1e2</apll> is the same as <apll>¯110.0</apll>, and <apll>1.1e¯6</apll> is the same as <apll>0.0000011</apll>.


== 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 argument to '''Base''' Point Notation may not contain any other of the above Point Notations.
The left argument to '''Base''' Point Notation may contain any of the other Point Notations except '''Base''' Point Notation.
'''Rational''', '''Variable Precision''', and '''Exponential''' Point Notations may appear in either or both arguments to '''Euler''', '''Pi''', or '''Gamma''' Point Notations.
No Point Notation may appear with itself in the same Point Notation String.
No two of '''Euler''', '''Pi''', or '''Gamma''' Point Notations may appear in the same Point Notation String.


{{Language Toolbar}}
{{Language Toolbar}}
[[Category:Mouse Group Notations]]
[[Category:Mouse Group Notations]]

Revision as of 19:36, 22 April 2016

Overview

Base Point Notation: e.g., 16b10FFFFas a shorthand for 16⊥1 0 15 15 15 15 15.
Euler Point Notation: e.g., 2x3 as a shorthand for 2∙e3 or 2×(*1)*3
Pi Point Notation: e.g., 2p3 as a shorthand for 2∙π3 or 2×(○1)*3
Gamma Point Notation: e.g., 2g3 as a shorthand for 2∙γ3 where γ is the Euler-Mascheroni Constant
Rational Point Notation: e.g., 2r3 as a shorthand for 2÷3 as an infinite precision rational number, or 123x as a means of representing 123 as an infinite precision integer — the suffix x is actually a shorthand for r1, that is, infinite precision integers are actually represented as rational numbers with a denominator of 1
Variable-precision Floating Point Notation: e.g., 2.3v as a shorthand for 2.3 as a variable-precision floating point number, or 123v as a means of representing 123 as a VFP number whose fractional part is zero
Decimal Point Notation: e.g., 2.5 as a shorthand for or 2+5÷10
Exponential Point Notation: e.g., 2e3 as a shorthand for 2∙103 or 2×10*3
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 b is the base of the number system for the characters to the right of the b. The base may be represented in several ways including integers, Exponential, Decimal, Euler, Pi, Gamma, and Rational Point Notation, but not Base Point Notation.

For example, 1e3b111 is the same as 1000b111.

Note that the base may also be negative as in ¯1b0z or fractional as in 0.1b1234.

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, 10bzzZ is the same as 10⊥35 35 35 35, and 1r2b111 is the same as 0.5b111.

Euler Point Notation

This notation allows you to enter numeric constants that are in the form of the product of a multiplier and e (the 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, or Rational Point Notation, but not Base, Euler, Pi, or Gamma Point Notation.

For example, 1e2x1.1 is the same as 100x1.1, and 1r2x1.1e2 is the same as 0.5x110.

Both the multiplier and exponent may be negative and/or fractional as in ¯1e2x¯3.3.

Pi Point Notation

This notation allows you to enter numeric constants that are in the form of the product of a multiplier and π raised to an exponent, that is, E or M×(○1)*E. The numbers to the left (multiplier) and right (exponent) of the p may be represented in several ways including integers, Decimal, Exponential, or Rational Point Notation, but not Base, Euler, Pi, or Gamma Point Notation.

For example, 1e2p1.1 is the same as 100p1.1, and 1r2p1.1e2 is the same as 0.5p110.

Both the multiplier and exponent may be negative and/or fractional as in ¯1e2p¯3.3.

Gamma Point Notation

This notation allows you to enter numeric constants that are in the form of the product of a multiplier and γ raised to an exponent, that is, 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, or Rational Point Notation, but not Base, Euler, Pi, or Gamma Point Notation.

For example, 1e2g1.1 is the same as 100g1.1, and 1r2g1.1e2 is the same as 0.5g110.

Both the multiplier and exponent may be negative and/or fractional as in ¯1e2g¯3.3.

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 argument to Base, and either argument to 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.5x, 0.5r3, 1E¯3r1.5, etc. and represents them as a Rational number.

Variable-precision Floating Point Notation

This notation allows you to enter decimal point values as variable-precision floating point numbers whose precision is taken from the current value of the system variable ⎕FPC. VFP numbers (using the v suffix) may also be used as a lefthand argument to Base, and either argument to Euler, Pi, or Gamma Point Notations. For more information, see Variable-precision Floating Point (VFP) Numbers.

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 the e infix separator) may also be used as a lefthand argument to Base, and either argument to Euler, Pi, or Gamma Point Notations.

For example, ¯1.1e2 is the same as ¯110.0, and 1.1e¯6 is the same as 0.0000011.

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 argument to Base Point Notation may not contain any other of the above Point Notations.

The left argument to Base Point Notation may contain any of the other Point Notations except Base Point Notation.

Rational, Variable Precision, and Exponential Point Notations may appear in either or both arguments to Euler, Pi, or Gamma Point Notations.

No Point Notation may appear with itself in the same Point Notation String.

No two of Euler, Pi, or Gamma Point Notations may appear in the same Point Notation String.

NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x