bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Performance problem with simple program


From: Peter Teeson
Subject: Re: [Bug-apl] Performance problem with simple program
Date: Wed, 07 Oct 2015 11:15:20 -0400

Of course this was in the context of Jay’s comment on Elias’ APL.
So in that specific case Jay suggested:
(⍳N)⍪[1.5]+\+⌿10 10 10⊤⍳N←400
and then modified it, suggesting ((1+⌊10⍟N)⍴10) to become
(⍳N)⍪[1.5]+\+⌿((1+⌊10⍟N)⍴10)⊤⍳N←400
But this produces the same result:
(⍳N)⍪[1.5]+\+⌿((⌈10⍟N)⍴10)⊤⍳N←400

with 2 less symbols in this case… 
(Meh… APL one liners…..) ;}

On Oct 7, 2015, at 10:30 AM, Juergen Sauermann <address@hidden> wrote:

Hi Peter,

I guess when
L⍟(|R)+R=0 is integer then ⌈ and ⌊ would be the same
and then the  1+⌊ is different from ⌈.

/// Jürgen


On 10/07/2015 04:19 PM, Peter Teeson wrote:
Re: encode
((1+⌊10⍟N)⍴10)⊤...
I was wondering why the APL Lang Ref Manual p.161 shows:
⌊1+L⍟(|R)+R=0

Why would this not be just as correct?
⌈L⍟(|R)+R=0

and so 
((⌈10⍟N)⍴10)⊤...
two symbols less……..<grin>









reply via email to

[Prev in Thread] Current Thread [Next in Thread]