C3E: Complex Compute Core Engine v1.0
An engine for handling complex computational tasks
|
Random number generation utilities for the C3E library. More...
#include <c3e/commons.h>
Go to the source code of this file.
Functions | |
c3e_number | c3e_random () |
Generates a random number. | |
c3e_number | c3e_random_pseudo () |
Generates a pseudorandom number. | |
c3e_number | c3e_random_bound (c3e_number min, c3e_number max) |
Generates a random number within a specified range. | |
This file provides functions for generating random numbers within the C3E library. It includes utilities for generating random numbers with varying characteristics, including pseudorandom values and numbers within a specified range.
c3e_number c3e_random | ( | ) |
This function produces a random floating-point number from /dev/urandom
. The number generated is uniformly distributed within this range.
c3e_number c3e_random_bound | ( | c3e_number | min, |
c3e_number | max | ||
) |
This function generates a random floating-point number between min
and max
. The generated number is uniformly distributed within the specified range.
min | The lower bound of the range (inclusive). |
max | The upper bound of the range (inclusive). |
c3e_number c3e_random_pseudo | ( | ) |
This function produces a pseudorandom floating-point number between 0.0 and 1.0. Unlike c3e_random()
, this function may use a different algorithm or seed for generating pseudorandom numbers, providing a potentially different distribution or pattern of randomness.