[Jprogramming] Dice rolls

Raul Miller rauldmiller at gmail.com
Tue Oct 11 19:37:12 HKT 2011


On Tue, Oct 11, 2011 at 7:28 AM, David Vaughan
<purpleblues13 at googlemail.com> wrote:
> Before you sent that, I was messing around with the power conjunction and came up with:
>
>   d1=. 1 2 3 4 5 6
>   (+/%#)7=,d1(+/)^:1 d1
> 0.166667
>
> Set n in ^:n to rolls-1.
>
> Which method, yours or mine do you think is the better one for speed and space?

I would test to find out (perhaps with somewhat larger numbers, for
measurement purposes).

I would expect that yours is slightly better for space and that mine
is slightly better for speed.  But I could easily be wrong

-- 
Raul


More information about the Programming mailing list