libflame  revision_anchor
Functions
FLA_random_number.c File Reference

(r)

Functions

float FLA_random_float ()
double FLA_random_double ()
scomplex FLA_random_scomplex ()
dcomplex FLA_random_dcomplex ()

Function Documentation

double FLA_random_double ( void  )

Referenced by FLA_random_dcomplex().

{
  return ( ( double ) rand() / ( double ) RAND_MAX ) * 2.0 - 1.0;
}
float FLA_random_float ( void  )

Referenced by FLA_random_scomplex().

{
  return ( float )( ( ( double ) rand() / ( double ) RAND_MAX ) * 2.0 - 1.0 );
}