[Jprogramming] choosing between alternates (iif, ifelse)
R.E. Boss
r.e.boss at planet.nl
Sat Dec 24 01:58:45 HKT 2011
$(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: programming-bounces at jsoftware.com [mailto:programming-
> bounces at jsoftware.com] 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
More information about the Programming
mailing list