|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] Power Operator |
Date: | Thu, 14 Aug 2014 00:07:04 +0800 |
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 193 1 5 6 4
GNU APL:(+\ ⍣ ¯1) 3 4 9 15 19DOMAIN ERROR(+\⍣¯1)3 4 9 15 19^ ^
On Tue, Aug 12, 2014 at 12:32 PM, Juergen Sauermann <address@hidden> wrote:
Hi,
I have implemented the first shot at the power operator ⍣. SVN 434.
/// Jürgen
[Prev in Thread] | Current Thread | [Next in Thread] |