Point Notation: Difference between revisions
Sudleyplace (talk | contribs) No edit summary |
|||
Line 27: | Line 27: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>e.g., <apll>2r3</apll> as a shorthand for <apll>2{divide}3</apll> as a | <td>e.g., <apll>2r3</apll> as a shorthand for <apll>2{divide}3</apll> as an infinite precision rational number</td> | ||
</tr> | |||
<tr> | |||
<td valign="bottom"><b>Variable-precision Floating Point Notation</b>:</td> | |||
<td></td> | |||
<td></td> | |||
<td>e.g., <apll>2v3</apll> as a shorthand for <apll>2.3</apll> as a variable-precision floating point number</td> | |||
</tr> | </tr> | ||
<tr> | <tr> |
Revision as of 09:43, 30 May 2011
Overview
|
||||||||||||||||||||||||||||
Base, Euler, Pi, 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, Pi, Euler, 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, Pi, or Euler 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, Mπ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, or Pi 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.
Rational Point Notation
This notation allows you to enter fractions as rational numbers and have them be retained as rational numbers. The implementation of this feature is woefully incomplete — in fact, the only place this notation is allowed is as an argument to Base, Euler, or Pi Point Notation.