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 
> <[email protected]> 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