diff options
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/convert_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/tests/convert_test.cpp b/host/tests/convert_test.cpp index 6c1b94c45..dd04dcafc 100644 --- a/host/tests/convert_test.cpp +++ b/host/tests/convert_test.cpp @@ -285,8 +285,8 @@ BOOST_AUTO_TEST_CASE(test_convert_types_fc32_to_sc16){ const size_t nsamps = 13; std::vector<fc32_t> input(nsamps); BOOST_FOREACH(fc32_t &in, input) in = fc32_t( - (std::rand()/float(RAND_MAX/2)) - 1, - (std::rand()/float(RAND_MAX/2)) - 1 + (std::rand()/(RAND_MAX/2.0)) - 1, + (std::rand()/(RAND_MAX/2.0)) - 1 ); std::vector<uint32_t> interm(nsamps); std::vector<sc16_t> output(nsamps); |