• Subject: Re: Random Number Generator
  • From: rob@xxxxxxxxx
  • Date: Tue, 7 Aug 2001 13:41:51 -0500


Leif,

1)  What is z.digit(6)?  I saw nothing for a parameter.  Or was
compute z = x * x
supposed to be
comput z = x * y

compute x = 12345 + hh * 3600 + ss * 60 + mm
is the same as
x = 12345 + (hh * 3600) + (ss * 60) + mm
lowest possible value would then be
01:01:01
x = 12345 + (01 * 3600) + (01 * 60) + 01
or 16006
then 16006 * 16006 = 256,192,036
highest possible value would then be
23:59:59
x = 12345 + (23 * 3600) + (59 * 60) + 59
or 98744
then 98744 * 98744 = 9,750,377,536

Basically though, time of day is not really generally accepted practice.
Frankly not enough randomness, and it tends to be stacked at time of most
use.

Rob Berendt

==================
A smart person learns from their mistakes,
but a wise person learns from OTHER peoples mistakes.


                                                                                
                                        
                    "Leif Svalgaard"                                            
                                        
                    <leif@leif.org>           To:     <MIDRANGE-L@midrange.com> 
                                        
                    Sent by:                  cc:                               
                                        
                    owner-midrange-l@mi       Subject:     Re: Random Number 
Generator                                  
                    drange.com                                                  
                                        
                                                                                
                                        
                                                                                
                                        
                    08/07/2001 01:07 PM                                         
                                        
                    Please respond to                                           
                                        
                    MIDRANGE-L                                                  
                                        
                                                                                
                                        
                                                                                
                                        




From: Debbie Panco <dpanco43@ix.netcom.com>

> Rob,
>   Nope, not looking for a random key to a file.  Just a way of assigning
> a random pin number to an individual/account.

get time of day hh:mm:ss
compute x = 12345 + hh * 3600 + ss * 60 + mm
compute z = x * x

this gives a ten-digit number z.
pin(1) = z.digit(6)
pin(2) = z.digit(4)
pin(3) = z.digit(5)
pin(4) = z.digit(7)




+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---




+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.