Changeset 581
- Timestamp:
- 08/22/09 17:57:15 (15 years ago)
- Location:
- library
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/itpp_ext.cpp
r580 r581 386 386 void set_seed(double seed0){seed=seed0;} 387 387 double get(){ 388 int tmp=mod(A*seed,M); 389 seed =tmp; 388 long long tmp = A * seed; 389 tmp = tmp % M; 390 seed = tmp; 390 391 counter++; 391 392 return seed/M;} -
library/tests/randun_test.cpp
r580 r581 4 4 #include "mat_checks.h" 5 5 using namespace itpp; 6 7 #define BDMLIB8 6 9 7 TEST(test_randun) { … … 15 13 //ASSUMING randun was not used yet! 16 14 vec x = randun(10); 17 CHECK_CLOSE _EX(x,matlab_out, 1e-6*ones(10));15 CHECK_CLOSE(matlab_out, x, 1e-6); 18 16 } 19 17