asn1_long_random_item asn1_long_random_seed asn1_long_random_turn asn1_long_random asn1_long_random_nbits asn1_long_random_low - generate random long integers


#include asn1.h

ASN1_LONG_ITEM asn1_long_random_item(void);

void asn1_long_random(li, length)
asn1_long *li;
int length;

void asn1_long_random_nbits(li, nbits)
asn1_long *li;
int nbits;

void asn1_long_random_low(li, li_max)
asn1_long *li, *li_max;

void asn1_long_random_seed(l)

void asn1_long_turn(i)
int i;


The ASN.1 library routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. All ASN.1 routines require the header "asn1.h" to be include.

These routines generates pseudo-random numbers using arbitrary length integer arithmetic. The long integers are stored using the defined type asn1_long (see asn1_long(9x)) :

asn1_long_random_seed(\|) and asn1_long_random_turn(\|) can be used to produce unforeseeable random numbers, to avoid connections between the samples obtained on different days. This can be done, for example, by choosing random external values for "l" or "i", like process number, machine address, the running time of a task, or an external "analog" number generator.


mavcod (9x),
mavros (9x),
mavros-output (9x),
asn1_time (9x),
asn1_malloc (9x),
asn1_long (9x),
asn1_longmath (9x),
asn1_longio (9x),
asn1_longprime (9x)
C. Huitema, "General Presentation of the MAVROS Compiler",INRIA, 1990