Thank you
On Tue, May 16, 2017 at 6:48 PM, David Mitchell
wrote:
> It ran in J64-804
>
>
> On 5/16/2017 18:09, Jose Mario Quintana wrote:
>
>> 0. Wicked Crash in JQt805/806
>>
>> Cloak=. ((5!:1)@:<'Cloak')Cloak=. (0:`)(,^:)
>> 'evoke fix amper'=. <@:Cloak "0@:;: '`: f. &'
>> train=.
It ran in J64-804
On 5/16/2017 18:09, Jose Mario Quintana wrote:
0. Wicked Crash in JQt805/806
Cloak=. ((5!:1)@:<'Cloak')Cloak=. (0:`)(,^:)
'evoke fix amper'=. <@:Cloak "0@:;: '`: f. &'
train=. evoke&6 f.
an=. <@:((,'0') ,&< ])
indet=. '' ($ ,) 128!:5 NB. Is Indeterminate
0. Wicked Crash in JQt805/806
Cloak=. ((5!:1)@:<'Cloak')Cloak=. (0:`)(,^:)
'evoke fix amper'=. <@:Cloak "0@:;: '`: f. &'
train=. evoke&6 f.
an=. <@:((,'0') ,&< ])
indet=. '' ($ ,) 128!:5 NB. Is Indeterminate?
eval=. {. train@:, an@:((train :: ])&.>)@:}.
body=. ([ amper >@:{
I suspect /\. beats /\ because \ does not have special code taking
advantage of m&|@* being commutative.
--
Raul
On Tue, May 16, 2017 at 12:51 PM, 'Mike Day' via Programming
wrote:
> Yep - a blocky approach addresses the virtues of a vector approach and
>
> minimises the hit with extended. Cou
Yep - a blocky approach addresses the virtues of a vector approach and
minimises the hit with extended. Could fine tune it but why bother!?
I quite often end up using blocks in this sort of fashion, though
overlooked
it here.
Note to self, though - must look into why /\. with reverse is bet
Oops, it's obvious why that version was bulkier.
That said, this is much slower, for little advantage:
timespacex'|. 281474976710656&|@*/&.x:\.1+2*i.-2^12'
8.45755 1.08915e6
I'll stick with my genseries proposal, I think.
Thanks,
--
Raul
On Tue, May 16, 2017 at 12:04 PM, Raul Miller wr
Oops, need x: instead of <.
|. 281474976710656&|@*/\.x:1+2*i.-2^24
Sorry about that, was using <. earlier to test whether that fixed the
overflow issue (it does not), and grabbed that instance for this
variant.
This is bulkier, though, just like your */\ version:
timespacex'|. 2814749767
It would be nice if it worked.
Unfortunately (again!), for the actual size required,
timer'_10{. |. 281474976710656&|@*/\.<.1+2*i.-2^24'
+--+---+
|32.001|0 0 0 0 0 0 0 0 0 0|
+--+---+
whereas the correct values are all > 0
This is why I needed specia
timespacex'|. 281474976710656&|@*/\.<.1+2*i.-2^12'
0.00096 331904
(281474976710656&|@*/\x:1+2*i.2^5) -: |. 281474976710656&|@*/\.<.1+2*i.-2^5
1
I hope this helps,
--
Raul
On Tue, May 16, 2017 at 10:31 AM, 'Mike Day' via Programming
wrote:
> Thanks again, Raul.
>
> Well - I'd actually m
Thanks again, Raul.
Well - I'd actually meant ~2^24 odd numbers, 1... _1+2^25 - trust me
to make a mistake in trying to simplify the presentation! Let's call it
a typo.
I don't think my post was a spoiler, as the problem needs quite a bit
of insight elsewhere; this array helps in getting t
We are about to release Jd 4.1, a major Jd update.
Details have been provided in the database forum.
--
For information about J forums see http://www.jsoftware.com/forums.htm
Forgive me for asking, but isn't 33554431 = _1+2^25 ?
Anyway, this seems to work for me:
281474976710656&|@*/x:1+2*i.2^23
I'll leave out the answer, out of respect for project euler (though
maybe the rules allow that now?).
timespacex'281474976710656&|@*/x:1+2*i.2^23'
12.457 1.67937e9
..
Further info. I did solve the problem (Euler Project no 592).
It needed the cumulative product of 2^23 odd numbers , 1 3 5
...33554431, modulo 2^48
This verb works, but is pretty slow on my laptop, taking 5 to 6 minutes:
cumoddprod =: 3 : 0
1 cumoddprod y
:
'lo hi' =. y
nc =. lo (>:@<.@-
13 matches
Mail list logo