APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !


Postby Roger|Dyalog on Tue Mar 02, 2021 7:34 pm

The innocent looking function ⍺*⍵ embodies an achievement of human intellect realized through millennia of evolution and refinement. The Wikipedia entry on Exponentiation [Wikipedia 2021] gives a brief summary.

The ancient Greeks worked with ⍺*2 (they did not use this notation, of course, not having Unicode APL characters), including using x²-2=0 to prove that irrational numbers exist. ⍺*2 and ⍺*3 were also known to Persian mathematicians.

In the late 16th century, the notation x with superscript Roman numerals was used. Also in the 16th century, the terms square (⍺*2), cube (⍺*3), zenzizenzic (⍺*4), sursolid (⍺*5), zenicube (⍺*6), second sursolid (⍺*7), and zenzizenzizenzic (⍺*8) were used. I believe these came from viewing ⍺*⍵ not as a dyadic function but as a series of monadic functions, in current APL notation (*∘k)⍺. The terminology (and notation) bring to mind a quote from C.F. Gauss:
If one formerly contemplated [imaginary numbers] from a false point of view and therefore found a mysterious darkness, this is in large part attributable to clumsy terminology. Had one not called +1, −1, √−1 positive, negative, or imaginary (or even impossible) units, but instead, say, direct, inverse, or lateral units, then there could scarcely have been talk of such darkness.
— C.F. Gauss [Gauss 1831, p.638], translated in [Ewald 1996, p.313]

Even Isaac Newton preferred to use exponents only for powers greater than 2, writing squares as repeated multiplication. Thus: ax+bxx+cx³+d.

As with much else in mathematics, in 1748 Leonhard Euler provided a key insight:
consider exponentials or powers in which the exponent itself is a variable

(That is, ⍺*⍵ as a dyadic function.)

With better understanding of complex numbers (themselves invented/discovered by consideration of roots of polynomials, for example x²+1=0) and applying the key ideas of closure and extension, we have the modern understanding of ⍺*⍵ ←→ *⍵×⍟⍺.

Finally, Iverson rationalized the notation to ⍺*⍵ [Iverson 1966, pp.45-46; Falkoff and Iverson 1967], with the infix notation and operating on entire arrays. Among other things, this makes possible a more convenient notation */⍵ for the power tower.

There remains pitfalls for the unwary. In APL, in 1981 with the implementation of complex numbers, the result of ¯8*÷3 was changed from ¯2 to 1j1.73205 [Hui and Kromberg 2020, §10.3]. Why? 1j1.73205 is the principal cube root of ¯8 and also that ⍺*⍵ ←→ *⍵×⍟⍺. Another pitfall is thinking that 0*0 is indeterminate or somehow problematic. As recently as 1992, Donald Knuth evangelized for 1=0*0 [Knuth 1992]. Some authors write power series as Σai×x*i (i from 0) while arguing that 0*0 is not 1. Other authors, aware of the issue, write power series as a0 + Σai×x*i (i from 1) to avoid the "problem" (that is, the equivalent of writing 1++/(⍵*i)÷i←1+!⍳n instead of +/(⍵*i)÷!i←⍳n for the power series for exp(⍵)).

In a stroke of genius, Iverson also defined ⍣ as the power operator [Iverson 1978]. The power operator plays a role in computability theory similar to that played by the power set in set theory [Hui and Kromberg 2020, §11.6].


Posts: 232
Joined: Thu Jul 28, 2011 10:53 am

Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest