Random of zero

xbury.cs at clearstream.com xbury.cs at clearstream.com
Tue May 13 10:54:01 EDT 2003


Shari,

Consider that the function random(x)-1 = right result for any x < (2^64)-1 
(the integer limit of MC - I didn't test this limit lately though)...

Naturally if you assume 0 to be a number and/or part of your answer. 
Remember those problems with 0-255 = 256 values?

The proof I wrote the day this thread was first posted but I didn't post 
it since you probably already think im such a nuts... 

cheers
Xavier



---------------------=---------------------
Xavier Bury
TNS NT LAN Server
ext 6465




Shari <gypsyware at earthlink.net>
Sent by: metacard-admin at lists.runrev.com
13/05/03 14:18
Please respond to metacard

 
        To:     metacard at lists.runrev.com
        cc:     ^
        Subject:        RE: Random of zero



>It is clear that you read the MetaTalk entry for random, and 
>likewise it is clear that you chose to try to use the function 
>outside of its clearly documented scope.

The assumption that random(0) would obviously be 0 was made based on 
general principles.  Not on Metatalk itself.  I did not expect to 
have to look up what would seem to be a simple function.

It was not until the handler failed, and I discovered that random(0) 
consistently produces 1, that I looked it up in the reference docs to 
see if there was an explanation, and some way to fix it to produce 0 
as I intended it to.

I do not know in general mathematical principles, what result one 
would get from random(0).  But I would expect it to be 0.  My mistake 
for assuming.  (Unless of course, general math principles support my 
theory :-)

Any math gurus out there know?

:-)

Shari C
-- 
--Shareware Games for the Mac--
http://www.gypsyware.com
_______________________________________________
metacard mailing list
metacard at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard




Visit us at http://www.clearstream.com
                                                          
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this e-mail are those of the individual sender, except where the sender specifically states them to be the views of Clearstream International or of any of its affiliates or subsidiaries.

END OF DISCLAIMER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.runrev.com/pipermail/metacard/attachments/20030513/b912ab0b/attachment.htm


More information about the metacard mailing list