Post Reply 
Simulating 15C RAN # on 35s
02-15-2015, 04:12 PM
Post: #16
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
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 - 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 - 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: 1 Guest(s)