Back to noParams and what it takes to get the maximum value 0.99...9 (all nines).
When we "!FILD eq" and then use "!FABS" to handle the sign conversion, we do not need eq to start as all binary 1's to get the maximum output. I suppose that was already the case with the AND masking. What do I mean? Using John's present "divisor" and the FPU's default internal rounding, we will see all nines starting at eq = &h0 7FFF FFFF FFFF FFFB. I didn't catch the nuance that when we FILD to the FPU, our maximum positive values can occur when the first mwcRandom is exactly 7FFF FFFF instead of FFFF FFFF.
I haven't yet thought my way through the scenarios for (a) togScope=0 and results near zero, (b) togScope<>0 and results at or near zero, or (c) togScope<>0 and results near -1.
Now just a comment to clarify my previous allusions to a second mwc generator. I was not thinking anything about the +/- sign of the value. I'm looking at separate generators for eq's upper DWORD and lower DWORD. For an overview of the concept see: http://www.pgbiom.ufrpe.br/docentes/~borko/reprints/2008/random_CommStatSimComp_2008.pdf . This can be something to ponder for future development of the next generation of RND2.
Added: I think that I should have also rem'd out the " !lea ecx, eq "statement in post 178 above.
When we "!FILD eq" and then use "!FABS" to handle the sign conversion, we do not need eq to start as all binary 1's to get the maximum output. I suppose that was already the case with the AND masking. What do I mean? Using John's present "divisor" and the FPU's default internal rounding, we will see all nines starting at eq = &h0 7FFF FFFF FFFF FFFB. I didn't catch the nuance that when we FILD to the FPU, our maximum positive values can occur when the first mwcRandom is exactly 7FFF FFFF instead of FFFF FFFF.
I haven't yet thought my way through the scenarios for (a) togScope=0 and results near zero, (b) togScope<>0 and results at or near zero, or (c) togScope<>0 and results near -1.
Now just a comment to clarify my previous allusions to a second mwc generator. I was not thinking anything about the +/- sign of the value. I'm looking at separate generators for eq's upper DWORD and lower DWORD. For an overview of the concept see: http://www.pgbiom.ufrpe.br/docentes/~borko/reprints/2008/random_CommStatSimComp_2008.pdf . This can be something to ponder for future development of the next generation of RND2.
Added: I think that I should have also rem'd out the " !lea ecx, eq "statement in post 178 above.
Comment