G. Wade Johnson (gwadej@anomaly.org)
Thu, 27 Aug 1998 19:42:07 -0500
At 03:51 PM 8/26/98 -0700, you wrote:
>Does anyone know the constants used in Borland's Turbo C linear
>congruential PRNG used in their rand() function? I would guess it's
>the same as for Borland Professional C++ and the other versions, but
>don't know that for a fact.
>
>I'm trying to replicate a DOS crypto-like program's operation on my
>more convenient Linux box.
>
>Thanks -
>
> Jim Gillogly
> 4 Halimath S.R. 1998, 22:51
> 12.19.5.8.7, 10 Manik 20 Yaxkin, Fifth Lord of Night
As of version 4.5, it was
multiplier = 0x015a4e35L
increment = 1
seeds are mod 32768
output is right-shifted 16 bits then mod 32768
G. Wade
G. Wade Johnson Telescan, Inc. gwadej@anomaly.org
"any technology sufficiently advanced is indistinguishable from a Perl
script."
-- Programming Perl, 2nd ed.
The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:11:01