Jump to content

User:EnronEvolved/sandbox

From Wikipedia, the free encyclopedia

Old popes table testing

[edit]
Pope Year elected Elected at age Age at death or resignation Length of pontificate
Clement X 1670 79 years, 290 days 86 6 years, 84 days
Alexander VIII 1689 79 years, 177 days 80 1 year, 118 days
Paul IV 1555 78 years, 330 days 83 4 years, 87 days
Clement XII 1730 78 years, 100 days 87 9 years, 209 days
Benedict XVI 2005 78 years, 3 days 85 7 years, 315 days
John XXIII 1958 76 years, 337 days 81 4 years, 218 days
Innocent XII 1691 76 years, 124 days 85 9 years, 77 days
Callixtus III 1455 76 years, 98 days 79 3 years, 120 days
Francis 2013 76 years, 86 days Current 11 years, 244 days
Benedict XIII 1724 75 years, 91 days 81 5 years, 268 days

Testing Template:Ze

[edit]

she

APL syntax and symbols

[edit]

The programming language APL is distinctive in being symbolic rather than lexical: its primitives are denoted by symbols, not words. These symbols were originally devised as a mathematical notation to describe algorithms.[1] APL programmers often assign informal names when discussing functions and operators (for example, "product" for ×/) but the core functions and operators provided by the language are denoted by non-textual symbols.

Monadic and dyadic functions

[edit]

Most symbols denote functions or operators. A monadic function takes as its argument the result of evaluating everything to its right. (Moderated in the usual way by parentheses.) A dyadic function has another argument, the first item of data on its left. Many symbols denote both monadic and dyadic functions, interpreted according to use. For example, ⌊3.2 gives 3, the largest integer not above the argument, and 3⌊2 gives 2, the lower of the two arguments.

Functions and operators

[edit]

APL uses the term operator in Heaviside’s sense as a moderator of a function as opposed to some other programming language's use of the same term as something that operates on data, ref. relational operator and operators generally. Other programming languages also sometimes use this term interchangeably with function, however both terms are used in APL more precisely.[2][3][4][5][6] Early definitions of APL symbols were very specific about how symbols were categorized.[7] For example, the operator reduce is denoted by a forward slash and reduces an array along one axis by interposing its function operand. An example of reduce:

×/2 3 4
⍝ 24
2×3×4
⍝ 24

In the above case, the reduce or slash operator moderates the multiply function. The expression ×/2 3 4 evaluates to a scalar (1 element only) result through reducing an array by multiplication. The above case is simplified, imagine multiplying (adding, subtracting or dividing) more than just a few numbers together. (From a vector, ×/ returns the product of all its elements.)


1 0 1\45 67
⍝ 45 0 67
1 0 1/45 0 67
⍝ 45 67

The above dyadic functions examples [left and right examples] (using the same / symbol, right example) demonstrate how boolean values (0s and 1s) can be used as left arguments for the \ expand and / replicate functions to produce exactly opposite results. On the left side, the 2-element vector 45 67 is expanded where boolean 0s occur to result in a 3-element vector 45 0 67 — note how APL inserted a 0 into the vector. Conversely, the exact opposite occurs on the right side — where a 3-element vector becomes just 2-elements; boolean 0s delete items using the dyadic / slash function. APL symbols also operate on lists (vector) of items using data types other than just numeric, for example a 2-element vector of character strings "Apples" "Oranges" could be substituted for numeric vector 45 67 above.

Syntax rules

[edit]

In APL the precedence hierarchy for functions or operators is strictly positional: expressions are evaluated right-to-left. APL does not follow the usual operator precedence of other programming languages; for example, × does not bind its operands any more "tightly" than +. Instead of operator precedence, APL defines a notion of scope.

The scope of a function determines its arguments. Functions have long right scope: that is, they take as right arguments everything to their right. A dyadic function has short left scope: it takes as its left arguments the first piece of data to its left. For example, (leftmost column below is actual program code from an APL user session, indented = actual user input, not-indented = result returned by APL interpreter):

      1 ÷ 2  3 × 4 - 5
¯0.3333333333
      1 ÷ 2  3 × ¯1
¯0.3333333333
      1 ÷ 2  ¯3
¯0.3333333333
      1 ÷ ¯3
¯0.3333333333

<< First note there are no parentheses and
APL is going to execute from right-to-left.

  1. {of topmost APL code entered at left}) 4-5 = -1.
  2. 3 times -1 = -3.
  3. Take the floor or lower of 2 and -3 = -3.
  4. Divide 1 by -3 = -0.3333333333 = final result.

An operator may have function or data operands and evaluate to a dyadic or monadic function. Operators have long left scope. An operator takes as its left operand the longest function to its left. For example:

      ∘.=/¨3 3
1 0 0
0 1 0
0 0 1

APL atomic or piecemeal sub-analysis (full explanation):
Beginning rightmost: ¨3 3 produces a 2-element nested APL vector 1 2 3 1 2 3 where each element is itself a vector 1 2 3. 3 by itself would produce 1 2 3.

The diaeresis ¨ or mini double-dot means repeat or over each or perform each separately so iota repeats (in human i.e., reversed terms, the APL interpreter reads 3 3 over each use iota), concisely: iota for each 3.

The left operand for the over-each operator ¨ is the index function. The derived function ¨ is used monadically and takes as its right operand the vector 3 3. The left scope of each is terminated by the reduce operator, denoted by the forward slash. Its left operand is the function expression to its left: the outer product of the equals function. The result of apl is a monadic function. With a function's usual long right scope, it takes as its right argument the result of ¨3 3. Thus

      (3)(3)
1 2 3  1 2 3
      (3)∘.=⍳3
1 0 0
0 1 0
0 0 1
      ¨3 3
1 2 3  1 2 3
      ∘.=/¨3 3
1 0 0
0 1 0
0 0 1


Equivalent results in APL: (3)(3) and ¨3 3 << Rightmost expression is more concise.

The matrix of 1s and 0s similarly produced by ∘.=/¨3 3 and (3)∘.=⍳3 is called an identity matrix.

Identity matrices are useful in solving matrix determinants, groups of linear equations and multiple regression.


      im  ∘.=⍨∘
      im 3
1 0 0
0 1 0
0 0 1

Some APL interpreters support the compose operator and the commute operator . The former glues functions together so that foobar, for example, could be a hypothetical function that applies defined function foo to the result of defined function bar; foo and bar can represent any existing function. In cases where a dyadic function is moderated by commute and then used monadically, its right argument is taken as its left argument as well. Thus, a derived or composed function (named im at left) is used in the APL user session to return a 9-element identity matrix using its right argument, parameter or operand = 3.



Monadic functions

[edit]
Name(s) Notation Meaning Unicode code point
Roll ?B One integer selected randomly from the first B integers U+003F ? QUESTION MARK
Ceiling ⌈B Least integer greater than or equal to B U+2308 LEFT CEILING
Floor ⌊B Greatest integer less than or equal to B U+230A LEFT FLOOR
Shape, Rho ⍴B Number of components in each dimension of B U+2374 APL FUNCTIONAL SYMBOL RHO
Not, Tilde ∼B Logical: ∼1 is 0, ∼0 is 1 U+223C TILDE OPERATOR
Absolute value ∣B Magnitude of B U+2223 DIVIDES
Index generator, Iota ⍳B Vector of the first B integers U+2373 APL FUNCTIONAL SYMBOL IOTA
Exponential ⋆B e to the B power U+22C6 STAR OPERATOR
Negation −B Changes sign of B U+2212 MINUS SIGN
Conjugate +B The complex conjugate of B (real numbers are returned unchanged) U+002B + PLUS SIGN
Signum ×B ¯1 if B<0; 0 if B=0; 1 if B>0 U+00D7 × MULTIPLICATION SIGN
Reciprocal ÷B 1 divided by B U+00F7 ÷ DIVISION SIGN
Ravel, Catenate, Laminate ,B Reshapes B into a vector U+002C , COMMA
Matrix inverse, Monadic Quad Divide ⌹B Inverse of matrix B U+2339 APL FUNCTIONAL SYMBOL QUAD DIVIDE
Pi times ○B Multiply by π U+25CB WHITE CIRCLE
Logarithm ⍟B Natural logarithm of B U+235F APL FUNCTIONAL SYMBOL CIRCLE STAR
Reversal ⌽B Reverse elements of B along last axis U+233D APL FUNCTIONAL SYMBOL CIRCLE STILE
Reversal ⊖B Reverse elements of B along first axis U+2296 CIRCLED MINUS
Grade up ⍋B Indices of B which will arrange B in ascending order U+234B APL FUNCTIONAL SYMBOL DELTA STILE
Grade down ⍒B Indices of B which will arrange B in descending order U+2352 APL FUNCTIONAL SYMBOL DEL STILE
Execute ⍎B Execute an APL expression U+234E APL FUNCTIONAL SYMBOL DOWN TACK JOT
Monadic format ⍕B A character representation of B U+2355 APL FUNCTIONAL SYMBOL UP TACK JOT
Monadic transpose ⍉B Reverse the axes of B U+2349 APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH
Factorial !B Product of integers 1 to B U+0021 ! EXCLAMATION MARK
Depth ≡B Nesting depth: 1 for un-nested array U+2261 IDENTICAL TO
Table ⍪B Makes B into a table, a 2-dimensional array. U+236A APL FUNCTIONAL SYMBOL COMMA BAR

Dyadic functions

[edit]
Name(s) Notation Meaning Unicode
code point
Add A+B Sum of A and B U+002B + PLUS SIGN
Subtract A−B A minus B U+2212 MINUS SIGN
Multiply A×B A multiplied by B U+00D7 × MULTIPLICATION SIGN
Divide A÷B A divided by B U+00F7 ÷ DIVISION SIGN
Exponentiation A⋆B A raised to the B power U+22C6 STAR OPERATOR
Circle A○B Trigonometric functions of B selected by A
A=1: sin(B)    A=5: sinh(B)
A=2: cos(B)    A=6: cosh(B)
A=3: tan(B)    A=7: tanh(B)

Negatives produce the inverse of the respective functions

U+25CB WHITE CIRCLE
Deal A?B A distinct integers selected randomly from the first B integers U+003F ? QUESTION MARK
Membership, Epsilon A∈B 1 for elements of A present in B; 0 where not. U+2208 ELEMENT OF
Find, Epsilon Underbar A⍷B 1 for starting point of multi-item array A present in B; 0 where not. U+2377 APL FUNCTIONAL SYMBOL EPSILON UNDERBAR
Maximum, Ceiling A⌈B The greater value of A or B U+2308 LEFT CEILING
Minimum, Floor A⌊B The smaller value of A or B U+230A LEFT FLOOR
Reshape, Dyadic Rho A⍴B Array of shape A with data B U+2374 APL FUNCTIONAL SYMBOL RHO
Take A↑B Select the first (or last) A elements of B according to ×A U+2191 UPWARDS ARROW
Drop A↓B Remove the first (or last) A elements of B according to ×A U+2193 DOWNWARDS ARROW
Decode A⊥B Value of a polynomial whose coefficients are B at A U+22A5 UP TACK
Encode A⊤B Base-A representation of the value of B U+22A4 DOWN TACK
Residue A∣B B modulo A U+2223 DIVIDES
Catenation A,B Elements of B appended to the elements of A U+002C , COMMA
Expansion, Dyadic Backslash A\B Insert zeros (or blanks) in B corresponding to zeros in A U+005C \ REVERSE SOLIDUS
Compression, Dyadic Slash A/B Select elements in B corresponding to ones in A U+002F / SOLIDUS
Index of, Dyadic Iota A⍳B The location (index) of B in A; 1+⍴A if not found U+2373 APL FUNCTIONAL SYMBOL IOTA
Matrix divide, Dyadic Quad Divide A⌹B Solution to system of linear equations, multiple regression Ax = B U+2339 APL FUNCTIONAL SYMBOL QUAD DIVIDE
Rotation A⌽B The elements of B are rotated A positions U+233D APL FUNCTIONAL SYMBOL CIRCLE STILE
Rotation A⊖B The elements of B are rotated A positions along the first axis U+2296 CIRCLED MINUS
Logarithm A⍟B Logarithm of B to base A U+235F APL FUNCTIONAL SYMBOL CIRCLE STAR
Dyadic format A⍕B Format B into a character matrix according to A U+2355 APL FUNCTIONAL SYMBOL UP TACK JOT
General transpose A⍉B The axes of B are ordered by A U+2349 APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH
Combinations A!B Number of combinations of B taken A at a time U+0021 ! EXCLAMATION MARK
Diaeresis, Dieresis, Double-Dot A¨B Over each, or perform each separately; B = on these; A = operation to perform or using (e.g., iota) U+00A8 ¨ DIAERESIS
Less than A<B Comparison: 1 if true, 0 if false U+003C < LESS-THAN SIGN
Less than or equal A≤B Comparison: 1 if true, 0 if false U+2264 LESS-THAN OR EQUAL TO
Equal A=B Comparison: 1 if true, 0 if false U+003D = EQUALS SIGN
Greater than or equal A≥B Comparison: 1 if true, 0 if false U+2265 GREATER-THAN OR EQUAL TO
Greater than A>B Comparison: 1 if true, 0 if false U+003E > GREATER-THAN SIGN
Not equal A≠B Comparison: 1 if true, 0 if false U+2260 NOT EQUAL TO
Or A∨B Boolean Logic: 0 (False) if both A and B = 0, 1 otherwise. Alt: 1 (True) if A or B = 1 (True) U+2228 LOGICAL OR
And A∧B Boolean Logic: 1 (True) if both A and B = 1, 0 (False) otherwise U+2227 LOGICAL AND
Nor A⍱B Boolean Logic: 1 if both A and B are 0, otherwise 0. Alt: ~∨ = not Or U+2371 APL FUNCTIONAL SYMBOL DOWN CARET TILDE
Nand A⍲B Boolean Logic: 0 if both A and B are 1, otherwise 1. Alt: ~∧ = not And U+2372 APL FUNCTIONAL SYMBOL UP CARET TILDE
Left A⊣B A U+22A3 LEFT TACK
Right A⊢B B U+22A2 RIGHT TACK
Match A≡B 0 if A does not match B exactly with respect to value, shape, and nesting; otherwise 1. U+2261 IDENTICAL TO
Laminate A⍪B Concatenate along first axis U+236A APL FUNCTIONAL SYMBOL COMMA BAR

Operators and axis indicator

[edit]
Name(s) Symbol Example Meaning (of example) Unicode code point sequence
Reduce (last axis), Slash / +/B Sum across B U+002F / SOLIDUS
Reduce (first axis) +⌿B Sum down B U+233F APL FUNCTIONAL SYMBOL SLASH BAR
Scan (last axis), Backslash \ +\B Running sum across B U+005C \ REVERSE SOLIDUS
Scan (first axis) +⍀B Running sum down B U+2340 APL FUNCTIONAL SYMBOL BACKSLASH BAR
Inner product . A+.×B Matrix product of A and B U+002E . FULL STOP
Outer product ∘. A∘.×B Outer product of A and B U+2218 RING OPERATOR, U+002E . FULL STOP

Notes: The reduce and scan operators expect a dyadic function on their left, forming a monadic composite function applied to the vector on its right.

The product operator "." expects a dyadic function on both its left and right, forming a dyadic composite function applied to the vectors on its left and right. If the function to the left of the dot is "∘" (signifying null) then the composite function is an outer product, otherwise it is an inner product. An inner product intended for conventional matrix multiplication uses the + and × functions, replacing these with other dyadic functions can result in useful alternative operations.

Some functions can be followed by an axis indicator in (square) brackets, i.e., this appears between a function and an array and should not be confused with array subscripts written after an array. For example, given the ⌽ (reversal) function and a two-dimensional array, the function by default operates along the last axis but this can be changed using an axis indicator:

        A4 3⍴⍳12
        A
 1  2  3
 4  5  6
 7  8  9
10 11 12
        A
 3  2  1
 6  5  4
 9  8  7
12 11 10
        [1]A
10 11 12
 7  8  9
 4  5  6
 1  2  3
        ⊖⌽A
12 11 10
 9  8  7
 6  5  4
 3  2  1
        A
1 4 7 10
2 5 8 11
3 6 9 12


4 rows by 3 cols matrix created, using rho ⍴ and iota ⍳. The 4 x 3 matrix is then stored in a variable named A.

A is now reflected or flipped along its vertical axis as symbol ⌽ visually indicates.

A is now reflected using the [1] axis indicator or first dimension modifier. The result is that variable A has been reflected across the horizontal axis, instead of vertically.

A is now reflected both vertically ⊖ and horizontally ⌽.

A is ⍉ transposed to a 3 row by 4 col matrix such that rows-cols become exchanged, as symbol ⍉ visually portrays. Compare the result here to the original matrix stored in A, topmost matrix. These types of data transformations are useful in time series analysis and spatial coordinates, just two examples, more exist.


As a particular case, if the dyadic catenate "," function is followed by an axis indicator (or axis modifier to a symbol/function), it can be used to laminate (interpose) two arrays depending on whether the axis indicator is less than or greater than the index origin[8] (index origin = 1 in illustration below):

        B1 2 3 4
        C5 6 7 8
        B,C
1 2 3 4 5 6 7 8
        B,[0.5]C
1 2 3 4
5 6 7 8
        B,[1.5]C
1 5
2 6
3 7
4 8

At left, variable 'B' is first assigned a vector of 4 consecutive integers (e.g., ⍳4).
Var C is then assigned 4 more consecutive integers (such as 4+⍳4).
'B' and C are then concatenated or raveled together for illustration purposes,
resulting in a single vector (⍳8). In the particular case at left, if the dyadic catenate "," function is followed by an axis indicator ([0.5] which is less than 1), it can be used to laminate (interpose) two arrays (vectors in this case) depending on whether the axis indicator is less than or greater than the index origin(1). The first result (of B,[0.5]C) is a 2 row by 4 column matrix, vertically joining 'B' and C row-wise. The second result (of B,[1.5]C which is greater than 1) is a 4 row by 2 column matrix.

Nested arrays

[edit]

Arrays are structures which have elements grouped linearly as vectors or in table form as matrices—and higher dimensions (3D or cubed, 4D or cubed over time, etc.). Arrays containing both characters and numbers are termed mixed arrays.[9] Array structures containing elements which are also arrays are called nested arrays.[10]

Creating a nested array
User session with APL interpreter Explanation
      X4 5⍴⍳20
      X
 1  2  3  4  5
 6  7  8  9 10
11 12 13 14 15
16 17 18 19 20
      X[2;2]
7
      ⎕IO
1
      X[1;1]
1

X set = to matrix with 4 rows by 5 columns, consisting of 20 consecutive integers.

Element X[2;2] in row 2 - column 2 currently is an integer = 7.

Initial index origin ⎕IO value = 1.

Thus, the first element in matrix X or X[1;1] = 1.

      X[2;2]"Text"
      X[3;4](2 2⍴⍳4)
      X
  1    2  3      4    5
  6 Text  8      9   10

 11   12 13    1 2   15
               3 4

 16   17 18     19   20
Visual representation of the nested array

Element in X[row 2; col 2] is changed (from 7) to a nested vector "Text" using the enclose ⊂ function.


Element in X[row 3; col 4], formerly integer 14, now becomes a mini enclosed or ⊂ nested 2x2 matrix of 4 consecutive integers.

Since X contains numbers, text and nested elements, it is both a mixed and a nested array.

Flow control

[edit]

A user may define custom functions which, like variables, are identified by name rather than by a non-textual symbol. The function header defines whether a custom function is niladic (no arguments), monadic (one right argument) or dyadic (left and right arguments), the local name of the result (to the left of the ← assign arrow), and whether it has any local variables (each separated by semicolon ';').

User functions
Niladic function PI or π(pi) Monadic function CIRCLEAREA Dyadic function SEGMENTAREA, with local variables
  RESULTPI
   RESULT1
 
  AREACIRCLEAREA RADIUS
   AREAPI×RADIUS2
 
  AREADEGREES SEGMENTAREA RADIUS ; FRACTION ; CA
   FRACTIONDEGREES÷360
   CACIRCLEAREA RADIUS
   AREAFRACTION×CA
 

Whether functions with the same identifier but different adicity are distinct is implementation-defined. If allowed, then a function CURVEAREA could be defined twice to replace both monadic CIRCLEAREA and dyadic SEGMENTAREA above, with the monadic or dyadic function being selected by the context in which it was referenced.

Custom dyadic functions may usually be applied to parameters with the same conventions as built-in functions, i.e., arrays should either have the same number of elements or one of them should have a single element which is extended. There are exceptions to this, for example a function to convert pre-decimal UK currency to dollars would expect to take a parameter with precisely three elements representing pounds, shillings and pence.[11]

Inside a program or a custom function, control may be conditionally transferred to a statement identified by a line number or explicit label; if the target is 0 (zero) this terminates the program or returns to a function's caller. The most common form uses the APL compression function, as in the template (condition)/target which has the effect of evaluating the condition to 0 (false) or 1 (true) and then using that to mask the target (if the condition is false it is ignored, if true it is left alone so control is transferred).

Hence function SEGMENTAREA may be modified to abort (just below), returning zero if the parameters (DEGREES and RADIUS below) are of different sign:

 AREADEGREES SEGMENTAREA RADIUS ; FRACTION ; CA ; SIGN     ⍝ local variables denoted by semicolon(;)
  FRACTIONDEGREES÷360
  CACIRCLEAREA RADIUS        ⍝ this APL code statement calls user function CIRCLEAREA, defined up above.
  SIGN(×DEGREES)≠×RADIUS     ⍝ << APL logic TEST/determine whether DEGREES and RADIUS do NOT (≠ used) have same SIGN 1-yes different(≠), 0-no(same sign)
  AREA0                      ⍝ default value of AREA set = zero
  SIGN/0                     ⍝ branching(here, exiting) occurs when SIGN=1 while SIGN=0 does NOT branch to 0.  Branching to 0 exits function.
  AREAFRACTION×CA

The above function SEGMENTAREA works as expected if the parameters are scalars or single-element arrays, but not if they are multiple-element arrays since the condition ends up being based on a single element of the SIGN array - on the other hand, the user function could be modified to correctly handle vectorized arguments. Operation can sometimes be unpredictable since APL defines that computers with vector-processing capabilities should parallelise and may reorder array operations as far as possible - thus, test and debug user functions particularly if they will be used with vector or even matrix arguments. This affects not only explicit application of a custom function to arrays, but also its use anywhere that a dyadic function may reasonably be used such as in generation of a table of results:

        90 180 270 ¯90 ∘.SEGMENTAREA 1 ¯2 4
0 0 0
0 0 0
0 0 0
0 0 0

A more concise way and sometimes better way - to formulate a function is to avoid explicit transfers of control, instead using expressions which evaluate correctly in all or the expected conditions. Sometimes it is correct to let a function fail when one or both input arguments are incorrect - precisely to let user know that one or both arguments used were incorrect. The following is more concise than the above SEGMENTAREA function. The below importantly correctly handles vectorized arguments:

  AREADEGREES SEGMENTAREA RADIUS ; FRACTION ; CA ; SIGN
   FRACTIONDEGREES÷360
   CACIRCLEAREA RADIUS
   SIGN(×DEGREES)≠×RADIUS
   AREAFRACTION×CA×~SIGN  ⍝ this APL statement is more complex, as a one-liner - but it solves vectorized arguments: a tradeoff - complexity vs. branching
 

        90 180 270 ¯90 ∘.SEGMENTAREA 1 ¯2 4
0.785398163 0           12.5663706
1.57079633  0           25.1327412
2.35619449  0           37.6991118
0           ¯3.14159265 0

Avoiding explicit transfers of control also called branching, if not reviewed or carefully controlled - can promote use of excessively complex one liners, veritably "misunderstood and complex idioms" and a "write-only" style, which has done little to endear APL to influential commentators such as Edsger Dijkstra.[12] Conversely however APL idioms can be fun, educational and useful - if used with helpful comments ⍝, for example including source and intended meaning and function of the idiom(s). Here is an APL idioms list, an IBM APL2 idioms list here[13] and Finnish APL idiom library here.

Miscellaneous

[edit]
Miscellaneous symbols
Name(s) Symbol Example Meaning (of example) Unicode code point
High minus[14] ¯ ¯3 Denotes a negative number U+00AF ¯ MACRON
Lamp, Comment ⍝This is a comment Everything to the right of ⍝ denotes a comment U+235D APL FUNCTIONAL SYMBOL UP SHOE JOT
RightArrow, Branch, GoTo →This_Label →This_Label sends APL execution to This_Label: U+2192 RIGHTWARDS ARROW
Assign, LeftArrow, Set to B←A B←A sets values and shape of B to match A U+2190 LEFTWARDS ARROW

Most APL implementations support a number of system variables and functions, usually preceded by the ⎕ (quad) and/or ")" (hook=close parenthesis) character. Note that the quad character is not the same as the Unicode missing character symbol. Particularly important and widely implemented is the ⎕IO (Index Origin) variable, since while the original IBM APL based its arrays on 1 some newer variants base them on zero:

User session with APL interpreter Description
        X12
        X
1 2 3 4 5 6 7 8 9 10 11 12
        ⎕IO
1
        X[1]
1

X set = to vector of 12 consecutive integers.

Initial index origin ⎕IO value = 1. Thus, the first position in vector X or X[1] = 1 per vector of iota values {1 2 3 4 5 ...}.

        ⎕IO0
        X[1]
2
        X[0]
1
Index Origin ⎕IO now changed to 0. Thus, the 'first index position' in vector X changes from 1 to 0. Consequently, X[1] then references or points to 2 from {1 2 3 4 5 ...} and X[0] now references 1.
        ⎕WA
41226371072
Quad WA or ⎕WA, another dynamic system variable, shows how much Work Area remains unused or 41,226 megabytes or about 41 gigabytes of unused additional total free work area available for the APL workspace and program to process using. If this number gets low or approaches zero - the computer may need more random-access memory (RAM), hard disk drive space or some combination of the two to increase virtual memory.
        )VARS
X
)VARS a system function in APL,[15] )VARS shows user variable names existing in the current workspace.

There are also system functions available to users for saving the current workspace e.g., )SAVE and terminating the APL environment, e.g., )OFF - sometimes called hook commands or functions due to the use of a leading right parenthesis or hook.[16] There is some standardization of these quad and hook functions.

Fonts

[edit]

The Unicode Basic Multilingual Plane includes the APL symbols in the Miscellaneous Technical block,[17] which are thus usually rendered accurately from the larger Unicode fonts installed with most modern operating systems. These fonts are rarely designed by typographers familiar with APL glyphs. So, while accurate, the glyphs may look unfamiliar to APL programmers or be difficult to distinguish from one another.

Some Unicode fonts have been designed to display APL well: APLX Upright, APL385 Unicode, and SimPL.

Before Unicode, APL interpreters were supplied with fonts in which APL characters were mapped to less commonly used positions in the ASCII character sets, usually in the upper 128 code points. These mappings (and their national variations) were sometimes unique to each APL vendor's interpreter, which made the display of APL programs on the Web, in text files and manuals - frequently problematic.

APL2 keyboard function to symbol mapping

[edit]
APL2 Keyboard
APL2 Keyboard

Note the APL On/Off Key - topmost-rightmost key, just below. Also note the keyboard had some 55 unique (68 listed per tables above, including comparative symbols but several symbols appear in both monadic and dyadic tables) APL symbol keys (55 APL functions (operators) are listed in IBM's 5110 APL Reference Manual), thus with the use of alt, shift and ctrl keys - it would theoretically have allowed a maximum of some 59 (keys) *4 (with 2-key pressing) *3 (with tri-key pressing, e.g., ctrl-alt-del) or some 472 different maximum key combinations, approaching the 512 EBCDIC character max (256 chars times 2 codes for each keys-combination). Again, in theory the keyboard pictured here would have allowed for about 472 different APL symbols/functions to be keyboard-input, actively used. In practice, early versions were only using something roughly equivalent to 55 APL special symbols (excluding letters, numbers, punctuation, etc. keys). Thus, early APL was then only using about 11% (55/472) of a symbolic language's at-that-time utilization potential, based on keyboard # keys limits, again excluding numbers, letters, punctuation, etc. In another sense keyboard symbols utilization was closer to 100%, highly efficient, since EBCDIC only allowed 256 distinct chars, and ASCII only 128.


Non-uniform rational B-spline

[edit]
A NURBS curve. (See also: the animated creation of a NURBS spline.)
Green-shaded NURBS surface
A NURBS surface

Non-uniform rational basis spline (NURBS) is a mathematical model using basis splines (B-splines) that is commonly used in computer graphics for representing curves and surfaces. It offers great flexibility and precision for handling both analytic (defined by common mathematical formulae) and modeled shapes. It is a type of curve modeling, as opposed to polygonal modeling or digital sculpting. NURBS curves are commonly used in computer-aided design (CAD), manufacturing (CAM), and engineering (CAE). They are part of numerous industry-wide standards, such as IGES, STEP, ACIS, and PHIGS. Tools for creating and editing NURBS surfaces are found in various 3D graphics, rendering,[18] and animation software packages.

They can be efficiently handled by computer programs yet allow for easy human interaction. NURBS surfaces are functions of two parameters mapping to a surface in three-dimensional space. The shape of the surface is determined by control points. In a compact form, NURBS surfaces can represent simple geometrical shapes. For complex organic shapes, T-splines and subdivision surfaces are more suitable because they halve the number of control points in comparison with the NURBS surfaces.

In general, editing NURBS curves and surfaces is intuitive and predictable.[citation needed] Control points are always either connected directly to the curve or surface, or else act as if they were connected by a rubber band. Depending on the type of user interface, the editing of NURBS curves and surfaces can be via their control points (similar to Bézier curves) or via higher level tools such as spline modeling and hierarchical editing.

History

[edit]
A flat spline, the physical namesake of the mathematical spline. Here the spline is held in place by pins rather than ducks.

Before computers, designs were drawn by hand on paper with various drafting tools. Rulers were used for straight lines, compasses for circles, and protractors for angles. But many shapes, such as the freeform curve of a ship's bow, could not be drawn with these tools.

Although such curves could be drawn freehand at the drafting board, shipbuilders often needed a life-size version which could not be done by hand. Such large drawings were done with the help of flexible strips of wood, called splines. The splines were held in place at a number of predetermined points, by lead "ducks", named for the bill-shaped protrusion that the splines rested against. Between the ducks, the elasticity of the spline material caused the strip to take the shape that minimized the energy of bending, thus creating the smoothest possible shape that fit the constraints. The shape could be adjusted by moving the ducks.[19][20]

In 1946, mathematicians started studying the spline shape, and derived the piecewise polynomial formula known as the spline curve or spline function. I. J. Schoenberg gave the spline function its name after its resemblance to the mechanical spline used by draftsmen.[21]

As computers were introduced into the design process, the physical properties of such splines were investigated so that they could be modelled with mathematical precision and reproduced where needed. Pioneering work was done in France by Renault engineer Pierre Bézier, and Citroën's physicist and mathematician Paul de Casteljau. They worked nearly parallel to each other, but because Bézier published the results of his work, Bézier curves were named after him, while de Casteljau's name is only associated with related algorithms.

NURBS were initially used only in the proprietary CAD packages of car companies. Later they became part of standard computer graphics packages.

Real-time, interactive rendering of NURBS curves and surfaces was first made commercially available on Silicon Graphics workstations in 1989. In 1993, the first interactive NURBS modeller for PCs, called NöRBS, was developed by CAS Berlin, a small startup company cooperating with Technische Universität Berlin.[citation needed]

General definition

[edit]

[22] [23] [24]

A NURBS curve is defined by its order, a set of weighted control points, and a knot vector. NURBS curves and surfaces are generalizations of both B-splines and Bézier curves and surfaces, the primary difference being the weighting of the control points, which makes NURBS curves rational.

Order

[edit]

The order of a NURBS curve defines the number of nearby control points that influence any given point on the curve. The curve is represented mathematically by a polynomial of degree one less than the order of the curve. Hence, second-order curves (which are represented by linear polynomials) are called linear curves, third-order curves are called quadratic curves, and fourth-order curves are called cubic curves. A curve of order must have at least control points.

Control points

[edit]

The control points determine the shape of the curve.



Knots

[edit]

In order to define a NURBS curve with points and order , the parameter interval must be partitioned into at most pieces. For computational purposes, this partition is represented as a monotone increasing series of values in the parameter interval, called the knot vector. Each value in the knot vector is called a knot, and the lengths of interval between each knot are called knot spans. The number of knot spans corresponds to the number of individual pieces of the resulting NURBS curve.

A knot that appears a certain number of times can be termed a knot with that multiplicity. A knot with multiplicity two can thus be called a double knot, and a knot with multiplicity three a triple knot. Due to the monotone nature of the knot vector, identical knots are consecutive.

The knot vector is then used to generate the basis functions. It typically begins and ends with a knot of multiplicity equal to the order of the curve. Due to the properties of the basis functions, this ensures that all curve pieces are formed from polynomials of the same degree.


Basis functions

[edit]
From top to bottom: Linear basis functions (blue) and (green) (top), their weight functions and (middle) and the resulting quadratic basis function (bottom). The knots are 0, 1, 2, and 2.5

The B-spline basis functions used in the construction of NURBS curves are constructed from the knot vector. These are usually denoted by , where corresponds to the -th control point, and corresponds with the degree of the basis function. The parameter dependence is frequently left out, so they can be written as .

The basis functions are defined recursively, such that and where is the th knot in the knot vector. Effectively, is equal to a piecewise function formed from degree polynomials, produced by a linear interpolation between and between the -th and -th knots.


The linear and quadratic basic functions produced by the knot vector . The single short knot span, shared by the black and purple linear functions, narrows the space in which the black quadratic function must turn, sharpening the peak. If was set to , to reduce the span to zero and form a double knot, the black quadratic would form a discontinuous peak at .

General form of a NURBS curve

[edit]

Using the definitions of the basis functions from the previous paragraph, a NURBS curve takes the following form:[24]

In this, is the number of control points and are the corresponding weights. The denominator is a normalizing factor that evaluates to one if all weights are one.

By absorbing the denominator into the sum over the numerator, an equivalent form can be found, in which the functions are known as the rational basis functions.

General form of a NURBS surface

[edit]
Three-dimensional NURBS surfaces can have complex, organic shapes. Control points influence the directions the surface takes. A separate square below the control cage delineates the X and Y extents of the surface.


A NURBS surface is obtained as the tensor product of two NURBS curves, thus using two independent parameters and (with indices and respectively):[24] with as rational basis functions.


Comparison to other parametric curves

[edit]

(Non-rational, aka simple, B-splines are a special case/subset of rational B-splines, where each control point is a regular non-homogenous coordinate [no 'w'] rather than a homogeneous coordinate.[25] That is equivalent to having weight "1" at each control point; Rational B-splines use the 'w' of each control point as a weight.[26])

Properties

[edit]

Note that within the interval the polynomial nature of the basis functions and the linearity of the construction make the curve perfectly smooth, so it is only at the knots that discontinuity can arise.

In many applications the fact that a single control point only influences those intervals where it is active is a highly desirable property, known as local support. In modeling, it allows the changing of one part of a surface while keeping other parts unchanged.

Again by induction, it can be proved that the sum of the basis functions for a particular value of the parameter is unity. This is known as the partition of unity property of the basis functions.

The functions and are positive when the corresponding lower order basis functions are non-zero. By induction on n it follows that the basis functions are non-negative for all values of and . This makes the computation of the basis functions numerically stable.


Continuity

[edit]

A surface under construction, e.g. the hull of a motor yacht, is usually composed of several NURBS surfaces known as NURBS patches (or just patches). These surface patches should be fitted together in such a way that the boundaries are invisible. This is mathematically expressed by the concept of geometric continuity.

Higher-level tools exist that benefit from the ability of NURBS to create and establish geometric continuity of different levels:

  • Positional continuity (G0) holds whenever the end positions of two curves or surfaces coincide. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge and causing broken highlights.
  • Tangential continuity (G¹) requires the end vectors of the curves or surfaces to be parallel and pointing the same way, ruling out sharp edges. Because highlights falling on a tangentially continuous edge are always continuous and thus look natural, this level of continuity can often be sufficient.
  • Curvature continuity (G²) further requires the end vectors to be of the same length and rate of length change. Highlights falling on a curvature-continuous edge do not display any change, causing the two surfaces to appear as one. This can be visually recognized as "perfectly smooth". This level of continuity is very useful in the creation of models that require many bi-cubic patches composing one continuous surface.

Geometric continuity mainly refers to the shape of the resulting surface; since NURBS surfaces are functions, it is also possible to discuss the derivatives of the surface with respect to the parameters. This is known as parametric continuity. Parametric continuity of a given degree implies geometric continuity of that degree.

First- and second-level parametric continuity (C0 and C¹) are for practical purposes identical to positional and tangential (G0 and G¹) continuity. Third-level parametric continuity (C²), however, differs from curvature continuity in that its parameterization is also continuous. In practice, C² continuity is easier to achieve if uniform B-splines are used.

The definition of Cn continuity requires that the nth derivative of adjacent curves/surfaces () are equal at a joint.[27] Note that the (partial) derivatives of curves and surfaces are vectors that have a direction and a magnitude; both should be equal.

Highlights and reflections can reveal the perfect smoothing, which is otherwise practically impossible to achieve without NURBS surfaces that have at least G² continuity. This same principle is used as one of the surface evaluation methods whereby a ray-traced or reflection-mapped image of a surface with white stripes reflecting on it will show even the smallest deviations on a surface or set of surfaces. This method is derived from car prototyping wherein surface quality is inspected by checking the quality of reflections of a neon-light ceiling on the car surface. This method is also known as "Zebra analysis".


Applications

[edit]

NURBS curves and surfaces are useful for a number of reasons:

  • The set of NURBS for a given order is invariant under affine transformations:[28] operations like rotations and translations can be applied to NURBS curves and surfaces by applying them to their control points.
  • They offer one common mathematical form for both standard analytical shapes (e.g., conics) and free-form shapes.
  • They provide the flexibility to design a large variety of shapes.
  • They reduce the memory consumption when storing shapes (compared to simpler methods).
  • They can be evaluated reasonably quickly by numerically stable and accurate algorithms.

In practice, cubic curves are the ones most commonly used. Fifth- and sixth-order curves are sometimes useful, especially for obtaining continuous higher order derivatives, but curves of higher orders are practically never used because they lead to internal numerical problems and tend to require disproportionately large calculation times.

Manipulating NURBS objects

[edit]
Motoryacht design using NURBS surfaces

A number of transformations can be applied to a NURBS object. For instance, if some curve is defined using a certain degree and N control points, the same curve can be expressed using the same degree and N+1 control points. In the process a number of control points change position and a knot is inserted in the knot vector. These manipulations are used extensively during interactive design. When adding a control point, the shape of the curve should stay the same, forming the starting point for further adjustments. A number of these operations are discussed below.[24][29]

Knot insertion

[edit]

As the term suggests, knot insertion inserts a knot into the knot vector. If the degree of the curve is , then control points are replaced by new ones. The shape of the curve stays the same.

A knot can be inserted multiple times, up to the maximum multiplicity of the knot. This is sometimes referred to as knot refinement and can be achieved by an algorithm that is more efficient than repeated knot insertion.

Knot removal

[edit]

Knot removal is the reverse of knot insertion. Its purpose is to remove knots and the associated control points in order to get a more compact representation. Obviously, this is not always possible while retaining the exact shape of the curve. In practice, a tolerance in the accuracy is used to determine whether a knot can be removed. The process is used to clean up after an interactive session in which control points may have been added manually, or after importing a curve from a different representation, where a straightforward conversion process leads to redundant control points.

Degree elevation

[edit]

A NURBS curve of a particular degree can always be represented by a NURBS curve of higher degree. This is frequently used when combining separate NURBS curves, e.g., when creating a NURBS surface interpolating between a set of NURBS curves or when unifying adjacent curves. In the process, the different curves should be brought to the same degree, usually the maximum degree of the set of curves. The process is known as degree elevation.

Curvature

[edit]

The most important property in differential geometry is the curvature . It describes the local properties (edges, corners, etc.) and relations between the first and second derivative, and thus, the precise curve shape. Having determined the derivatives it is easy to compute or approximated as the arclength from the second derivative . The direct computation of the curvature with these equations is the big advantage of parameterized curves against their polygonal representations.

Example: a circle

[edit]
NURBS have the ability to exactly describe circles. Here, the black triangle is the control polygon of a NURBS curve (shown at w=1). The Blue dotted line shows the corresponding control polygon of a B-spline curve in 3D homogeneous coordinates, formed by multiplying the NURBS by the control points by the corresponding weights. The blue parabolas are the corresponding B-spline curve in 3D, consisting of three parabolas. By choosing the NURBS control points and weights, the parabolas are parallel to the opposite face of the gray cone (with its tip at the 3D origin), so dividing by w to project the parabolas onto the w=1 plane results in circular arcs (red circle; see conic section).

Non-rational splines or Bézier curves may approximate a circle, but they cannot represent it exactly. Rational splines can represent any conic section—including the circle—exactly. This representation is not unique, but one possibility appears below:

x y z Weight
1 0 0 1
1 1 0
0 1 0 1
-1 1 0
-1 0 0 1
-1 -1 0
0 -1 0 1
1 -1 0
1 0 0 1

The order is three, since a circle is a quadratic curve and the spline's order is one more than the degree of its piecewise polynomial segments. The knot vector is . The circle is composed of four quarter circles, tied together with double knots. Although double knots in a third order NURBS curve would normally result in loss of continuity in the first derivative, the control points are positioned in such a way that the first derivative is continuous. In fact, the curve is infinitely differentiable everywhere, as it must be if it exactly represents a circle.

The curve represents a circle exactly, but it is not exactly parametrized in the circle's arc length. This means, for example, that the point at does not lie at (except for the start, middle and end point of each quarter circle, since the representation is symmetrical). This would be impossible, since the x coordinate of the circle would provide an exact rational polynomial expression for , which is impossible. The circle does make one full revolution as its parameter goes from 0 to , but this is only because the knot vector was arbitrarily chosen as multiples of .

Genaille–Lucas rulers

[edit]
A complete set of Genaille–Lucas rulers, including an additional index rod.

Genaille–Lucas rulers (also known as Genaille–Lucas rods) are an arithmetic tool invented by Henri Genaille, a French railway engineer, in the 1880s, in collaboration with French mathematician Édouard Lucas. The device is a variant of Napier's bones. By representing the carry graphically, the user can read off the results of simple multiplication problems directly, with no intermediate mental calculations.[30]

Design

[edit]
A view of the cells corresponding to two times three and four. As the carry in increases in the table for two times four, the units roll over and the position of the tens triangle increases by a place.

A full set of Genaille–Lucas rulers consists of ten strips, one for each decimal digit. On each strip is printed a column of triangles and a column of digits, divided into nine cells, also corresponding to the decimal digits. The digits in each cell are the values in the units place of the product of the cell's digit and the ruler's digit, after adding the tens value carried over from the previous partial multiplication.

The triangles in each cell then encode the tens place of the result. This is in contrast to a set of Napier's bones, where the tens place of each partial result is given by a second digit.

Multiplication

[edit]

By arranging the rulers in the proper order, the user can find unit multiples of short natural numbers by sight.

Division

[edit]
Genaille–Lucas rulers for division use lines to indicate remainders, rather than triangles to indicate carries.

Soon after their development by Genaille, the rulers were adapted to a set of rods that can perform division. The division rods are aligned similarly to the multiplication rods, with the index rod on the left denoting the divisor, and the following rods spelling out the digits of the dividend. After these, a special "remainder" rod is placed on the right. The quotient is read from left to right, following the lines from one rod to the next. The path of digits ends with a number on the remainder rod, which is the remainder given by the division.

History

[edit]

The rods were presented to the Association française pour l’avancement des sciences by Genaille and Lucas in 1884 and 1885, building on earlier work by Genaille first presented in 1878.[30]

[31]

[32]

[33]

[34]

Genaille–Lucas rulers for multiplication were developed independently by Carl Schönbichler, and published in the Leipziger Illustrierte Zeitung in June 1850. Schönbichler's design printed the rulers onto parallel strips of paper with a common binding. The strips in each gathering were of different lengths, and numbered at the ends, so that they could be selected in a manner similar to tabbed index cards. Whether Schönbichler's invention was ever known to Genaille is not known.[35]


References

[edit]
  1. ^ Iverson, Kenneth E. (1962-01-01). "A programming language". Proceedings of the May 1-3, 1962, spring joint computer conference on - AIEE-IRE '62 (Spring). New York, NY, USA: ACM. pp. 345–351. doi:10.1145/1460833.1460872. S2CID 11777029.
  2. ^ Baronet, Dan. "Sharp APL Operators". archive.vector.org.uk. Vector - Journal of the British APL Association. Retrieved 13 January 2015.
  3. ^ MicroAPL. "Primitive Operators". www.microapl.co.uk. MicroAPL. Retrieved 13 January 2015.
  4. ^ MicroAPL. "Operators". www.microapl.co.uk. MicroAPL. Retrieved 13 January 2015.
  5. ^ Progopedia. "APL". progopedia.com. Progopedia. Retrieved 13 January 2015.
  6. ^ Dyalog. "D-functions and operators loosely grouped into categories". dfns.dyalog.com. Dyalog. Retrieved 13 January 2015.
  7. ^ IBM. "IBM 5100 APL Reference Manual" (PDF). bitsavers.trailing-edge.com. IBM. Archived from the original (PDF) on 14 January 2015. Retrieved 14 January 2015.
  8. ^ Brown, Jim (1978). "In defense of index origin 0". ACM SIGAPL APL Quote Quad. 9 (2): 7. doi:10.1145/586050.586053. S2CID 40187000.
  9. ^ MicroAPL. "APLX Language Manual" (PDF). www.microapl.co.uk. MicroAPL - Version 5 .0 June 2009. p. 22. Retrieved 31 January 2015.
  10. ^ Benkard, J. Philip (1992). "Nested arrays and operators: Some issues in depth". Proceedings of the international conference on APL - APL '92. Vol. 23. pp. 7–21. doi:10.1145/144045.144065. ISBN 978-0897914772. S2CID 7760410. {{cite book}}: |journal= ignored (help)
  11. ^ Berry, Paul "APL\360 Primer Student Text", IBM Research, Thomas J. Watson Research Center, 1969.
  12. ^ "Treatise" (PDF). www.cs.utexas.edu. Retrieved 2019-09-10.
  13. ^ Cason, Stan (13 May 2006). "APL2 Idioms Library". www-01.ibm.com. IBM. Retrieved 1 February 2015.
  14. ^ APL's "high minus" applies to the single number that follows, while the monadic minus function changes the sign of the entire array to its right.
  15. ^ "The Workspace - System Functions". Microapl.co.uk. p. (toward bottom of the web page). Retrieved 2018-11-05.
  16. ^ "APL language reference" (PDF). Retrieved 2018-11-05.
  17. ^ Unicode chart "Miscellaneous Technical (including APL)" (PDF).
  18. ^ "Why KeyShot became the most popular product rendering software". 3 October 2022.
  19. ^ Schneider, Philip. "NURB Curves: A Guide for the Uninitiated". MACTECH. Retrieved 26 September 2014.
  20. ^ Schneider, Philip (March 1996). "NURB Curves: A Guide for the Uninitiated" (PDF). develop (25): 48–74.
  21. ^ Schoenberg, I. J. (August 19, 1964). "Spline Functions and the Problem of Graduation". Proceedings of the National Academy of Sciences of the United States of America. 52 (4). National Academy of Sciences: 947–950. Bibcode:1964PNAS...52..947S. doi:10.1073/pnas.52.4.947. PMC 300377. PMID 16591233.
  22. ^ Gershenfeld, Neil (1999). The Nature of Mathematical Modeling. Cambridge University Press. p. 141. ISBN 0-521-57095-6.
  23. ^ Bio-Inspired Self-Organizing Robotic Systems. p. 9. Retrieved 2014-01-06.
  24. ^ a b c d Piegl, Les; Tiller, Wayne (1997). The NURBS Book (2. ed.). Berlin: Springer. ISBN 3-540-61545-8.
  25. ^ "Rational B-splines". www.cl.cam.ac.uk.
  26. ^ "NURBS: Definition". www.cs.mtu.edu.
  27. ^ Foley, van Dam, Feiner & Hughes: Computer Graphics: Principles and Practice, section 11.2, Addison-Wesley 1996 (2nd ed.).
  28. ^ David F. Rogers: An Introduction to NURBS with Historical Perspective, section 7.1
  29. ^ Piegl, L. (1989). "Modifying the shape of rational B-splines. Part 1: curves". Computer-Aided Design. 21 (8): 509–518. doi:10.1016/0010-4485(89)90059-6.
  30. ^ a b Roegel, Denis (2021-03-17) [2015-05-20]. "Napier's bones and Genaille-Lucas's rods" (PDF). LOCOMAT: The LORIA Collection of Mathematical Tables. pp. 12–30. Archived (PDF) from the original on 2024-07-01. Retrieved 2024-07-03.
  31. ^ Genaille (1879) [Session on 1878-08-29]. Sur une nouvelle machine a calculer. Congrès de l'Association française pour l'avancement des sciences, 7e session, Paris (in French). Secrétariat de l'Association française pour l'avancement des sciences. pp. 181–182.
  32. ^ Genaille, Henri (1884) [Session on 1883-08-29]. Machine a calculer. Congrès de l'Association française pour l'avancement des sciences, 12e session, Rouen (in French). Secrétariat de l'Association française pour l'avancement des sciences. pp. 177–178.
  33. ^ Lucas, Édouard (1885) [1884-09-08]. Le calcul et les machines a calculer. Congrès de l'Association française pour l'avancement des sciences, 13e session, Blois (in French). Secrétariat de l'Association française pour l'avancement des sciences. pp. 139–140.
  34. ^ "Les appareils a calculs exacts et instantanés pour simplifier la multiplication et la division, inventés par M. Henri Genaille, et perfectionnés par M. Edouard Lucas" (PDF). Nouvelles Annales de Mathématiques. 3. 4: 516–519 (8–11 in cited extract). 1885. ISSN 1764-7908. Archived from the original (PDF) on 2024-09-09.
  35. ^ Weiss, Stephan (2004). "Die Multiplizierstäbe von Genaille und Lucas" (PDF) (in German). Archived from the original (PDF) on 2024-04-18. Retrieved 2024-07-14.