$(567{.c){b,:a
567 1000000
so
($ c{b,:a) = (c ,&$ a) = ,~ 1e6
and this is much more than your (or mine) hardware can contain.
R.E. Boss
> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens Björn Helgason
> Verzonden: vrijdag 23 december 2011 17:40
> Aan: Programming forum
> Onderwerp: Re: [Jprogramming] choosing between alternates (iif, ifelse)
>
> For fun I was going to test this here and reached a limit
>
> a=: 1e6 ?@$ 0
> b=: 1e6 ?@$ 0
> c=: 1e6 ?@$ 2
> 10 ts 'c}b,:a' NB. ben0
> 0.0874738 4.19441e7
> 10 ts 'c,&.>i.#c{b,:a'
> |limit error: ts
> | c,&.>i.#c {b,:a
>
> It did work with the initial problem
>
> a=: 10 20 30
> b=: 1 2 3
> c=: 1 0 1
>
> 10 ts 'c,&.>i.#c{b,:a'
> 9.0654e_6 3904
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm