flipper.c
void shuffle_and_flip(int *lst) {
  for (size_t i = 0; i < m; i++) {
	size_t j = i + rand() / (RAND_MAX / (m - i) + 1);
	int tmp = lst[i];
	lst[i] = lst[j];
	lst[j] = tmp;

	if (rand() % 2 == 1)
	  lst[i] = -lst[i];
  }
}
/* Shuffles and randomly negates the values of lst in place.
 */
Shuffles and randomly negates the values of lst in place.
Shuffles and randomly negates the values of lst in place .
void shuffle_and_flip(int *lst) {
  for (size_t i = 0; i < m; i++) {
	size_t j = i + rand() / (RAND_MAX / (m - i) + 1);
	int tmp = lst[i];
	lst[i] = lst[j];
	lst[j] = tmp;
	if (rand() % 2 == 1)
	  lst[i] = -lst[i];
  }
}
void shuffle_and_flip ( int * lst ) { for ( size_t i = 0 ; i < m ; i ++ ) { size_t j = i + rand ( ) / ( RAND_MAX / ( m - i ) + 1 ) ; int tmp = lst [ i ] ; lst [ i ] = lst [ j ] ; lst [ j ] = tmp ; if ( rand ( ) % 2 == 1 ) lst [ i ] = - lst [ i ] ; } }
Shuffles and randomly negates the values of lst in place.
Shuffles and randomly negates the values of lst in place .