Simulating 15C RAN # on 35s
|
02-15-2015, 03:45 PM
(This post was last modified: 02-15-2015 03:54 PM by Tugdual.)
Post: #15
|
|||
|
|||
RE: Simulating 15C RAN # on 35s
(02-15-2015 03:30 PM)rprosperi Wrote:This is what I understood:(02-15-2015 07:28 AM)Thomas Klemm Wrote: Or then we could use: 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. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)