GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HPL_rand(3) HPL Library Functions HPL_rand(3)

HPL_rand - random number generator.

#include "hpl.h"

double HPL_rand();

HPL_rand generates the next number in the random sequence. This function ensures that this number lies in the interval (-0.5, 0.5].

The static array irand contains the information (2 integers) required to generate the next number in the sequence X(n). This number is computed as X(n) = (2^32 * irand[1] + irand[0]) / d - 0.5, where the constant d is the largest 64 bit positive integer. The array irand is then updated for the generation of the next number X(n+1) in the random sequence as follows X(n+1) = a * X(n) + c. The constants a and c should have been preliminarily stored in the arrays ias and ics as 2 pairs of integers. The initialization of ias, ics and irand is performed by the function HPL_setran.

HPL_ladd (3), HPL_lmul (3), HPL_setran (3), HPL_xjumpm (3), HPL_jumpit (3).
December 2, 2018 HPL 2.3

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.