Hi Peter,
is seems like IBM APL2 computes
1 2 3 /¨ 4 5 6
as:
(1 2 3/4) (1 2
3/5) (1 2 3/6)
However, the ISO standard says
Z ← A f¨ B
Informal Description: The operand function f is
applied independently to correspondin
Hi,
The LCG used for roll may be fine for some casual uses, but I would really like
to see a higher quality RNG adopted here. Since speed may not be the main
concern here, employing the use of c++11 and preferably using the
std::mt19937_64 seems to be much better for any monte carlo type calc
On Tue, May 17, 2016 at 4:49 PM, Juergen Sauermann wrote:
> is seems like IBM APL2 computes
> 1 2 3 /¨ 4 5 6
> as:
> (1 2 3/4) (1 2 3/5) (1 2 3/6)
> However, the ISO standard says
> Z ← A f¨ B
(...)
The difference isn't in each operator, but in parsing / always as a monadic
operator (a
Hi Kacper,
yes. APL2 produces what you predicted.
I believe that the standard says little about how / and friends
shall be parsed.
In GNU APL a value left of / makes it a function at tokenization
time in order to
avoid testing at runtime.
Hi Xiao-Yong,
the reason is that ⎕RL is defined as a single integer in the ISO
standard.
That prevents generators with a too large state.
For somebody seriously into simulations a general purpose
generator
will never suffice, but it is fa
Hi,
> On May 17, 2016, at 12:06 PM, Juergen Sauermann
> wrote:
>
> Hi Xiao-Yong,
>
> the reason is that ⎕RL is defined as a single integer in the ISO standard.
> That prevents generators with a too large state.
Okay. I was thinking whether ⎕RL can be an integer vector. Even a combined
gene
Hi,
Dyalog also produces the same result as GNU APL:
1 2 3 /¨ 4 5 6
4 5 5 6 6 6
Juergen Sauermann writes:
> Hi Peter,
>
> is seems like IBM APL2 computes
> 1 2 3 /¨ 4 5 6
> as:
> (1 2 3/4) (1 2 3/5) (1 2 3/6)
>
> However, the ISO standard says
>
> Z ← A f¨ B
> Informal Descri
Hi Xiao-Yong,
I have fixed the redundant %, see SVN 728.
Regarding length, the GNU APL generator is 64-bit long (and so are
GNU APL integers), which should suffice for most purposes.
Regarding bit vectors in APL, most people use integer 0/1 vectors
for
hi,
in the result of "]help" I can see:
λ { ... } result
⍺ { ... } left value argument
⍵ { ... } right value argument
χ { ... } axis argument
⍶ { ... } left function argument
⍹ { ... } right function argument
can someone
They are for direct function (operator?) definitions. Try:
hook←{⍵⍶⍹⍵}
+hook÷2
2.5
> On May 17, 2016, at 8:24 PM, Christian Robert
> wrote:
>
> hi,
>
> in the result of "]help" I can see:
>
>
> λ { ... } result
> ⍺ { ... } left value argument
> ⍵
Sorry, no explanations given.
hook←{⍵⍶⍹⍵}
+hook÷2
2.5
hook←{⍵⍶⍹⍵⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵}
+hook÷2
2
DOMAIN ERROR
hook[1] λ←⍵ ⍶ ⍹ ⍵⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵
^^
please explain the principle to a newbie.
I really want a working examples.
Xtian.
On 2016-05-17
I'll give it a shot:
* foo ← {⍺ ⍶ ⍵}*
This defines foo as an operator that applies the function on its two
arguments.
I.e. in the following example:
* 10 +foo 20*
30
The foo operator simply applies + to 10 and 20, returning 30. In other
words, ⍶ is the function that goes to the left
I now understand, many thanks Elias.
will study this further but I understand the basic principle *with your
example*.
many thanks,
Xtian.
On 2016-05-17 22:56, Elias Mårtenson wrote:
I'll give it a shot:
* foo ← {⍺ ⍶ ⍵}*
This defines foo as an operator that applies the function on it
> On May 17, 2016, at 9:48 PM, Christian Robert
> wrote:
>
> Sorry, no explanations given.
>
> hook←{⍵⍶⍹⍵}
> +hook÷2
> 2.5
You can look at the definition
∇hook[⎕]∇
∇
[0] λ←(⍶ hook ⍹ ) ⍵
[1] λ←⍵⍶⍹⍵
∇
It’s a definition for an operator receiving two function arguments
With the explanations from Elias I can now see why ⊣⎕←⍵⊣⎕←⍶⊣⎕←⍹⊣⎕←⍵
is completely out of order. "Twilight Zone" says "you are obsolete", that apply
to me.
loved this small thread. very instructive.
Xtian.
On 2016-05-17 23:12, Xiao-Yong Jin wrote:
On May 17, 2016, at 9:48 PM, Christian Rober
Now pretty clear.
> It’s a definition for an operator receiving two function arguments ⍶ and ⍹,
for which you can not do ⎕←⍹ or ⎕←⍶. ...
many thanks.
Xtian.
On 2016-05-17 23:12, Xiao-Yong Jin wrote:
On May 17, 2016, at 9:48 PM, Christian Robert
wrote:
Sorry, no explanations given.
16 matches
Mail list logo