The following warnings occurred:
Warning [2] Undefined array key 129246 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 129247 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 129292 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 129351 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 129351 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 332 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





HP-41CX (or 41C/CV + Time module) challenge



#2

Here goes:

Write the best quality and fastest random number generator based on Time as the input (instead of a stored seed).


#3

Hi, Geir;

just a 'quick and dirty' proposal. I borrowed the 5 SQRT + from HP41 Randon Number Generation, kinda spectrum correction... if such a thing exists. (I'm somehow asleep, forgive my English, bitte...)

Here goes!

LBL”RAND”
TIME
1E3
*
FRC
SQRT (missing in first listing)
5
SQRT
+ (improves if replaced by *)
FRC
.END.
Can I borrow 2¢?

Cheers.

Luiz (Brazil... hope so!)


Edited: 7 Dec 2007, 2:19 p.m.


#4

...hmm

Not really random. Consecutive numbers are rising predictably until it flips over 1 and returns back to a low number only to start rising again.


#5

Hi, Geir;

The routine itself has a limited number of 'random numbers', and it actually repeats everytime the same 'time value' (T-seed, from now on) shows up. The TIME in the HP41 returns a 'hundreth-second' value, so I decided to use only the part of the T-seed with the seconds unit plus the hundreds. So, if you execute the routine consecutively (press [R/S] immediately after it stops), the numbers in the display change fastly. Unfortunately, only 1,000 possible random numbers will be generated. If we use 100 instead of 1,000 to multiply the T-seed, we will increase the number of possible 'random' numbers to 6,000, but the first digit of the generated random numbers eiher steps forwad one step after each immediate, consecutive execution or repeats itself.

Yeap, restricting a random number generator to a 1,000 or a 6,000 or to anything is not creating a random number generator. Using a previous seed would actually enhance it. If we use the full T-seed somehow, we would have 43,200,000 seeds (twice of it if we use 24-hour TIME), but we would still restrict the number of random numbers being generated. The only way I can think of enhancing this RAND program would be to scramble the digits of the T-seed so the generated random numbers do not follow an specific pattern. If the scrambler is linear, i.e., not random, we fall in the same restrictions again...

Any possibilities?

Sorry if I could not go any further...

Luiz (Brazil)


Edited: 10 Dec 2007, 7:31 a.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reasonable price for a 41C, Quad Mem, Time, Navigation and Card reader module? Eelco Rouw 10 4,596 12-12-2013, 01:52 AM
Last Post: Eelco Rouw
  [HP Prime]How to get Discrete-Time Fourier Transform uklo 0 1,478 11-18-2013, 08:02 PM
Last Post: uklo
  Help: HP-41CX and IR module Marcel Samek 13 3,919 11-14-2013, 11:00 AM
Last Post: Marcel Samek
  Date/time formats R. Pienne 4 2,139 11-01-2013, 12:43 PM
Last Post: Marcus von Cube, Germany
  How to set the Date.Time etc on a WP34S Harold A Climer 4 1,844 10-29-2013, 09:32 PM
Last Post: FORTIN Pascal
  Prime: Exam mode (possible duplicate after funny response first time) Paul Townsend (UK) 1 1,439 10-24-2013, 03:09 PM
Last Post: Tim Wessman
  Date/time programs for the HP 35s R. Pienne 0 1,066 10-03-2013, 02:37 PM
Last Post: R. Pienne
  Nothing like passing the time away... Eddie W. Shore 2 1,355 03-21-2013, 08:23 AM
Last Post: Eddie W. Shore
  New compile-time options for WP-34S Nigel J Dowrick 15 4,580 01-29-2013, 03:25 PM
Last Post: Stephan
  HP-41C Custom Survey Module Identificaiton Help Dan Grelinger 0 898 01-27-2013, 01:51 PM
Last Post: Dan Grelinger

Forum Jump: