randexponential() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
void SRANDEXPONENTIAL(rng_int_t *n, float *a, rng_int_t *state, float *x, rng_int_t *info)#
void DRANDEXPONENTIAL(rng_int_t *n, double *a, rng_int_t *state, double *x, rng_int_t *info)#
void srandexponential_(rng_int_t *n, float *a, rng_int_t *state, float *x, rng_int_t *info)#
void drandexponential_(rng_int_t *n, double *a, rng_int_t *state, double *x, rng_int_t *info)#
void srandexponential(rng_int_t n, float a, rng_int_t *state, float *x, rng_int_t *info)#
void drandexponential(rng_int_t n, double a, rng_int_t *state, double *x, rng_int_t *info)#

Returns a vector of double precision pseudo-random numbers from exponential distribution.

Parameters:
  • n[in] Number of values to return, n > 0

  • a[in] Expontential parameter, a >= 0.0

  • state[inout] On Entry: Current state of the base generator being used. state must have first been initialized with a call to drandinitialize On Exit: State of generator after n- values are generated

  • x[out] Vector of n- values from the exponential distribution, x(n)

  • info[out]

    Error code

    0 = Everything OK

    -1 to -3 = Error in parameter, abs(info)