Post Reply 
4K HP 67 Games rom attached for testing
11-06-2016, 04:40 PM (This post was last modified: 11-06-2016 07:19 PM by Dieter.)
Post: #98
RE: 4K HP 67 Games rom attached for testing
(11-05-2016 10:29 PM)Gene Wrote:  XROM 23,26 will be the Random Number program. Let's compromise on the shorter version here which is much better than the PI + X^2 type:

Gene, don't get me wrong, but I really would like to have some solid facts about the problems of the frac(x+pi)² generator. Do you have a link or some other information on this?

Anyway, so let's use the frac(997x) generator which is said to be okay – provided there is a suitable seed. For obvious reasons it cannot be negative or zero, and it also should not be too small: imagine you start with 1E–20... ;-) That's why I think the user input has to be "normalized" in some way. For instance by limiting to the domain 0,1...0,9 which can be done by 0,1 + 0,8*frac(abs(x)). This is just a first idea, maybe you have a better one.

Another idea: what about using the "preferred algorithm" in an MCode routine? The seed would be taken from and finally stored in R00, just as a simple FOCAL implementation.

I am currently reviewing the individual programs. What is "F67"? Do you have a source / user instructions and an example? And also one for Chuck-a-luck?

Edit:
Now I think I know how Chuck-a-luck works. Here is an improved version that should still fit as we are saving lots of bytes due to the common RNG and seed routines. It also saves two registers (now just R00...04). How do you like it? If you think it should go into the new ROM: I just did an update that is even a bit shorter. ;-)

Dieter


Attached File(s)
.zip  Chuckaluck2.zip (Size: 833 bytes / Downloads: 2)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-67 AOS program to debug - Gene - 10-30-2016, 02:11 AM
RE: 4K HP 67 Games rom attached for testing - Dieter - 11-06-2016 04:40 PM



User(s) browsing this thread: 2 Guest(s)