root/library/tests/randun_test.cpp @ 580

Revision 580, 0.5 kB (checked in by smidl, 15 years ago)

randun test - fails because of wierd behavior of mod on line 388 of itpp_ext.cpp
mod gives different results in assignment and when called from gdb

Line 
1
2#include <itpp_ext.h>
3#include "UnitTest++.h"
4#include "mat_checks.h"
5using namespace itpp;
6
7#define BDMLIB
8
9 TEST(test_randun) {
10        // matlab output obtained by
11        // >>clear all
12        // >>randun(10);
13         vec matlab_out=" 0.695964974209650, 0.083321541586575, 0.385149445564090, 0.206731595660901, 0.537928272754852, 0.960480190795139, 0.790566693893898, 0.054424274738144, 0.708785523990535, 0.558301708920999";
14
15        //ASSUMING randun was not used yet!
16         vec x = randun(10);
17         CHECK_CLOSE_EX(x,matlab_out, 1e-6*ones(10));
18 }
Note: See TracBrowser for help on using the browser.