Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: A Rebol Challenge. The Monty Hall Puzzle IN 0 BYTES

From: joel:neely:fedex at: 18-Dec-2001 20:11

Hi, Ladislav, Ladislav Mecir wrote:
> But > > w: 100 loop w[w: w - random 2 / 3] > > is 34 bytes... >
> what should the (random 2 / 3) do? >
It returns a random real number bounded (on both sides ;-) by 0.666666666666667 The post was, of course, tongue-in-cheek. I was simply demonstrating a program that was so compact that all traces of reasoning about its behavior and correctness had long since evaporated. As to what (random 2 / 3) *should* do, as opposed to what it actually *does* do, we find the following: USAGE: RANDOM value /seed /secure /only DESCRIPTION: Returns a random value of the same datatype. RANDOM is an action value. ARGUMENTS: value -- Maximum value of result (Type: any) which might lead one to assume that (random 2 / 3) would yield a random decimal value between 0.0 and 0.66666... However, I've been vigorously scolded for believing that zero is a number and that consistency is a virtue, so I'll have to say simply that I have no officially publishable opinion on what it *should* do. ;-) -jn-