bit = gsl_rng_get(r) % 2; Or more efficiently, bit = gsl_rng_get(r) & 0x01;
在 Aug 16, 2010,2:14 AM,Jerome BENOIT <[email protected]> 写到: > Hello List, > > what is the best way with GSL to pick up randomly a sign (or a bit) ? > > Thanks in advance, > Jerome > > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
