The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Simulating 15C RAN # on 35s
02-14-2015, 05:13 PM (This post was last modified: 02-15-2015 08:01 AM by Tugdual.)
Post: #1
Simulating 15C RAN # on 35s
This 35s program will return the exact same RAN # values as the 15C (Don't even ask me why I did that...). Fun fact: the seed 0.8603685347 returns zero

Algo:
RND(n+1) = Frac(1574352261*RND(n) + 0.1017980433)
The challenge is to compute this with only 14 digits on the mantisse.
On the 34s with D mode, you get instantly the result :-).

Usage:
Enter a SEED and then XEQ A
Press R/S for next RAN# values

Notes:
IP is obtained with Left shift INTG 6
FP is obtained with Left shift INTG 5

Code:
A001 LBL A
A002 STO A
A003 SF 1
A004 10
A005 STO B
A006 CLx
A007 ENTER
A008 1574352261
A009 RCL / B
A010 STO C
A011 FP
A012 RCL A
A013 RCL* B
A014 ENTER
A015 FP
A016 STO A
A017 x=0?
A018 CF 1
A019 R↓
A020 IP
A021 *
A022 +
A023 RCL C
A024 FS? 1
A025 GTO A009
A026 R↓
A027 0.1017980433
A028 +
A029 FP
A030 RTN
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Simulating 15C RAN # on 35s - Tugdual - 02-14-2015 05:13 PM
RE: Simulating 15C RAN # on 35s - Namir - 02-15-2015, 03:44 AM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 04:01 AM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 03:45 PM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 08:03 AM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 10:37 AM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 11:42 AM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 12:01 PM
RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 05:17 PM



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