Mail Archives: djgpp/1999/02/18/21:56:35
George Marsaglia <geo AT stat DOT fsu DOT edu> writes:
> BUT NOONE HAS YET SUGGESTED AN EASY
> INLINE ASSEMBLER SECTION OF CODE FOR THIS.
> SEVERAL RESPONDENTS SUGGESTED IT COULD
> BE DONE USING LONGLONG's, BUT ONLY A FEW PERCENT
> OF CURRENT CPU's SEEM TO HAVE TRUE 64-BIT
> ARITHMETIC.
Do you mean that nobody suggested inline assembler for CPU's other
than i386? Because my first post on this topic contained both inline
assembler, long long version and ANSI-C version (at least, nobody said
that it is not ANSI). Code is after first question about sequence
degradation. I am sure that in inline assembler I wrote, it is
possible to reduce amount of instructions (by using "m" constraints),
but I don't know how to write faster version.
BTW, question about seeding this RNG is still open. I know at least
two sets of initial values that will lead to the sequence of the same
values.
x=0, c=0 and x=(1<<n)-1, c=a-1 where n is number of bits (32 for
original algorithm).
--
Michael Bukin
- Raw text -