Simulating 15C RAN # on 35s
02-15-2015, 04:12 PM
Post: #16
 rprosperi Super Moderator Posts: 5,198 Joined: Dec 2013
RE: Simulating 15C RAN # on 35s
(02-15-2015 03:45 PM)Tugdual Wrote:  This is what I understood:
If RND(n) = 0.aaaaabbbbb then $$10^5$$*RND(n) = aaaaa.bbbbb
So this becomes
(15743 + 0.52261) * (aaaaa + 0.bbbbb)
aaaaa*15743 has no fractional part so you can drop it

What Thomas didn't mention (but implied in his code) is that 0.52261 * 0.bbbbb < 1 so you don't need to FP this part but aaaaa * 0.52261 > 1 as well as 15743 * 0.bbbbb > 1 so you need to FP the sum of these two ones first otherwise you will end up with 10 digits in the mantissa of which 5 will be used for IP.

Thank you Tugdual, very clear now. As we've come to expect from Thomas, very insightful and clever. Thanks to both of you!

--Bob Prosperi
 « Next Oldest | Next Newest »

 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 - Paul Dale - 02-15-2015, 05:24 AM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 07:28 AM RE: Simulating 15C RAN # on 35s - rprosperi - 02-15-2015, 03:30 PM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 03:45 PM RE: Simulating 15C RAN # on 35s - rprosperi - 02-15-2015 04:12 PM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 08:03 AM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 08:24 AM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 10:37 AM RE: Simulating 15C RAN # on 35s - Paul Dale - 02-15-2015, 11:21 AM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 11:42 AM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 11:37 AM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 12:01 PM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 12:54 PM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 05:00 PM RE: Simulating 15C RAN # on 35s - Tugdual - 02-15-2015, 05:17 PM RE: Simulating 15C RAN # on 35s - Thomas Klemm - 02-15-2015, 05:57 PM

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