Skip to content

Commit

Permalink
Update benchmark.c
Browse files Browse the repository at this point in the history
Replaced rand_int from rand_double as mentioned across other files

Signed-off-by: Harsh Mathur <[email protected]>
  • Loading branch information
Harsh-Mathur-1503 authored Nov 12, 2024
1 parent 7a88267 commit 5e5440d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ static double tic( void ) {
*
* @return random integer
*/
static int rand_int( void ) {
return (rand() % 20) + 1; // Random value between 1 and 20 for small lcmf tests
static double rand_double( void ) {
int r = rand();
return (double)r / ( (double)RAND_MAX + 1.0 );
}

/**
Expand Down

0 comments on commit 5e5440d

Please sign in to comment.