Post Reply 
HP41C random number generator help
12-05-2017, 08:31 AM
Post: #9
RE: HP41C random number generator help
(12-05-2017 06:06 AM)Paul Dale Wrote:  How does FRC deal with negative numbers? LN(x) for 0 < x < 1 is negative.

FRC of a negative number is negative as well, while 1 MOD is positive as it adds 1:
FRC(–3,14)=–0,14  while  –3,14 MOD 1 returns 0,86. At least on the HP41.

Maybe x := FRC(–100*ln x) should be used here. Or even better x := FRC(ABS(100*ln x)).

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP41C random number generator help - Trond - 12-05-2017, 05:45 AM
RE: HP41C random number generator help - Dieter - 12-05-2017 08:31 AM



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