Site icon MacTech.com

Precision Plugin 1.7 for REALbasic

Precision Plugin 1.7 for PPC, Carbon, and x86 adds a pseudo-random
number generator, with the ability for the user to reseed. The new
functions are:

MPLRnd As Double (result: 0 (= pseudo-random
double ( 1 )

MPLreseed seed As Integer (if seed is not zero, it is
used as the new seed)
(if seed is zero, the current time is
used as the new seed)

The generated double is random in all its decimal places, not just seven as
in REALbasic itself.

This pseudo-random number generator uses the method of Mitchell and Moore
as described in “The Art of Computer Programming”, Vol. 2, 2nd edition, p.
26, by Donald E. Knuth (Addison-Wesley). It is meant for scientific work,
generating doubles ()= 0 and (1) rather than integers. The advantage of
this method is its long period (greater than 3.6 x 10^16) and that no
multiplication or division is required. Also, according to Knuth, “…it
may well prove to be the very best source of random numbers for practical
purposes.”

I would appreciate any reports of testing that reveals just how good a
random number generator this is.

Version 1.7 includes the “last” keyword introduced in v. 1.6. It is
described in the documentation.

Precision Plugin provides almost all the functions built into REALbasic at
precisions up to 30,000 digits.

Download Page:
(http://homepage.mac.com/delaneyrm/PrecisionPlugin.html)

Bob

Exit mobile version