Hi Blake,
thanks. Negative powers build on the concept of an "inverse function".
In GNU APL some of the primitives have inverse functions (+/- ×/÷, ⋆/⍟
and ○).
But these inverse functions have rather strange effects, for example:
2 (+ ⍣ 40) 5
85
2 (- ⍣ ¯40) 5
85
2 (+ ⍣ ¯40) 5
5
2 (- ⍣ ¯40) 5
85
In the context of APL operators (+\ in the Dyalog example), the
determination of the
inverse function can get very complicated and is undefined in most
cases. Given
that I will no go down too far on the road to inverse functions.
When I read about the power operator for the first time (around GNU APL
1.2 or so),
it was the concept of inverse functions that made me think of ⍣ as a
broken operator.
/// Jürgen
On 08/13/2014 01:53 AM, Blake McBride wrote:
Trying some of the examples in the Dyalog book I found the following:
Dialog book:
(+\ ⍣ ̄¯1) 3 4 9 15 19
3 1 5 6 4
GNU APL:
(+\ ⍣ ¯1) 3 4 9 15 19
DOMAIN ERROR
(+\⍣¯1)3 4 9 15 19
^ ^
/Blake McBride/
/
/
www.arahant.com <http://www.arahant.com/>
Cell: 615-394-6760
Office: 615-376-5500
Fax: 615-377-6006
On Tue, Aug 12, 2014 at 12:32 PM, Juergen Sauermann
<juergen.sauerm...@t-online.de <mailto:juergen.sauerm...@t-online.de>>
wrote:
Hi,
I have implemented the first shot at the power operator ⍣. SVN 434.
/// Jürgen